@gitpod/gitpod-protocol 0.1.5-wth-test.80 → 0.1.5-wv-add-image-builds-to-dashboard.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 (408) hide show
  1. package/data/gitpod-schema.json +132 -5
  2. package/lib/accounting-protocol.d.ts +19 -11
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +35 -33
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +19 -2
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js +1 -1
  9. package/lib/admin-protocol.js.map +1 -1
  10. package/lib/analytics.d.ts +1 -1
  11. package/lib/analytics.d.ts.map +1 -1
  12. package/lib/analytics.js +1 -1
  13. package/lib/analytics.js.map +1 -1
  14. package/lib/attribution.d.ts +24 -0
  15. package/lib/attribution.d.ts.map +1 -0
  16. package/lib/attribution.js +54 -0
  17. package/lib/attribution.js.map +1 -0
  18. package/lib/auth.d.ts +1 -1
  19. package/lib/auth.d.ts.map +1 -1
  20. package/lib/auth.js +1 -1
  21. package/lib/billing-mode.d.ts +45 -0
  22. package/lib/billing-mode.d.ts.map +1 -0
  23. package/lib/billing-mode.js +44 -0
  24. package/lib/billing-mode.js.map +1 -0
  25. package/lib/blocked-repositories-protocol.d.ts +13 -0
  26. package/lib/blocked-repositories-protocol.d.ts.map +1 -0
  27. package/lib/blocked-repositories-protocol.js +8 -0
  28. package/lib/blocked-repositories-protocol.js.map +1 -0
  29. package/lib/context-url.d.ts +1 -2
  30. package/lib/context-url.d.ts.map +1 -1
  31. package/lib/context-url.js +5 -7
  32. package/lib/context-url.js.map +1 -1
  33. package/lib/context-url.spec.d.ts +1 -3
  34. package/lib/context-url.spec.d.ts.map +1 -1
  35. package/lib/context-url.spec.js +13 -26
  36. package/lib/context-url.spec.js.map +1 -1
  37. package/lib/encryption/container-module.d.ts +1 -1
  38. package/lib/encryption/container-module.d.ts.map +1 -1
  39. package/lib/encryption/container-module.js +2 -2
  40. package/lib/encryption/container-module.js.map +1 -1
  41. package/lib/encryption/encryption-engine.d.ts +1 -1
  42. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  43. package/lib/encryption/encryption-engine.js +10 -10
  44. package/lib/encryption/encryption-engine.js.map +1 -1
  45. package/lib/encryption/encryption-engine.spec.d.ts +1 -1
  46. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  47. package/lib/encryption/encryption-engine.spec.js +3 -4
  48. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  49. package/lib/encryption/encryption-service.d.ts +1 -1
  50. package/lib/encryption/encryption-service.d.ts.map +1 -1
  51. package/lib/encryption/encryption-service.js +2 -2
  52. package/lib/encryption/encryption-service.js.map +1 -1
  53. package/lib/encryption/key-provider.d.ts +1 -1
  54. package/lib/encryption/key-provider.d.ts.map +1 -1
  55. package/lib/encryption/key-provider.js +8 -10
  56. package/lib/encryption/key-provider.js.map +1 -1
  57. package/lib/env.d.ts +1 -6
  58. package/lib/env.d.ts.map +1 -1
  59. package/lib/env.js +2 -21
  60. package/lib/env.js.map +1 -1
  61. package/lib/experiments/always-default.d.ts +8 -0
  62. package/lib/experiments/always-default.d.ts.map +1 -0
  63. package/lib/experiments/always-default.js +20 -0
  64. package/lib/experiments/always-default.js.map +1 -0
  65. package/lib/experiments/configcat-server.d.ts +10 -0
  66. package/lib/experiments/configcat-server.d.ts.map +1 -0
  67. package/lib/experiments/configcat-server.js +37 -0
  68. package/lib/experiments/configcat-server.js.map +1 -0
  69. package/lib/experiments/configcat.d.ts +21 -0
  70. package/lib/experiments/configcat.d.ts.map +1 -0
  71. package/lib/experiments/configcat.js +51 -0
  72. package/lib/experiments/configcat.js.map +1 -0
  73. package/lib/experiments/types.d.ts +22 -0
  74. package/lib/experiments/types.d.ts.map +1 -0
  75. package/lib/experiments/types.js +10 -0
  76. package/lib/experiments/types.js.map +1 -0
  77. package/lib/gitpod-file-parser.d.ts +1 -1
  78. package/lib/gitpod-file-parser.d.ts.map +1 -1
  79. package/lib/gitpod-file-parser.js +7 -7
  80. package/lib/gitpod-file-parser.js.map +1 -1
  81. package/lib/gitpod-file-parser.spec.d.ts +1 -1
  82. package/lib/gitpod-file-parser.spec.js +43 -40
  83. package/lib/gitpod-file-parser.spec.js.map +1 -1
  84. package/lib/gitpod-service.d.ts +70 -52
  85. package/lib/gitpod-service.d.ts.map +1 -1
  86. package/lib/gitpod-service.js +53 -34
  87. package/lib/gitpod-service.js.map +1 -1
  88. package/lib/headless-workspace-log.d.ts +2 -1
  89. package/lib/headless-workspace-log.d.ts.map +1 -1
  90. package/lib/headless-workspace-log.js +3 -2
  91. package/lib/headless-workspace-log.js.map +1 -1
  92. package/lib/ide-frontend-service.d.ts +2 -2
  93. package/lib/ide-frontend-service.js +1 -1
  94. package/lib/ide-protocol.d.ts +29 -8
  95. package/lib/ide-protocol.d.ts.map +1 -1
  96. package/lib/ide-protocol.js +11 -1
  97. package/lib/ide-protocol.js.map +1 -1
  98. package/lib/index.d.ts +17 -17
  99. package/lib/index.d.ts.map +1 -1
  100. package/lib/index.js +2 -2
  101. package/lib/index.js.map +1 -1
  102. package/lib/installation-admin-protocol.d.ts +4 -1
  103. package/lib/installation-admin-protocol.d.ts.map +1 -1
  104. package/lib/installation-admin-protocol.js +4 -3
  105. package/lib/installation-admin-protocol.js.map +1 -1
  106. package/lib/license-protocol.d.ts +8 -1
  107. package/lib/license-protocol.d.ts.map +1 -1
  108. package/lib/license-protocol.js +1 -1
  109. package/lib/license-protocol.js.map +1 -1
  110. package/lib/messaging/browser/connection.d.ts +1 -1
  111. package/lib/messaging/browser/connection.d.ts.map +1 -1
  112. package/lib/messaging/browser/connection.js +19 -19
  113. package/lib/messaging/browser/connection.js.map +1 -1
  114. package/lib/messaging/browser/window-connection.d.ts +5 -5
  115. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  116. package/lib/messaging/browser/window-connection.js +10 -7
  117. package/lib/messaging/browser/window-connection.js.map +1 -1
  118. package/lib/messaging/client-call-metrics.d.ts +5 -19
  119. package/lib/messaging/client-call-metrics.d.ts.map +1 -1
  120. package/lib/messaging/client-call-metrics.js +35 -23
  121. package/lib/messaging/client-call-metrics.js.map +1 -1
  122. package/lib/messaging/error.d.ts +10 -2
  123. package/lib/messaging/error.d.ts.map +1 -1
  124. package/lib/messaging/error.js +20 -4
  125. package/lib/messaging/error.js.map +1 -1
  126. package/lib/messaging/handler.d.ts.map +1 -1
  127. package/lib/messaging/handler.js +1 -1
  128. package/lib/messaging/node/connection.js +8 -8
  129. package/lib/messaging/node/connection.js.map +1 -1
  130. package/lib/messaging/proxy-factory.d.ts +1 -1
  131. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  132. package/lib/messaging/proxy-factory.js +7 -9
  133. package/lib/messaging/proxy-factory.js.map +1 -1
  134. package/lib/oss-allowlist.d.ts +1 -1
  135. package/lib/oss-allowlist.js +1 -1
  136. package/lib/payment-protocol.d.ts +1 -1
  137. package/lib/payment-protocol.d.ts.map +1 -1
  138. package/lib/payment-protocol.js +2 -2
  139. package/lib/payment-protocol.js.map +1 -1
  140. package/lib/permission.d.ts +3 -3
  141. package/lib/permission.d.ts.map +1 -1
  142. package/lib/permission.js +13 -24
  143. package/lib/permission.js.map +1 -1
  144. package/lib/plans.d.ts +5 -4
  145. package/lib/plans.d.ts.map +1 -1
  146. package/lib/plans.js +211 -172
  147. package/lib/plans.js.map +1 -1
  148. package/lib/protocol.d.ts +166 -61
  149. package/lib/protocol.d.ts.map +1 -1
  150. package/lib/protocol.js +282 -106
  151. package/lib/protocol.js.map +1 -1
  152. package/lib/protocol.spec.d.ts +7 -0
  153. package/lib/protocol.spec.d.ts.map +1 -0
  154. package/lib/protocol.spec.js +127 -0
  155. package/lib/protocol.spec.js.map +1 -0
  156. package/lib/snapshot-url.d.ts +1 -1
  157. package/lib/snapshot-url.js +1 -1
  158. package/lib/snapshot-url.spec.d.ts +1 -1
  159. package/lib/snapshot-url.spec.js +1 -1
  160. package/lib/snapshot-url.spec.js.map +1 -1
  161. package/lib/team-subscription-protocol.d.ts +23 -4
  162. package/lib/team-subscription-protocol.d.ts.map +1 -1
  163. package/lib/team-subscription-protocol.js +21 -6
  164. package/lib/team-subscription-protocol.js.map +1 -1
  165. package/lib/teams-projects-protocol.d.ts +26 -6
  166. package/lib/teams-projects-protocol.d.ts.map +1 -1
  167. package/lib/teams-projects-protocol.js +2 -2
  168. package/lib/teams-projects-protocol.js.map +1 -1
  169. package/lib/typings/globals.d.ts +3 -3
  170. package/lib/typings/globals.d.ts.map +1 -1
  171. package/lib/typings/globals.js +1 -1
  172. package/lib/usage.d.ts +73 -0
  173. package/lib/usage.d.ts.map +1 -0
  174. package/lib/usage.js +20 -0
  175. package/lib/usage.js.map +1 -0
  176. package/lib/util/analytics.d.ts +1 -1
  177. package/lib/util/analytics.d.ts.map +1 -1
  178. package/lib/util/analytics.js +7 -7
  179. package/lib/util/analytics.js.map +1 -1
  180. package/lib/util/async-iterator.d.ts +1 -1
  181. package/lib/util/async-iterator.d.ts.map +1 -1
  182. package/lib/util/async-iterator.js +4 -4
  183. package/lib/util/async-iterator.js.map +1 -1
  184. package/lib/util/cancelable.d.ts +1 -1
  185. package/lib/util/cancelable.js +1 -1
  186. package/lib/util/cancelable.js.map +1 -1
  187. package/lib/util/date-time.d.ts +1 -1
  188. package/lib/util/date-time.js +7 -7
  189. package/lib/util/date-time.js.map +1 -1
  190. package/lib/util/debug-app.d.ts +25 -0
  191. package/lib/util/debug-app.d.ts.map +1 -0
  192. package/lib/util/debug-app.js +100 -0
  193. package/lib/util/debug-app.js.map +1 -0
  194. package/lib/util/deep-partial.d.ts +1 -1
  195. package/lib/util/deep-partial.js +1 -1
  196. package/lib/util/deferred.d.ts +1 -1
  197. package/lib/util/deferred.js +1 -1
  198. package/lib/util/deferred.js.map +1 -1
  199. package/lib/util/disposable.d.ts.map +1 -1
  200. package/lib/util/disposable.js +2 -2
  201. package/lib/util/disposable.js.map +1 -1
  202. package/lib/util/event.d.ts.map +1 -1
  203. package/lib/util/event.js +5 -3
  204. package/lib/util/event.js.map +1 -1
  205. package/lib/util/garbage-collected-cache.d.ts +1 -1
  206. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  207. package/lib/util/garbage-collected-cache.js +7 -2
  208. package/lib/util/garbage-collected-cache.js.map +1 -1
  209. package/lib/util/generate-workspace-id.d.ts +5 -0
  210. package/lib/util/generate-workspace-id.d.ts.map +1 -1
  211. package/lib/util/generate-workspace-id.js +446 -442
  212. package/lib/util/generate-workspace-id.js.map +1 -1
  213. package/lib/util/generate-workspace-id.spec.d.ts +1 -1
  214. package/lib/util/generate-workspace-id.spec.js +19 -8
  215. package/lib/util/generate-workspace-id.spec.js.map +1 -1
  216. package/lib/util/gitpod-cookie.d.ts +2 -2
  217. package/lib/util/gitpod-cookie.d.ts.map +1 -1
  218. package/lib/util/gitpod-cookie.js +1 -4
  219. package/lib/util/gitpod-cookie.js.map +1 -1
  220. package/lib/util/gitpod-host-url.d.ts +6 -1
  221. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  222. package/lib/util/gitpod-host-url.js +60 -33
  223. package/lib/util/gitpod-host-url.js.map +1 -1
  224. package/lib/util/gitpod-host-url.spec.d.ts +1 -1
  225. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  226. package/lib/util/gitpod-host-url.spec.js +16 -6
  227. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  228. package/lib/util/grpc.d.ts +21 -1
  229. package/lib/util/grpc.d.ts.map +1 -1
  230. package/lib/util/grpc.js +74 -2
  231. package/lib/util/grpc.js.map +1 -1
  232. package/lib/util/jaeger-client-types.d.ts +1 -1
  233. package/lib/util/jaeger-client-types.d.ts.map +1 -1
  234. package/lib/util/jaeger-client-types.js +1 -1
  235. package/lib/util/logging.d.ts +2 -2
  236. package/lib/util/logging.d.ts.map +1 -1
  237. package/lib/util/logging.js +32 -26
  238. package/lib/util/logging.js.map +1 -1
  239. package/lib/util/logging.spec.d.ts +7 -0
  240. package/lib/util/logging.spec.d.ts.map +1 -0
  241. package/lib/util/logging.spec.js +52 -0
  242. package/lib/util/logging.spec.js.map +1 -0
  243. package/lib/util/make-link.d.ts +1 -1
  244. package/lib/util/make-link.js +6 -6
  245. package/lib/util/make-link.js.map +1 -1
  246. package/lib/util/nice-grpc.d.ts +9 -0
  247. package/lib/util/nice-grpc.d.ts.map +1 -0
  248. package/lib/util/nice-grpc.js +121 -0
  249. package/lib/util/nice-grpc.js.map +1 -0
  250. package/lib/util/parse-workspace-id.d.ts +1 -1
  251. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  252. package/lib/util/parse-workspace-id.js +2 -3
  253. package/lib/util/parse-workspace-id.js.map +1 -1
  254. package/lib/util/parse-workspace-id.spec.d.ts +1 -1
  255. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  256. package/lib/util/parse-workspace-id.spec.js +1 -1
  257. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  258. package/lib/util/queue.d.ts +1 -1
  259. package/lib/util/queue.js +1 -1
  260. package/lib/util/queue.spec.d.ts +1 -1
  261. package/lib/util/queue.spec.js +10 -7
  262. package/lib/util/queue.spec.js.map +1 -1
  263. package/lib/util/repeat.d.ts +1 -1
  264. package/lib/util/repeat.js +1 -1
  265. package/lib/util/semaphore.d.ts +1 -1
  266. package/lib/util/semaphore.d.ts.map +1 -1
  267. package/lib/util/semaphore.js +1 -1
  268. package/lib/util/semaphore.js.map +1 -1
  269. package/lib/util/skip-if.d.ts +1 -1
  270. package/lib/util/skip-if.d.ts.map +1 -1
  271. package/lib/util/skip-if.js +1 -1
  272. package/lib/util/skip-if.js.map +1 -1
  273. package/lib/util/timeutil.d.ts +3 -1
  274. package/lib/util/timeutil.d.ts.map +1 -1
  275. package/lib/util/timeutil.js +16 -4
  276. package/lib/util/timeutil.js.map +1 -1
  277. package/lib/util/timeutil.spec.d.ts +3 -1
  278. package/lib/util/timeutil.spec.d.ts.map +1 -1
  279. package/lib/util/timeutil.spec.js +35 -1
  280. package/lib/util/timeutil.spec.js.map +1 -1
  281. package/lib/util/tracing.d.ts +7 -7
  282. package/lib/util/tracing.d.ts.map +1 -1
  283. package/lib/util/tracing.js +15 -17
  284. package/lib/util/tracing.js.map +1 -1
  285. package/lib/util/tracing.spec.d.ts +1 -1
  286. package/lib/util/tracing.spec.js +4 -4
  287. package/lib/util/tracing.spec.js.map +1 -1
  288. package/lib/util/workspace-port-authentication.d.ts +8 -8
  289. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  290. package/lib/util/workspace-port-authentication.js +9 -12
  291. package/lib/util/workspace-port-authentication.js.map +1 -1
  292. package/lib/webhook-event.d.ts +44 -0
  293. package/lib/webhook-event.d.ts.map +1 -0
  294. package/lib/webhook-event.js +8 -0
  295. package/lib/webhook-event.js.map +1 -0
  296. package/lib/workspace-class.d.ts +14 -0
  297. package/lib/workspace-class.d.ts.map +1 -0
  298. package/lib/workspace-class.js +8 -0
  299. package/lib/workspace-class.js.map +1 -0
  300. package/lib/workspace-cluster.d.ts +13 -14
  301. package/lib/workspace-cluster.d.ts.map +1 -1
  302. package/lib/workspace-cluster.js +3 -5
  303. package/lib/workspace-cluster.js.map +1 -1
  304. package/lib/workspace-instance.d.ts +22 -4
  305. package/lib/workspace-instance.d.ts.map +1 -1
  306. package/lib/workspace-instance.js +1 -1
  307. package/lib/wsready.d.ts +8 -2
  308. package/lib/wsready.d.ts.map +1 -1
  309. package/lib/wsready.js +3 -3
  310. package/package.json +14 -6
  311. package/pkg-yarn.lock +10 -5
  312. package/provenance-bundle.jsonl +1 -1
  313. package/src/accounting-protocol.ts +67 -52
  314. package/src/admin-protocol.ts +48 -22
  315. package/src/analytics.ts +22 -22
  316. package/src/attribution.ts +63 -0
  317. package/src/auth.ts +3 -3
  318. package/src/billing-mode.ts +84 -0
  319. package/src/blocked-repositories-protocol.ts +13 -0
  320. package/src/context-url.spec.ts +18 -22
  321. package/src/context-url.ts +79 -79
  322. package/src/encryption/container-module.ts +3 -4
  323. package/src/encryption/encryption-engine.spec.ts +10 -9
  324. package/src/encryption/encryption-engine.ts +21 -17
  325. package/src/encryption/encryption-service.ts +5 -6
  326. package/src/encryption/key-provider.ts +17 -20
  327. package/src/env.ts +2 -25
  328. package/src/experiments/always-default.ts +24 -0
  329. package/src/experiments/configcat-server.ts +42 -0
  330. package/src/experiments/configcat.ts +56 -0
  331. package/src/experiments/types.ts +34 -0
  332. package/src/gitpod-file-parser.spec.ts +56 -62
  333. package/src/gitpod-file-parser.ts +17 -18
  334. package/src/gitpod-service.ts +216 -140
  335. package/src/headless-workspace-log.ts +7 -5
  336. package/src/ide-frontend-service.ts +3 -3
  337. package/src/ide-protocol.ts +38 -10
  338. package/src/index.ts +17 -17
  339. package/src/installation-admin-protocol.ts +12 -9
  340. package/src/license-protocol.ts +13 -7
  341. package/src/messaging/browser/connection.ts +45 -47
  342. package/src/messaging/browser/window-connection.ts +40 -30
  343. package/src/messaging/client-call-metrics.ts +79 -82
  344. package/src/messaging/error.ts +30 -8
  345. package/src/messaging/handler.ts +6 -6
  346. package/src/messaging/node/connection.ts +8 -8
  347. package/src/messaging/proxy-factory.ts +23 -30
  348. package/src/oss-allowlist.ts +4 -4
  349. package/src/payment-protocol.ts +3 -3
  350. package/src/permission.ts +21 -32
  351. package/src/plans.ts +241 -190
  352. package/src/protocol.spec.ts +97 -0
  353. package/src/protocol.ts +524 -265
  354. package/src/snapshot-url.spec.ts +10 -8
  355. package/src/snapshot-url.ts +1 -1
  356. package/src/team-subscription-protocol.ts +60 -23
  357. package/src/teams-projects-protocol.ts +36 -12
  358. package/src/typings/globals.ts +5 -5
  359. package/src/usage.ts +85 -0
  360. package/src/util/analytics.ts +47 -43
  361. package/src/util/async-iterator.ts +5 -6
  362. package/src/util/cancelable.ts +4 -4
  363. package/src/util/date-time.ts +9 -9
  364. package/src/util/debug-app.ts +81 -0
  365. package/src/util/deep-partial.ts +1 -1
  366. package/src/util/deferred.ts +7 -7
  367. package/src/util/disposable.ts +3 -6
  368. package/src/util/event.ts +9 -11
  369. package/src/util/garbage-collected-cache.ts +9 -7
  370. package/src/util/generate-workspace-id.spec.ts +27 -17
  371. package/src/util/generate-workspace-id.ts +461 -455
  372. package/src/util/gitpod-cookie.ts +9 -10
  373. package/src/util/gitpod-host-url.spec.ts +41 -14
  374. package/src/util/gitpod-host-url.ts +69 -37
  375. package/src/util/grpc.ts +94 -2
  376. package/src/util/jaeger-client-types.ts +3 -3
  377. package/src/util/logging.spec.ts +23 -0
  378. package/src/util/logging.ts +61 -43
  379. package/src/util/make-link.ts +7 -8
  380. package/src/util/nice-grpc.ts +96 -0
  381. package/src/util/parse-workspace-id.spec.ts +18 -9
  382. package/src/util/parse-workspace-id.ts +6 -7
  383. package/src/util/queue.spec.ts +28 -26
  384. package/src/util/queue.ts +1 -1
  385. package/src/util/repeat.ts +2 -2
  386. package/src/util/semaphore.ts +5 -7
  387. package/src/util/skip-if.ts +10 -7
  388. package/src/util/timeutil.spec.ts +41 -15
  389. package/src/util/timeutil.ts +28 -12
  390. package/src/util/tracing.spec.ts +29 -24
  391. package/src/util/tracing.ts +55 -52
  392. package/src/util/workspace-port-authentication.ts +11 -14
  393. package/src/webhook-event.ts +55 -0
  394. package/src/workspace-class.ts +14 -0
  395. package/src/workspace-cluster.ts +25 -19
  396. package/src/workspace-instance.ts +67 -25
  397. package/src/wsready.ts +11 -4
  398. package/data/builtin-theia-plugins.json +0 -372
  399. package/lib/email-protocol.d.ts +0 -49
  400. package/lib/email-protocol.d.ts.map +0 -1
  401. package/lib/email-protocol.js +0 -28
  402. package/lib/email-protocol.js.map +0 -1
  403. package/lib/theia-plugins.d.ts +0 -11
  404. package/lib/theia-plugins.d.ts.map +0 -1
  405. package/lib/theia-plugins.js +0 -8
  406. package/lib/theia-plugins.js.map +0 -1
  407. package/src/email-protocol.ts +0 -66
  408. package/src/theia-plugins.ts +0 -11
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
- import * as fs from 'fs';
8
- import { filePathTelepresenceAware } from './env';
7
+ import * as fs from "fs";
8
+ import { filePathTelepresenceAware } from "./env";
9
9
  import { DeepPartial } from "./util/deep-partial";
10
- import { PermissionName } from './permission';
10
+ import { PermissionName } from "./permission";
11
11
 
12
12
  export interface WorkspaceCluster {
13
13
  // Name of the workspace cluster.
@@ -15,6 +15,10 @@ export interface WorkspaceCluster {
15
15
  // Must be identical to the installationShortname of the cluster it represents!
16
16
  name: string;
17
17
 
18
+ // The name of the application cluster to which this cluster should be registered.
19
+ // The name can be at most 60 characters.
20
+ applicationCluster: string;
21
+
18
22
  // URL of the cluster's ws-manager API
19
23
  url: string;
20
24
 
@@ -47,25 +51,26 @@ export interface TLSConfig {
47
51
  crt: string;
48
52
  }
49
53
  export namespace TLSConfig {
50
- export const loadFromBase64File = (path: string): string => fs.readFileSync(filePathTelepresenceAware(path)).toString("base64");
54
+ export const loadFromBase64File = (path: string): string =>
55
+ fs.readFileSync(filePathTelepresenceAware(path)).toString("base64");
51
56
  }
52
57
  export type WorkspaceClusterWoTLS = Omit<WorkspaceCluster, "tls">;
53
58
  export type WorkspaceManagerConnectionInfo = Pick<WorkspaceCluster, "name" | "url" | "tls">;
54
59
 
55
- export type AdmissionConstraint = AdmissionConstraintFeaturePreview | AdmissionConstraintHasPermission | AdmissionConstraintHasUserLevel | AdmissionConstraintHasMoreResources;
60
+ export type AdmissionConstraint =
61
+ | AdmissionConstraintFeaturePreview
62
+ | AdmissionConstraintHasPermission
63
+ | AdmissionConstraintHasClass;
56
64
  export type AdmissionConstraintFeaturePreview = { type: "has-feature-preview" };
57
- export type AdmissionConstraintHasPermission = { type: "has-permission", permission: PermissionName };
58
- export type AdmissionConstraintHasUserLevel = { type: "has-user-level", level: string };
59
- export type AdmissionConstraintHasMoreResources = { type: "has-more-resources" };
65
+ export type AdmissionConstraintHasPermission = { type: "has-permission"; permission: PermissionName };
66
+ export type AdmissionConstraintHasClass = { type: "has-class"; id: string; displayName: string };
60
67
 
61
68
  export namespace AdmissionConstraint {
62
69
  export function is(o: any): o is AdmissionConstraint {
63
- return !!o
64
- && 'type' in o;
70
+ return !!o && "type" in o;
65
71
  }
66
72
  export function isHasPermissionConstraint(o: any): o is AdmissionConstraintHasPermission {
67
- return is(o)
68
- && o.type === "has-permission";
73
+ return is(o) && o.type === "has-permission";
69
74
  }
70
75
  export function hasPermission(ac: AdmissionConstraint, permission: PermissionName): boolean {
71
76
  return isHasPermissionConstraint(ac) && ac.permission === permission;
@@ -85,20 +90,21 @@ export interface WorkspaceClusterDB {
85
90
  * Deletes the cluster identified by this name, if any.
86
91
  * @param name
87
92
  */
88
- deleteByName(name: string): Promise<void>;
93
+ deleteByName(name: string, applicationCluster: string): Promise<void>;
89
94
 
90
95
  /**
91
96
  * Finds a WorkspaceCluster with the given name. If there is none, `undefined` is returned.
92
97
  * @param name
93
98
  */
94
- findByName(name: string): Promise<WorkspaceCluster | undefined>;
99
+ findByName(name: string, applicationCluster: string): Promise<WorkspaceCluster | undefined>;
95
100
 
96
101
  /**
97
102
  * Lists all WorkspaceClusterWoTls for which the given predicate is true (does not return TLS for size/speed concerns)
98
103
  * @param predicate
99
104
  */
100
- findFiltered(predicate: DeepPartial<WorkspaceClusterFilter>): Promise<WorkspaceClusterWoTLS[]>;
105
+ findFiltered(predicate: WorkspaceClusterFilter): Promise<WorkspaceClusterWoTLS[]>;
101
106
  }
102
- export interface WorkspaceClusterFilter extends Pick<WorkspaceCluster, "state" | "govern" | "url"> {
103
- minScore: number;
104
- }
107
+
108
+ export type WorkspaceClusterFilter = Pick<WorkspaceCluster, "applicationCluster"> &
109
+ DeepPartial<Pick<WorkspaceCluster, "name" | "state" | "govern" | "url">> &
110
+ Partial<{ minScore: number }>;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { NamedWorkspaceFeatureFlag } from "./protocol";
@@ -55,11 +55,28 @@ export interface WorkspaceInstance {
55
55
  /**
56
56
  * Contains information about the image build, if there was any
57
57
  */
58
- imageBuildInfo?: ImageBuildInfo;
58
+ imageBuildInfo?: ImageBuildInfo;
59
+
60
+ /**
61
+ * workspace class, also known as workspace size, determines the type of
62
+ * resources that are provided to the workspace.
63
+ */
64
+ workspaceClass?: string;
65
+
66
+ /**
67
+ * Identifies the team or user to which this instance's runtime should be attributed to
68
+ * (e.g. for usage analytics or billing purposes).
69
+ */
70
+ usageAttributionId?: string;
59
71
  }
60
72
 
61
73
  // WorkspaceInstanceStatus describes the current state of a workspace instance
62
74
  export interface WorkspaceInstanceStatus {
75
+ // version is the current version of the workspace instance status
76
+ // Note: consider this value opague. The only guarantee given is that it imposes
77
+ // a partial order on status updates, i.e. a.version > b.version -> a newer than b.
78
+ version?: number;
79
+
63
80
  // phase describes a high-level state of the workspace instance
64
81
  phase: WorkspaceInstancePhase;
65
82
 
@@ -95,49 +112,54 @@ export interface WorkspaceInstanceStatus {
95
112
  export type WorkspaceInstancePhase =
96
113
  // unknown indicates an issue within the system in that it cannot determine the actual phase of
97
114
  // a workspace. This phase is usually accompanied by an error.
98
- "unknown" |
115
+ | "unknown"
99
116
 
100
117
  // Preparing means that we haven't actually started the workspace instance just yet, but rather
101
- // are still preparing for launch. This means we're building the Docker image for the workspace.
102
- "preparing" |
118
+ // are still preparing for launch.
119
+ | "preparing"
120
+
121
+ // Building means that we are building the Docker image for the workspace. A workspace will enter this phase only
122
+ // if an image build is required for that workspace.
123
+ | "building"
103
124
 
104
125
  // Pending means the workspace does not yet consume resources in the cluster, but rather is looking for
105
126
  // some space within the cluster. If for example the cluster needs to scale up to accomodate the
106
127
  // workspace, the workspace will be in Pending state until that happened.
107
- "pending" |
128
+ | "pending"
108
129
 
109
130
  // Creating means the workspace is currently being created. Thati includes downloading the images required
110
131
  // to run the workspace over the network. The time spent in this phase varies widely and depends on the current
111
132
  // network speed, image size and cache states.
112
- "creating" |
133
+ | "creating"
113
134
 
114
135
  // Initializing is the phase in which the workspace is executing the appropriate workspace initializer (e.g. Git
115
136
  // clone or backup download). After this phase one can expect the workspace to either be Running or Failed.
116
- "initializing" |
137
+ | "initializing"
117
138
 
118
139
  // Running means the workspace is able to actively perform work, either by serving a user through Theia,
119
140
  // or as a headless workspace.
120
- "running" |
141
+ | "running"
121
142
 
122
143
  // Interrupted is an exceptional state where the container should be running but is temporarily unavailable.
123
144
  // When in this state, we expect it to become running or stopping anytime soon.
124
- "interrupted" |
145
+ | "interrupted"
125
146
 
126
147
  // Stopping means that the workspace is currently shutting down. It could go to stopped every moment.
127
- "stopping" |
148
+ | "stopping"
128
149
 
129
150
  // Stopped means the workspace ended regularly because it was shut down.
130
- "stopped";
151
+ | "stopped";
131
152
 
132
153
  export interface WorkspaceInstanceConditions {
133
154
  // Failed contains the reason the workspace failed to operate. If this field is empty, the workspace has not failed.
134
- failed?: string
155
+ // failed contains technical details for the failure of the workspace.
156
+ failed?: string;
135
157
 
136
158
  // timeout contains the reason the workspace has timed out. If this field is empty, the workspace has not timed out.
137
- timeout?: string
159
+ timeout?: string;
138
160
 
139
161
  // PullingImages marks if the workspace is currently pulling its images. This condition can only be set during PhaseCreating
140
- pullingImages?: boolean
162
+ pullingImages?: boolean;
141
163
 
142
164
  // deployed marks that a workspace instance was sent/deployed at a workspace manager
143
165
  deployed?: boolean;
@@ -148,7 +170,10 @@ export interface WorkspaceInstanceConditions {
148
170
  // ISO8601 timestamp when the first user activity was registered in the frontend. Only set if the workspace is running.
149
171
  firstUserActivity?: string;
150
172
 
151
- // headless_task_failed indicates that a headless workspace task failed
173
+ // headlessTaskFailed indicates that a headless workspace task failed
174
+ // headlessTaskFailed is only set if:
175
+ // * this workspace is headless
176
+ // * the task being run returned a non 0 exit status code
152
177
  headlessTaskFailed?: string;
153
178
 
154
179
  // stopped_by_request is true if the workspace was stopped using a StopWorkspace call
@@ -156,10 +181,10 @@ export interface WorkspaceInstanceConditions {
156
181
  }
157
182
 
158
183
  // AdmissionLevel describes who can access a workspace instance and its ports.
159
- export type AdmissionLevel = 'owner_only' | 'everyone';
184
+ export type AdmissionLevel = "owner_only" | "everyone";
160
185
 
161
186
  // PortVisibility describes how a port can be accessed
162
- export type PortVisibility = 'public' | 'private';
187
+ export type PortVisibility = "public" | "private";
163
188
 
164
189
  // WorkspaceInstancePort describes a port exposed on a workspace instance
165
190
  export interface WorkspaceInstancePort {
@@ -185,19 +210,25 @@ export interface WorkspaceInstanceRepoStatus {
185
210
  uncommitedFiles?: string[];
186
211
 
187
212
  // the total number of uncommited files
188
- totalUncommitedFiles?: number
213
+ totalUncommitedFiles?: number;
189
214
 
190
215
  // untrackedFiles is the list of untracked files in the workspace, possibly truncated
191
216
  untrackedFiles?: string[];
192
217
 
193
218
  // the total number of untracked files
194
- totalUntrackedFiles?: number
219
+ totalUntrackedFiles?: number;
195
220
 
196
221
  // unpushedCommits is the list of unpushed changes in the workspace, possibly truncated
197
222
  unpushedCommits?: string[];
198
223
 
199
224
  // the total number of unpushed changes
200
- totalUnpushedCommits?: number
225
+ totalUnpushedCommits?: number;
226
+ }
227
+
228
+ // ConfigurationIdeConfig ide config of WorkspaceInstanceConfiguration
229
+ export interface ConfigurationIdeConfig {
230
+ useLatest?: boolean;
231
+ desktopIdeAlias?: string;
201
232
  }
202
233
 
203
234
  // WorkspaceInstanceConfiguration contains all per-instance configuration
@@ -212,24 +243,35 @@ export interface WorkspaceInstanceConfiguration {
212
243
  // ideImage is the ref of the IDE image this instance uses.
213
244
  ideImage: string;
214
245
 
246
+ // ideImageLayers are images needed for the ide to run,
247
+ // including ide-desktop, desktop-plugin and so on
248
+ ideImageLayers?: string[];
249
+
215
250
  // desktopIdeImage is the ref of the desktop IDE image this instance uses.
216
- desktopIdeImage?: string
251
+ // @deprected: replaced with the ideImageLayers field
252
+ desktopIdeImage?: string;
253
+
254
+ // desktopIdePluginImage is the ref of the desktop IDE plugin image this instance uses.
255
+ // @deprected: replaced with the desktopIdePluginImage field
256
+ desktopIdePluginImage?: string;
217
257
 
218
258
  // supervisorImage is the ref of the supervisor image this instance uses.
219
259
  supervisorImage?: string;
260
+
261
+ ideConfig?: ConfigurationIdeConfig;
220
262
  }
221
263
 
222
264
  /**
223
265
  * Holds information about the image build (if there was one) for this WorkspaceInstance
224
266
  */
225
267
  export interface ImageBuildInfo {
226
- log?: ImageBuildLogInfo,
268
+ log?: ImageBuildLogInfo;
227
269
  }
228
270
 
229
271
  /**
230
272
  * Holds information about how to access logs for this an image build
231
273
  */
232
274
  export interface ImageBuildLogInfo {
233
- url: string,
234
- headers: { [key: string]: string },
275
+ url: string;
276
+ headers: { [key: string]: string };
235
277
  }
package/src/wsready.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
2
+ * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
- // generated using github.com/32leaves/bel on 2021-11-04 12:16:53.917570766 +0000 UTC m=+0.006002884
7
+ // generated using github.com/32leaves/bel on 2022-11-25 13:39:08.995865257 +0000 UTC m=+0.015035221
8
8
  // DO NOT MODIFY
9
9
 
10
10
  export enum WorkspaceInitSource {
@@ -13,5 +13,12 @@ export enum WorkspaceInitSource {
13
13
  WorkspaceInitFromOther = "from-other",
14
14
  }
15
15
  export interface WorkspaceReadyMessage {
16
- source: WorkspaceInitSource
16
+ source: WorkspaceInitSource;
17
+ metrics: InitializerMetric[];
18
+ }
19
+
20
+ export interface InitializerMetric {
21
+ type: string;
22
+ duration: number;
23
+ size: number;
17
24
  }