urma-mcp 0.1.0-rc.1

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 (229) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +389 -0
  3. package/assets/urma-banner.png +0 -0
  4. package/assets/urma-logo.png +0 -0
  5. package/dist/src/acquisition/frame-panel.d.ts +22 -0
  6. package/dist/src/acquisition/frame-panel.js +110 -0
  7. package/dist/src/acquisition/frame-panel.js.map +1 -0
  8. package/dist/src/acquisition/frames.d.ts +37 -0
  9. package/dist/src/acquisition/frames.js +463 -0
  10. package/dist/src/acquisition/frames.js.map +1 -0
  11. package/dist/src/acquisition/media.d.ts +59 -0
  12. package/dist/src/acquisition/media.js +946 -0
  13. package/dist/src/acquisition/media.js.map +1 -0
  14. package/dist/src/acquisition/overview.d.ts +31 -0
  15. package/dist/src/acquisition/overview.js +335 -0
  16. package/dist/src/acquisition/overview.js.map +1 -0
  17. package/dist/src/acquisition/panel.d.ts +16 -0
  18. package/dist/src/acquisition/panel.js +125 -0
  19. package/dist/src/acquisition/panel.js.map +1 -0
  20. package/dist/src/acquisition/records.d.ts +24 -0
  21. package/dist/src/acquisition/records.js +127 -0
  22. package/dist/src/acquisition/records.js.map +1 -0
  23. package/dist/src/acquisition/remote-budget.d.ts +4 -0
  24. package/dist/src/acquisition/remote-budget.js +121 -0
  25. package/dist/src/acquisition/remote-budget.js.map +1 -0
  26. package/dist/src/acquisition/singleflight.d.ts +10 -0
  27. package/dist/src/acquisition/singleflight.js +75 -0
  28. package/dist/src/acquisition/singleflight.js.map +1 -0
  29. package/dist/src/acquisition/storyboard.d.ts +36 -0
  30. package/dist/src/acquisition/storyboard.js +324 -0
  31. package/dist/src/acquisition/storyboard.js.map +1 -0
  32. package/dist/src/acquisition/transcript.d.ts +25 -0
  33. package/dist/src/acquisition/transcript.js +367 -0
  34. package/dist/src/acquisition/transcript.js.map +1 -0
  35. package/dist/src/acquisition/transport-policy.d.ts +7 -0
  36. package/dist/src/acquisition/transport-policy.js +22 -0
  37. package/dist/src/acquisition/transport-policy.js.map +1 -0
  38. package/dist/src/acquisition/video-timing.d.ts +24 -0
  39. package/dist/src/acquisition/video-timing.js +249 -0
  40. package/dist/src/acquisition/video-timing.js.map +1 -0
  41. package/dist/src/app.d.ts +49 -0
  42. package/dist/src/app.js +31 -0
  43. package/dist/src/app.js.map +1 -0
  44. package/dist/src/cli/doctor.d.ts +24 -0
  45. package/dist/src/cli/doctor.js +368 -0
  46. package/dist/src/cli/doctor.js.map +1 -0
  47. package/dist/src/cli/main.d.ts +2 -0
  48. package/dist/src/cli/main.js +79 -0
  49. package/dist/src/cli/main.js.map +1 -0
  50. package/dist/src/config.d.ts +36 -0
  51. package/dist/src/config.js +110 -0
  52. package/dist/src/config.js.map +1 -0
  53. package/dist/src/core/coverage.d.ts +20 -0
  54. package/dist/src/core/coverage.js +89 -0
  55. package/dist/src/core/coverage.js.map +1 -0
  56. package/dist/src/core/diagnostics.d.ts +58 -0
  57. package/dist/src/core/diagnostics.js +451 -0
  58. package/dist/src/core/diagnostics.js.map +1 -0
  59. package/dist/src/core/errors.d.ts +13 -0
  60. package/dist/src/core/errors.js +57 -0
  61. package/dist/src/core/errors.js.map +1 -0
  62. package/dist/src/core/frame-schedule.d.ts +16 -0
  63. package/dist/src/core/frame-schedule.js +52 -0
  64. package/dist/src/core/frame-schedule.js.map +1 -0
  65. package/dist/src/core/ids.d.ts +48 -0
  66. package/dist/src/core/ids.js +122 -0
  67. package/dist/src/core/ids.js.map +1 -0
  68. package/dist/src/core/model.d.ts +216 -0
  69. package/dist/src/core/model.js +2 -0
  70. package/dist/src/core/model.js.map +1 -0
  71. package/dist/src/core/request-key.d.ts +1 -0
  72. package/dist/src/core/request-key.js +8 -0
  73. package/dist/src/core/request-key.js.map +1 -0
  74. package/dist/src/core/search-limits.d.ts +11 -0
  75. package/dist/src/core/search-limits.js +13 -0
  76. package/dist/src/core/search-limits.js.map +1 -0
  77. package/dist/src/distribution/active.d.ts +20 -0
  78. package/dist/src/distribution/active.js +169 -0
  79. package/dist/src/distribution/active.js.map +1 -0
  80. package/dist/src/distribution/archive.d.ts +8 -0
  81. package/dist/src/distribution/archive.js +368 -0
  82. package/dist/src/distribution/archive.js.map +1 -0
  83. package/dist/src/distribution/download.d.ts +8 -0
  84. package/dist/src/distribution/download.js +93 -0
  85. package/dist/src/distribution/download.js.map +1 -0
  86. package/dist/src/distribution/host-registration.d.ts +7 -0
  87. package/dist/src/distribution/host-registration.js +64 -0
  88. package/dist/src/distribution/host-registration.js.map +1 -0
  89. package/dist/src/distribution/installer.d.ts +38 -0
  90. package/dist/src/distribution/installer.js +445 -0
  91. package/dist/src/distribution/installer.js.map +1 -0
  92. package/dist/src/distribution/integrity.d.ts +8 -0
  93. package/dist/src/distribution/integrity.js +131 -0
  94. package/dist/src/distribution/integrity.js.map +1 -0
  95. package/dist/src/distribution/lock.d.ts +14 -0
  96. package/dist/src/distribution/lock.js +136 -0
  97. package/dist/src/distribution/lock.js.map +1 -0
  98. package/dist/src/distribution/manifest.d.ts +46 -0
  99. package/dist/src/distribution/manifest.js +202 -0
  100. package/dist/src/distribution/manifest.js.map +1 -0
  101. package/dist/src/distribution/paths.d.ts +30 -0
  102. package/dist/src/distribution/paths.js +154 -0
  103. package/dist/src/distribution/paths.js.map +1 -0
  104. package/dist/src/distribution/platform.d.ts +15 -0
  105. package/dist/src/distribution/platform.js +76 -0
  106. package/dist/src/distribution/platform.js.map +1 -0
  107. package/dist/src/distribution/qualification.d.ts +26 -0
  108. package/dist/src/distribution/qualification.js +265 -0
  109. package/dist/src/distribution/qualification.js.map +1 -0
  110. package/dist/src/distribution/receipt.d.ts +52 -0
  111. package/dist/src/distribution/receipt.js +142 -0
  112. package/dist/src/distribution/receipt.js.map +1 -0
  113. package/dist/src/distribution/runtime.d.ts +8 -0
  114. package/dist/src/distribution/runtime.js +173 -0
  115. package/dist/src/distribution/runtime.js.map +1 -0
  116. package/dist/src/evidence/service.d.ts +959 -0
  117. package/dist/src/evidence/service.js +1455 -0
  118. package/dist/src/evidence/service.js.map +1 -0
  119. package/dist/src/evidence/state.d.ts +52 -0
  120. package/dist/src/evidence/state.js +362 -0
  121. package/dist/src/evidence/state.js.map +1 -0
  122. package/dist/src/index.d.ts +5 -0
  123. package/dist/src/index.js +6 -0
  124. package/dist/src/index.js.map +1 -0
  125. package/dist/src/mcp/logo.d.ts +5 -0
  126. package/dist/src/mcp/logo.js +11 -0
  127. package/dist/src/mcp/logo.js.map +1 -0
  128. package/dist/src/mcp/projection.d.ts +4 -0
  129. package/dist/src/mcp/projection.js +144 -0
  130. package/dist/src/mcp/projection.js.map +1 -0
  131. package/dist/src/mcp/schemas.d.ts +1744 -0
  132. package/dist/src/mcp/schemas.js +662 -0
  133. package/dist/src/mcp/schemas.js.map +1 -0
  134. package/dist/src/mcp/server.d.ts +6 -0
  135. package/dist/src/mcp/server.js +470 -0
  136. package/dist/src/mcp/server.js.map +1 -0
  137. package/dist/src/mcp/stdio.d.ts +1 -0
  138. package/dist/src/mcp/stdio.js +36 -0
  139. package/dist/src/mcp/stdio.js.map +1 -0
  140. package/dist/src/remote/egress.d.ts +42 -0
  141. package/dist/src/remote/egress.js +611 -0
  142. package/dist/src/remote/egress.js.map +1 -0
  143. package/dist/src/remote/formats.d.ts +5 -0
  144. package/dist/src/remote/formats.js +30 -0
  145. package/dist/src/remote/formats.js.map +1 -0
  146. package/dist/src/remote/lease.d.ts +15 -0
  147. package/dist/src/remote/lease.js +2 -0
  148. package/dist/src/remote/lease.js.map +1 -0
  149. package/dist/src/remote/normalize.d.ts +14 -0
  150. package/dist/src/remote/normalize.js +243 -0
  151. package/dist/src/remote/normalize.js.map +1 -0
  152. package/dist/src/remote/policy.d.ts +13 -0
  153. package/dist/src/remote/policy.js +107 -0
  154. package/dist/src/remote/policy.js.map +1 -0
  155. package/dist/src/remote/worker.d.ts +14 -0
  156. package/dist/src/remote/worker.js +40 -0
  157. package/dist/src/remote/worker.js.map +1 -0
  158. package/dist/src/sources/candidates.d.ts +18 -0
  159. package/dist/src/sources/candidates.js +23 -0
  160. package/dist/src/sources/candidates.js.map +1 -0
  161. package/dist/src/sources/caption-tracks.d.ts +12 -0
  162. package/dist/src/sources/caption-tracks.js +75 -0
  163. package/dist/src/sources/caption-tracks.js.map +1 -0
  164. package/dist/src/sources/local.d.ts +42 -0
  165. package/dist/src/sources/local.js +203 -0
  166. package/dist/src/sources/local.js.map +1 -0
  167. package/dist/src/sources/metadata.d.ts +15 -0
  168. package/dist/src/sources/metadata.js +513 -0
  169. package/dist/src/sources/metadata.js.map +1 -0
  170. package/dist/src/sources/resolver.d.ts +22 -0
  171. package/dist/src/sources/resolver.js +363 -0
  172. package/dist/src/sources/resolver.js.map +1 -0
  173. package/dist/src/sources/timeline.d.ts +23 -0
  174. package/dist/src/sources/timeline.js +145 -0
  175. package/dist/src/sources/timeline.js.map +1 -0
  176. package/dist/src/sources/types.d.ts +67 -0
  177. package/dist/src/sources/types.js +2 -0
  178. package/dist/src/sources/types.js.map +1 -0
  179. package/dist/src/sources/youtube.d.ts +10 -0
  180. package/dist/src/sources/youtube.js +59 -0
  181. package/dist/src/sources/youtube.js.map +1 -0
  182. package/dist/src/store/blob-store.d.ts +20 -0
  183. package/dist/src/store/blob-store.js +156 -0
  184. package/dist/src/store/blob-store.js.map +1 -0
  185. package/dist/src/store/schema.d.ts +4 -0
  186. package/dist/src/store/schema.js +169 -0
  187. package/dist/src/store/schema.js.map +1 -0
  188. package/dist/src/store/sqlite-store.d.ts +47 -0
  189. package/dist/src/store/sqlite-store.js +545 -0
  190. package/dist/src/store/sqlite-store.js.map +1 -0
  191. package/dist/src/store/store.d.ts +138 -0
  192. package/dist/src/store/store.js +2 -0
  193. package/dist/src/store/store.js.map +1 -0
  194. package/dist/src/subprocess/ffmpeg.d.ts +18 -0
  195. package/dist/src/subprocess/ffmpeg.js +117 -0
  196. package/dist/src/subprocess/ffmpeg.js.map +1 -0
  197. package/dist/src/subprocess/ffprobe.d.ts +11 -0
  198. package/dist/src/subprocess/ffprobe.js +62 -0
  199. package/dist/src/subprocess/ffprobe.js.map +1 -0
  200. package/dist/src/subprocess/redaction.d.ts +3 -0
  201. package/dist/src/subprocess/redaction.js +31 -0
  202. package/dist/src/subprocess/redaction.js.map +1 -0
  203. package/dist/src/subprocess/remote-media.d.ts +3 -0
  204. package/dist/src/subprocess/remote-media.js +27 -0
  205. package/dist/src/subprocess/remote-media.js.map +1 -0
  206. package/dist/src/subprocess/runner.d.ts +23 -0
  207. package/dist/src/subprocess/runner.js +197 -0
  208. package/dist/src/subprocess/runner.js.map +1 -0
  209. package/dist/src/subprocess/versions.d.ts +8 -0
  210. package/dist/src/subprocess/versions.js +46 -0
  211. package/dist/src/subprocess/versions.js.map +1 -0
  212. package/dist/src/subprocess/ytdlp.d.ts +39 -0
  213. package/dist/src/subprocess/ytdlp.js +326 -0
  214. package/dist/src/subprocess/ytdlp.js.map +1 -0
  215. package/dist/src/version.d.ts +8 -0
  216. package/dist/src/version.js +44 -0
  217. package/dist/src/version.js.map +1 -0
  218. package/docs/ARCHITECTURE.md +273 -0
  219. package/docs/CONTRIBUTING.md +101 -0
  220. package/docs/EVIDENCE_MODEL.md +292 -0
  221. package/docs/PRODUCT_SCOPE.md +115 -0
  222. package/docs/SECURITY.md +182 -0
  223. package/docs/assets/architecture.png +0 -0
  224. package/docs/assets/contribution.png +0 -0
  225. package/docs/assets/evidence-model.png +0 -0
  226. package/docs/assets/product-scope.png +0 -0
  227. package/docs/assets/security.png +0 -0
  228. package/launcher-v1.mjs +430 -0
  229. package/package.json +45 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,389 @@
1
+ # Urma
2
+
3
+ <div align="center">
4
+ <img src="assets/urma-banner.png" alt="Urma" width="100%" />
5
+ <br /><br />
6
+ <strong>Retrieve video captions and frames through MCP.</strong>
7
+ <br />
8
+ A stdio MCP server for bounded caption and visual evidence.
9
+ <br /><br />
10
+ <a href="#install-and-connect-a-host">Install</a>
11
+ ·
12
+ <a href="#tools">Tools</a>
13
+ ·
14
+ <a href="#configuration">Configuration</a>
15
+ ·
16
+ <a href="#documentation">Documentation</a>
17
+ <br /><br />
18
+ <sub><code>urma-mcp</code> · MCP stdio · Node.js 24 LTS</sub>
19
+ </div>
20
+
21
+ <br />
22
+
23
+ Urma retrieves captions and sampled frames from videos with a known end time.
24
+ Each result identifies its source snapshot and requested timestamps or range.
25
+ The MCP host chooses what to retrieve and interprets the results.
26
+
27
+ Urma runs locally and stores its cache on your filesystem. Remote videos still
28
+ require network access. The host receives the requested evidence and controls
29
+ how it is processed or sent to a model.
30
+
31
+ Urma exposes five tools:
32
+
33
+ | Tool | Returns |
34
+ | --- | --- |
35
+ | `inspect_video` | A source snapshot and a new investigation reference. |
36
+ | `search_transcript` | Literal matches in one selected caption track. |
37
+ | `read_transcript` | Timestamped caption segments in a bounded interval. |
38
+ | `get_overview` | A visual overview with up to 12 sampled cells. |
39
+ | `get_frames` | Exact JPEG points, ordered sparse points, or a fixed-cadence schedule. |
40
+
41
+ The server uses MCP stdio. A host starts one Urma process for a session and
42
+ owns its lifecycle. Urma does not run a daemon or expose an HTTP API.
43
+
44
+ ## Install and connect a host
45
+
46
+ ### Requirements
47
+
48
+ - Native Node.js 24 LTS (`>=24 <25`).
49
+ - A user-owned local filesystem for Urma's data root.
50
+ - One of these runtime targets: Windows x64 or arm64, macOS x64 or arm64, or
51
+ Linux x64 or arm64 with glibc.
52
+
53
+ Urma installs the pinned FFmpeg, ffprobe, and yt-dlp artifacts it needs. Do
54
+ not install those tools separately for the packaged runtime. Urma does not
55
+ install or manage Node.js.
56
+
57
+ ### Install the runtime
58
+
59
+ Run the npm bootstrap with Node.js 24:
60
+
61
+ ```sh
62
+ npx -y urma-mcp@latest setup
63
+ ```
64
+
65
+ Setup downloads and verifies the pinned native tools, checks that the installed
66
+ runtime can serve MCP requests, and selects the new installation for future
67
+ launches. Each installation is stored in a separate directory called a
68
+ generation. If setup fails during an update, the previously active generation
69
+ remains selected.
70
+
71
+ The default data roots are:
72
+
73
+ | Platform | Root |
74
+ | --- | --- |
75
+ | Windows | `%LOCALAPPDATA%\Urma` |
76
+ | macOS | `~/Library/Application Support/Urma` |
77
+ | Linux | `${XDG_DATA_HOME:-~/.local/share}/urma` |
78
+
79
+ Use `--data-dir PATH` with `setup`, or set `URMA_DATA_DIR`, to select another
80
+ user-owned local directory. Network and UNC paths are outside the supported
81
+ installation boundary.
82
+
83
+ ### Register a generic JSON host
84
+
85
+ If the host uses the usual `mcpServers` JSON shape, setup can add the `urma`
86
+ entry and preserve the other entries in the file:
87
+
88
+ ```sh
89
+ npx -y urma-mcp@latest setup --client generic --config "/absolute/path/to/mcp.json"
90
+ ```
91
+
92
+ The configuration file path must be absolute. The resulting entry has this
93
+ shape; use the absolute paths printed by setup:
94
+
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "urma": {
99
+ "command": "/absolute/path/to/node",
100
+ "args": ["/absolute/path/to/Urma/launcher-v1.mjs"],
101
+ "env": {
102
+ "URMA_DATA_DIR": "/absolute/path/to/Urma"
103
+ }
104
+ }
105
+ }
106
+ }
107
+ ```
108
+
109
+ On Windows, use the path escaping required by JSON. The `command` and the
110
+ launcher path must be absolute. The launcher selects the installed generation
111
+ and starts the local Urma runtime; use the npm package only for setup and
112
+ version checks.
113
+
114
+ Host registration and runtime installation are reported separately. A healthy
115
+ runtime can be left installed when the configuration file cannot be written.
116
+ After registration, restart the host and check that it lists the five tools
117
+ above.
118
+
119
+ For a host with a different configuration format, create the equivalent
120
+ stdio entry with the same absolute Node executable, launcher path, and
121
+ `URMA_DATA_DIR` value.
122
+
123
+ ## Tools
124
+
125
+ Call `inspect_video` first for a new source. It accepts an HTTP(S) URL, an
126
+ allowed local path, or a previously returned `sourceRef`. It rejects sources
127
+ that do not define one finite video timeline. The default `freshness: "reuse"`
128
+ reuses a stored snapshot for a known remote URL or `sourceRef`. A local path
129
+ is read again to check the video and sidecar content. Set `freshness: "refresh"`
130
+ to resolve the source again. Every evidence request then uses the returned
131
+ `investigationRef`.
132
+
133
+ Use captions to locate likely time ranges, `get_overview` to locate visual
134
+ moments, and `get_frames` to verify selected moments. These tools expose
135
+ different observations:
136
+
137
+ - Caption search and reads are limited to the selected source-provided track.
138
+ - An overview is a sparse locator with up to 12 returned cells.
139
+ - A frame burst is an ordered set of requested points.
140
+ - A cadence request is a finite list of exact point requests. It reports each
141
+ page slot as `success`, `error`, or `unfinished`.
142
+
143
+ A source cache can be reused across investigations, but evidence presentation
144
+ is recorded per investigation.
145
+
146
+ ### Source and caption inputs
147
+
148
+ Urma accepts:
149
+
150
+ - A generic HTTP(S) video URL admitted by the remote source policy.
151
+ - A supported single-video YouTube URL.
152
+ - A local video path under a root listed in `URMA_LOCAL_ROOTS`.
153
+
154
+ Local caption sidecars are optional. Urma checks the video basename with `.vtt`
155
+ first and `.srt` second. Local paths remain disabled when
156
+ `URMA_LOCAL_ROOTS` is empty.
157
+
158
+ `search_transcript` accepts either one `query` or a `queries` array. Its
159
+ default mode is `phrase`; `terms` requires every normalized term to occur in a
160
+ cue. Search is literal and case-insensitive after NFKC normalization. A
161
+ matching caption is a lead for visual verification, not visual proof.
162
+
163
+ `read_transcript` requires a source-global half-open interval,
164
+ `[startMs,endMs)`. It returns at most 200 segments or 16,000 caption
165
+ characters per page. To continue, pass `nextCursor` as `cursor` with the same
166
+ investigation, interval, and selected track.
167
+
168
+ ### Visual inputs
169
+
170
+ `get_overview` accepts an optional source-global interval. It requests 12
171
+ temporally distributed cells. The returned timestamps are the samples that
172
+ were observed; they do not describe continuous coverage.
173
+
174
+ `get_frames` accepts one of these requests:
175
+
176
+ | Request | Contract |
177
+ | --- | --- |
178
+ | `points` | 1–12 unique timestamps, each before the source duration. |
179
+ | `burst` | A half-open interval and 2–12 ordered samples. |
180
+ | `cadence` | A half-open interval and a positive integer `cadenceMs`. |
181
+
182
+ Times are nonnegative integer milliseconds from the start of the source.
183
+ Intervals require `startMs < endMs` and must fit within its duration. An exact
184
+ frame request asks for the first decodable frame at or after the target; it
185
+ does not guarantee a frame with precisely that presentation timestamp.
186
+
187
+ For `points` and `burst`, the default presentation is `individual`. Set
188
+ `presentation: "panel"` to receive one derived JPEG panel plus links to the
189
+ canonical frame artifacts. A panel contains at most 12 cells and preserves
190
+ request order.
191
+
192
+ Cadence requests are paged. The default page maximum is 12 targets and the
193
+ default schedule maximum is 120 targets. Continue with the returned opaque
194
+ `nextCursor`; do not construct a cursor yourself. A cadence schedule is
195
+ discrete evidence and does not cover the time between its targets.
196
+
197
+ ### Example tool arguments
198
+
199
+ For a local video, first add its parent directory to `URMA_LOCAL_ROOTS` in the
200
+ host's Urma environment and restart the host. Call `inspect_video` with the
201
+ absolute path to your file:
202
+
203
+ ```json
204
+ { "source": "/absolute/path/to/video.mp4" }
205
+ ```
206
+
207
+ Use the returned `investigationRef` in subsequent calls. For example, these
208
+ `get_frames` arguments request a panel at 1 and 5 seconds from a video longer
209
+ than 5 seconds. Replace the example reference with the value from inspection:
210
+
211
+ ```json
212
+ {
213
+ "investigationRef": "urma:investigation:0123456789abcdef0123456789abcdef",
214
+ "request": { "kind": "points", "timesMs": [1000, 5000] },
215
+ "presentation": "panel"
216
+ }
217
+ ```
218
+
219
+ To continue a cadence page, pass `investigationRef` and the returned
220
+ `nextCursor` as `cursor`, without a new `request`.
221
+
222
+ ## Resources and errors
223
+
224
+ Successful evidence results include investigation-scoped resource links. An
225
+ artifact can be reopened through
226
+ `urma://investigation/{investigationId}/artifact/{artifactHash}` only after
227
+ that investigation has received it in a tool result. Reopening an artifact
228
+ does not add temporal coverage.
229
+
230
+ The state resource is
231
+ `urma://investigation/{investigationId}/state`. It contains persisted
232
+ acquisition, cache, and presentation state for that investigation.
233
+
234
+ Top-level MCP failures return `isError: true` with a JSON text object containing
235
+ `code`, `retryable`, and `detail`. A cadence page can instead return an error
236
+ in an individual slot and continue with other targets.
237
+
238
+ ## Evidence rules
239
+
240
+ For caption search, `partial: false` means all matches under the selected
241
+ track's matching rules were returned. It says nothing about uncaptioned
242
+ speech or visual events. Sampled frames describe only the returned points,
243
+ and reopening cached artifacts adds no coverage.
244
+
245
+ See [Evidence Model](docs/EVIDENCE_MODEL.md) for the full contract.
246
+
247
+ ## Limits
248
+
249
+ Runtime defaults are:
250
+
251
+ | Limit | Default |
252
+ | --- | ---: |
253
+ | Single caption search result limit | 5, maximum 20 |
254
+ | Caption query length | 256 characters |
255
+ | Batched caption queries | 20 queries, 20 merged hits, 16,000 returned characters |
256
+ | Caption read page | 200 segments or 16,000 characters |
257
+ | Overview request | 12 requested cells |
258
+ | Explicit frame request | 12 points or burst samples |
259
+ | Cadence page | 12 targets |
260
+ | Cadence schedule | 120 targets |
261
+ | Inline image response | 8 MiB |
262
+ | Resource read | 32 MiB |
263
+ | Targeted media acquisition | 64 MiB |
264
+ | Navigation media acquisition | 256 MiB |
265
+ | Reusable evidence media | 512 MiB |
266
+ | Remote acquisition wall time | 180,000 ms |
267
+
268
+ The environment variables below override the tunable limits. Values for byte
269
+ limits are bytes; the remote wall limit is milliseconds. Each value must be a
270
+ positive integer. `URMA_MAX_FRAME_SCHEDULE_PAGE_TARGETS` cannot exceed 12.
271
+
272
+ | Variable | Overrides |
273
+ | --- | --- |
274
+ | `URMA_MAX_TARGETED_MEDIA_BYTES` | Targeted media limit. |
275
+ | `URMA_MAX_NAVIGATION_COPY_BYTES` | Navigation media and timeline-validation limit. |
276
+ | `URMA_MAX_REUSABLE_EVIDENCE_MEDIA_BYTES` | Reusable evidence media limit. |
277
+ | `URMA_MAX_REMOTE_ACQUISITION_WALL_MS` | Remote acquisition wall-time limit. |
278
+ | `URMA_MAX_FRAME_SCHEDULE_PAGE_TARGETS` | Cadence page limit. |
279
+ | `URMA_MAX_FRAME_SCHEDULE_TARGETS` | Cadence schedule limit. |
280
+
281
+ ## Configuration
282
+
283
+ | Variable | Purpose |
284
+ | --- | --- |
285
+ | `URMA_DATA_DIR` | Selects the persistent Urma data root. |
286
+ | `URMA_LOCAL_ROOTS` | Platform-delimited list of roots allowed for local videos and sidecars. |
287
+ | `URMA_ALLOW_UNC` | Allows UNC paths when set to `1` or `true`; the path must still be under an allowed root. |
288
+ | `URMA_DEBUG` | Writes opt-in acquisition and subprocess diagnostics to stderr when set to `1` or `true`. |
289
+ | `URMA_DEBUG_FILE` | Appends diagnostics to a JSONL file when `URMA_DEBUG` is enabled. |
290
+
291
+ Set these variables in the host's Urma `env` entry, then restart the host.
292
+ Separate local roots with `;` on Windows and `:` on macOS/Linux. Use absolute
293
+ paths so root selection does not depend on the host's working directory.
294
+
295
+ The packaged launcher uses the selected generation's absolute native-tool
296
+ paths. It does not look up FFmpeg, ffprobe, or yt-dlp through `PATH`.
297
+
298
+ ## CLI and maintenance
299
+
300
+ The npm entry point exposes setup and version checks:
301
+
302
+ ```sh
303
+ npx -y urma-mcp@latest --version
304
+ npx -y urma-mcp@latest setup
305
+ ```
306
+
307
+ After setup, run the read-only doctor through the persistent launcher:
308
+
309
+ ```sh
310
+ "/absolute/path/to/node" "/absolute/path/to/Urma/launcher-v1.mjs" doctor
311
+ ```
312
+
313
+ In PowerShell, prefix the quoted executable path with `&`:
314
+
315
+ ```powershell
316
+ & "C:\path\to\node.exe" "C:\path\to\Urma\launcher-v1.mjs" doctor
317
+ ```
318
+
319
+ Doctor checks the selected runtime, Node version, SQLite/FTS5, native-tool
320
+ versions, storage, blob access, local roots, and frame-schedule limits. It
321
+ prints its report to stderr and exits with status 0 when no check fails
322
+ (warnings are allowed), or 1 when a check fails.
323
+
324
+ The launcher also provides local generation recovery:
325
+
326
+ ```sh
327
+ "/absolute/path/to/node" "/absolute/path/to/Urma/launcher-v1.mjs" rollback
328
+ "/absolute/path/to/node" "/absolute/path/to/Urma/launcher-v1.mjs" recover
329
+ ```
330
+
331
+ `rollback` selects the retained previous generation after integrity and state
332
+ compatibility checks. `recover` restores the selection recorded in
333
+ `ACTIVE.backup.json`. Set `URMA_DATA_DIR` for a non-default data root.
334
+
335
+ Normal MCP startup selects one generation for the process. It does not invoke
336
+ npm, make a network request, check for updates, modify `PATH`, or download
337
+ dependencies. A later setup affects new processes only.
338
+
339
+ ## Boundaries
340
+
341
+ Urma v0.1 does not transcribe audio, recognize objects or actions, or call a
342
+ model. It supports finite videos without authentication or DRM. See
343
+ [Product scope](docs/PRODUCT_SCOPE.md) for supported sources and exclusions.
344
+
345
+ ## Security
346
+
347
+ Local paths require explicit allowed roots. Remote HTTP(S) work uses a
348
+ process-local Safe Proxy that validates destinations and DNS results before
349
+ connecting. Installed native tools are receipt-bound and hash-checked before
350
+ first use. Subprocesses use argument arrays, `shell: false`, an allowlisted
351
+ environment, bounded output, deadlines, cancellation, and process-tree
352
+ cleanup.
353
+
354
+ These controls protect the local application boundary under the trusted
355
+ Node/FFmpeg/ffprobe/yt-dlp runtime model. They are not an operating-system
356
+ sandbox against a compromised trusted executable.
357
+
358
+ See [Security](docs/SECURITY.md) for the full boundary and failure behavior.
359
+
360
+ ## Development
361
+
362
+ Use Node.js 24 and the pnpm version declared in `package.json`. See the
363
+ [development prerequisites](docs/CONTRIBUTING.md#development-setup) for native
364
+ tools used by the tests. From the repository root:
365
+
366
+ ```sh
367
+ pnpm install --frozen-lockfile
368
+ pnpm check
369
+ ```
370
+
371
+ Contributions are welcome. Follow the [contribution guide](docs/CONTRIBUTING.md)
372
+ for code structure, documentation standards, and pull request expectations.
373
+
374
+ ## License
375
+
376
+ Urma is licensed under [Apache License 2.0](LICENSE). Third-party dependencies
377
+ and downloaded native tools retain their own licenses. The installed
378
+ generation's `licenses/` directory records native component licenses and
379
+ upstream references; preserve the accompanying upstream notices when
380
+ redistributing those tools. Urma's license does not grant rights to videos or
381
+ captions retrieved from other sources.
382
+
383
+ ## Documentation
384
+
385
+ - [Product scope](docs/PRODUCT_SCOPE.md) — current v0.1 behavior and exclusions.
386
+ - [Architecture](docs/ARCHITECTURE.md) — runtime layers, persistence, caching, and acquisition decisions.
387
+ - [Evidence Model](docs/EVIDENCE_MODEL.md) — what each result means and what it cannot establish.
388
+ - [Security](docs/SECURITY.md) — path, network, subprocess, installation, and cache controls.
389
+ - [Contributing](docs/CONTRIBUTING.md) — local setup, validation commands, and change expectations.
Binary file
Binary file
@@ -0,0 +1,22 @@
1
+ import type { UrmaConfig } from "../config.js";
2
+ import type { ResolvedSource } from "../sources/types.js";
3
+ import { BlobStore } from "../store/blob-store.js";
4
+ import type { StoredArtifact, UrmaStore } from "../store/store.js";
5
+ import { type PanelDimensions } from "./panel.js";
6
+ type ExactFrame = Readonly<{
7
+ atMs: number;
8
+ artifact: StoredArtifact;
9
+ }>;
10
+ type FramePanelResult = Readonly<{
11
+ artifact: StoredArtifact;
12
+ dimensions: PanelDimensions;
13
+ cacheHit: boolean;
14
+ }>;
15
+ export declare class FramePanelAcquirer {
16
+ readonly config: UrmaConfig;
17
+ readonly store: UrmaStore;
18
+ readonly blobs: BlobStore;
19
+ constructor(config: UrmaConfig, store: UrmaStore, blobs: BlobStore);
20
+ get(source: ResolvedSource, frames: readonly ExactFrame[], signal?: AbortSignal): Promise<FramePanelResult>;
21
+ }
22
+ export {};