aspera-cli 4.27.5 → 4.28.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 (139) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +160 -4
  4. data/CONTRIBUTING.md +4 -2
  5. data/README.md +1 -1
  6. data/bin/asession +1 -1
  7. data/docs/README.md +1086 -331
  8. data/docs/test-mcp-with-ai.md +5 -3
  9. data/lib/aspera/agent/direct.rb +15 -4
  10. data/lib/aspera/agent/factory.rb +2 -1
  11. data/lib/aspera/agent/node.rb +1 -1
  12. data/lib/aspera/api/cos_node.rb +1 -1
  13. data/lib/aspera/api/faspex.rb +1 -1
  14. data/lib/aspera/api/node.rb +6 -2
  15. data/lib/aspera/ascp/installation.rb +47 -11
  16. data/lib/aspera/ascp/management.rb +89 -43
  17. data/lib/aspera/cli/ascp_actions.rb +5 -19
  18. data/lib/aspera/cli/bootstrapper.rb +1 -2
  19. data/lib/aspera/cli/command_registry.rb +43 -3
  20. data/lib/aspera/cli/command_spec.rb +3 -0
  21. data/lib/aspera/cli/completion/ascli.bash +39 -5
  22. data/lib/aspera/cli/completion/ascli.fish +16 -8
  23. data/lib/aspera/cli/completion/ascli.ps1 +41 -0
  24. data/lib/aspera/cli/completion/ascli.zsh +20 -4
  25. data/lib/aspera/cli/completion_actions.rb +360 -0
  26. data/lib/aspera/cli/error.rb +42 -0
  27. data/lib/aspera/cli/extended_value.rb +30 -5
  28. data/lib/aspera/cli/formatter.rb +118 -56
  29. data/lib/aspera/cli/hints.rb +0 -1
  30. data/lib/aspera/cli/http.rb +6 -5
  31. data/lib/aspera/cli/info.rb +10 -4
  32. data/lib/aspera/cli/mailer.rb +1 -1
  33. data/lib/aspera/cli/mcp/http_servlet.rb +156 -0
  34. data/lib/aspera/cli/mcp/secrets.rb +143 -0
  35. data/lib/aspera/cli/mcp/tool.rb +231 -0
  36. data/lib/aspera/cli/option_value.rb +9 -1
  37. data/lib/aspera/cli/options.schema.yaml +390 -39
  38. data/lib/aspera/cli/parser.rb +14 -5
  39. data/lib/aspera/cli/plugins/aoc.rb +8 -11
  40. data/lib/aspera/cli/plugins/base.rb +36 -15
  41. data/lib/aspera/cli/plugins/config.rb +15 -44
  42. data/lib/aspera/cli/plugins/console.rb +3 -1
  43. data/lib/aspera/cli/plugins/factory.rb +1 -1
  44. data/lib/aspera/cli/plugins/faspex5.rb +9 -19
  45. data/lib/aspera/cli/plugins/faspio.rb +36 -5
  46. data/lib/aspera/cli/plugins/httpgw.rb +1 -0
  47. data/lib/aspera/cli/plugins/mcp.rb +177 -118
  48. data/lib/aspera/cli/plugins/node.rb +14 -8
  49. data/lib/aspera/cli/plugins/orchestrator.rb +351 -38
  50. data/lib/aspera/cli/plugins/server.rb +3 -1
  51. data/lib/aspera/cli/plugins/shares.rb +205 -35
  52. data/lib/aspera/cli/preset_actions.rb +15 -7
  53. data/lib/aspera/cli/preset_manager.rb +24 -2
  54. data/lib/aspera/cli/prompt.rb +3 -1
  55. data/lib/aspera/cli/result.rb +17 -4
  56. data/lib/aspera/cli/runner.rb +133 -43
  57. data/lib/aspera/cli/security.rb +134 -0
  58. data/lib/aspera/cli/table_fitter.rb +116 -0
  59. data/lib/aspera/cli/terminal_formatter.rb +23 -34
  60. data/lib/aspera/cli/transfer_agent.rb +4 -1
  61. data/lib/aspera/cli/vault_manager.rb +6 -5
  62. data/lib/aspera/cli/version.rb +1 -1
  63. data/lib/aspera/cli/web_secret.html.erb +61 -0
  64. data/lib/aspera/cli/web_secret.rb +220 -0
  65. data/lib/aspera/cli/wizard.rb +19 -9
  66. data/lib/aspera/command_line_builder.rb +26 -0
  67. data/lib/aspera/data_repository.rb +38 -24
  68. data/lib/aspera/duration.rb +42 -0
  69. data/lib/aspera/environment.rb +88 -24
  70. data/lib/aspera/exec_spec.rb +6 -5
  71. data/lib/aspera/faspex_gw.rb +98 -32
  72. data/lib/aspera/faspex_postproc.rb +187 -44
  73. data/lib/aspera/formatter_interface.rb +0 -1
  74. data/lib/aspera/id_generator.rb +2 -1
  75. data/lib/aspera/json_rpc/client.rb +51 -32
  76. data/lib/aspera/json_rpc/version.rb +1 -0
  77. data/lib/aspera/keychain/base.rb +5 -0
  78. data/lib/aspera/keychain/encrypted_hash.rb +6 -2
  79. data/lib/aspera/keychain/factory.rb +2 -3
  80. data/lib/aspera/keychain/hashicorp_vault.rb +7 -4
  81. data/lib/aspera/keychain/macos_security.rb +119 -13
  82. data/lib/aspera/keychain/one_password_api.rb +8 -3
  83. data/lib/aspera/keychain/one_password_base.rb +14 -9
  84. data/lib/aspera/keychain/one_password_cli.rb +4 -2
  85. data/lib/aspera/log.rb +3 -6
  86. data/lib/aspera/markdown.rb +152 -115
  87. data/lib/aspera/mime.rb +6 -0
  88. data/lib/aspera/nagios.rb +3 -1
  89. data/lib/aspera/node_emulator.rb +98 -101
  90. data/lib/aspera/oauth/{base.rb → client/base.rb} +5 -4
  91. data/lib/aspera/oauth/{boot.rb → client/boot.rb} +3 -2
  92. data/lib/aspera/oauth/{factory.rb → client/factory.rb} +7 -0
  93. data/lib/aspera/oauth/{generic.rb → client/generic.rb} +1 -1
  94. data/lib/aspera/oauth/{json_credentials.rb → client/json_credentials.rb} +1 -1
  95. data/lib/aspera/oauth/{jwt.rb → client/jwt.rb} +1 -1
  96. data/lib/aspera/oauth/{url_json.rb → client/url_json.rb} +1 -1
  97. data/lib/aspera/oauth/{web.rb → client/web.rb} +2 -2
  98. data/lib/aspera/oauth/server/authorize.html.erb +34 -0
  99. data/lib/aspera/oauth/server/pkce.rb +426 -0
  100. data/lib/aspera/orchestrator_workflow_checker.rb +561 -0
  101. data/lib/aspera/preview/terminal.rb +3 -2
  102. data/lib/aspera/rainbow.rb +27 -1
  103. data/lib/aspera/rest/aspera_errors.rb +51 -59
  104. data/lib/aspera/rest/client.rb +21 -14
  105. data/lib/aspera/rest/error_analyzer.rb +9 -0
  106. data/lib/aspera/rest/list.rb +6 -6
  107. data/lib/aspera/rest/util.rb +7 -1
  108. data/lib/aspera/rest.rb +0 -1
  109. data/lib/aspera/schema/IBM Aspera Faspex API-5.0-enhanced.yaml +0 -2
  110. data/lib/aspera/schema/IBM Aspera Orchestrator API-v1-enhanced.yaml +4001 -0
  111. data/lib/aspera/schema/IBM Aspera faspio Gateway API-1.0.0-enhanced.yaml +1097 -0
  112. data/lib/aspera/schema/IBM Aspera on Cloud Automation API-1.0.5-enhanced.yaml +35 -35
  113. data/lib/aspera/schema/IBM_Aspera_Shares.yaml +819 -7
  114. data/lib/aspera/schema/documentation.rb +50 -78
  115. data/lib/aspera/schema/reader.rb +39 -11
  116. data/lib/aspera/schema/registry.rb +8 -2
  117. data/lib/aspera/secret_hider.rb +94 -15
  118. data/lib/aspera/secret_strength.rb +114 -0
  119. data/lib/aspera/servlet_helpers.rb +111 -0
  120. data/lib/aspera/sync/args.schema.yaml +3 -1
  121. data/lib/aspera/sync/conf.schema.yaml +16 -6
  122. data/lib/aspera/sync/operations.rb +21 -1
  123. data/lib/aspera/temp_file_manager.rb +79 -20
  124. data/lib/aspera/transfer/parameters.rb +5 -0
  125. data/lib/aspera/transfer/spec.rb +52 -12
  126. data/lib/aspera/transfer/spec.schema.yaml +8 -5
  127. data/lib/aspera/web_auth/index.html.erb +16 -0
  128. data/lib/aspera/web_auth/server.rb +18 -10
  129. data/lib/aspera/web_page.html.erb +262 -0
  130. data/lib/aspera/web_page.rb +61 -0
  131. data/lib/aspera/web_server_simple.rb +76 -10
  132. data.tar.gz.sig +0 -0
  133. metadata +47 -32
  134. metadata.gz.sig +0 -0
  135. data/lib/aspera/cli/mcp_tool.rb +0 -189
  136. data/lib/aspera/oauth.rb +0 -9
  137. data/lib/aspera/schema/IBM Aspera Orchestrator API-v1.yaml +0 -1784
  138. data/lib/aspera/schema/IBM Aspera faspio Gateway API-1.0.0.yaml +0 -249
  139. data/lib/aspera/web_auth/index.html +0 -147
@@ -1,249 +0,0 @@
1
- # DO NOT EDIT THIS FILE MANUALLY
2
- # This file is automatically downloaded from:
3
- # https://raw.githubusercontent.com/laurent-martin/aspera-api-examples/refs/heads/main/openapi/IBM%20Aspera%20faspio%20Gateway%20API-1.0.0.yaml
4
- # Use 'rake tools:openapi' to update this file
5
-
6
- openapi: 3.0.1
7
- info:
8
- title: IBM Aspera faspio Gateway API
9
- description: API for IBM Aspera faspio Gateway Management
10
- contact:
11
- name: IBM Aspera
12
- email: Aspera-client-team@wwpdl.vnet.ibm.com
13
- license:
14
- name: (c) IBM. All rights reserved
15
- url: >-
16
- https://www-40.ibm.com/software/sla/sladb.nsf/displaylis/0CF8A1C0BA2B994C002587F70069A8B5?OpenDocument
17
- version: 1.0.0
18
- externalDocs:
19
- description: IBM Aspera faspio Gateway Documentation
20
- url: https://www.ibm.com/docs/en/faspio-gateway
21
- tags:
22
- - name: /bridges
23
- paths:
24
- /bridges:
25
- get:
26
- tags:
27
- - /bridges
28
- summary: Get a Listing of All Bridges
29
- description: Retrieve a listing of all configured bridges.
30
- operationId: getBridges
31
- responses:
32
- '200':
33
- description: OK
34
- content:
35
- application/json:
36
- schema:
37
- type: array
38
- items:
39
- $ref: '#/components/schemas/bridges_response'
40
- '401':
41
- description: Unauthorized
42
- post:
43
- tags:
44
- - /bridges
45
- summary: Create a New Bridge
46
- description: Create a new bridge.
47
- operationId: addBridge
48
- requestBody:
49
- content:
50
- application/json:
51
- schema:
52
- $ref: '#/components/schemas/bridges_params'
53
- required: true
54
- responses:
55
- '201':
56
- description: Created
57
- content:
58
- application/json:
59
- schema:
60
- type: array
61
- items:
62
- $ref: '#/components/schemas/bridges_response'
63
- '401':
64
- description: Unauthorized
65
- '415':
66
- description: Unsupported Media Type
67
- '422':
68
- description: Unprocessable Entity
69
- '500':
70
- description: Internal Server Error
71
- x-codegen-request-body-name: body
72
- /bridges/{id}:
73
- get:
74
- tags:
75
- - /bridges
76
- summary: Get Information on a Specific Bridge
77
- description: Retrieve information on a specific bridge.
78
- operationId: getBridgeById
79
- parameters:
80
- - name: id
81
- in: path
82
- required: true
83
- schema:
84
- type: string
85
- responses:
86
- '200':
87
- description: OK
88
- content:
89
- application/json:
90
- schema:
91
- $ref: '#/components/schemas/bridges_response'
92
- '400':
93
- description: Bad Request
94
- '401':
95
- description: Unauthorized
96
- '404':
97
- description: Not Found
98
- delete:
99
- tags:
100
- - /bridges
101
- summary: Delete a Specific Bridge
102
- description: Delete a specific bridge.
103
- operationId: deleteBridgeById
104
- parameters:
105
- - name: id
106
- in: path
107
- required: true
108
- schema:
109
- type: string
110
- responses:
111
- '204':
112
- description: No Content
113
- '400':
114
- description: Bad Request
115
- '401':
116
- description: Unauthorized
117
- '404':
118
- description: Not Found
119
- '500':
120
- description: Internal Server Error
121
- servers:
122
- - url: http://127.0.0.1:8080
123
- security:
124
- - basicAuth: []
125
- - bearerAuth: []
126
- - {}
127
- components:
128
- schemas:
129
- bridges_params:
130
- required:
131
- - name
132
- - local
133
- - forward
134
- type: object
135
- properties:
136
- forward:
137
- type: object
138
- required:
139
- - port
140
- - protocol
141
- - tls_enabled
142
- properties:
143
- host:
144
- type: array
145
- items:
146
- type: string
147
- example:
148
- - GW2
149
- - 10.0.0.2
150
- bind_address:
151
- type: string
152
- example: 127.0.0.1
153
- port:
154
- type: string
155
- example: 3000-3001
156
- protocol:
157
- type: string
158
- example: fasp
159
- tls_enabled:
160
- type: boolean
161
- example: false
162
- local:
163
- type: object
164
- required:
165
- - bind_address
166
- - port
167
- - protocol
168
- - tls_enabled
169
- properties:
170
- bind_address:
171
- type: string
172
- example: 127.0.0.1
173
- port:
174
- type: string
175
- example: 2000-2001
176
- protocol:
177
- type: string
178
- example: tcp
179
- tls_enabled:
180
- type: boolean
181
- example: false
182
- name:
183
- type: string
184
- example: Bridge-1
185
- bridges_response:
186
- type: object
187
- properties:
188
- id:
189
- type: string
190
- example: 1
191
- name:
192
- type: string
193
- example: Bridge-1
194
- local:
195
- type: object
196
- properties:
197
- bind_address:
198
- type: string
199
- example: 127.0.0.1
200
- ports:
201
- type: array
202
- items:
203
- type: integer
204
- example:
205
- - 2000
206
- - 2001
207
- protocol:
208
- type: string
209
- example: tcp
210
- tls_enabled:
211
- type: boolean
212
- example: false
213
- forward:
214
- type: object
215
- properties:
216
- bind_address:
217
- type: string
218
- example: 127.0.0.1
219
- hosts:
220
- type: array
221
- items:
222
- type: string
223
- example:
224
- - GW2
225
- - 10.0.0.2
226
- ports:
227
- type: array
228
- items:
229
- type: integer
230
- example:
231
- - 3000
232
- - 3001
233
- protocol:
234
- type: string
235
- example: fasp
236
- tls_enabled:
237
- type: boolean
238
- example: false
239
- securitySchemes:
240
- basicAuth:
241
- type: http
242
- scheme: basic
243
- bearerAuth:
244
- type: http
245
- scheme: bearer
246
- bearerFormat: JWT
247
- description: >-
248
- Consult the documentation for requesting a JWT bearer token from the
249
- server.
@@ -1,147 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <link rel="icon" type="image/svg+xml"
7
- href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIiBmaWxsPSJub25lIiBzdHJva2U9IiMyMjIiIHN0cm9rZS13aWR0aD0iMyI+CiAgPGxpbmUgeDE9IjMiIHkxPSIzIiB4Mj0iMjkiIHkyPSIyOSIgIHN0cm9rZT0icmVkIi8+CiAgPGxpbmUgeDE9IjI5IiB5MT0iMyIgeDI9IjMiIHkyPSIyOSIgc3Ryb2tlPSJyZWQiIC8+Cjwvc3ZnPg==">
8
- <title>Close Now</title>
9
- <style>
10
- body {
11
- font-family: Arial, sans-serif;
12
- text-align: center;
13
- padding: 2rem;
14
- margin: 0;
15
- background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
16
- color: #333;
17
- overflow: hidden;
18
- /* Ensure no scrollbars for the background animation */
19
- position: relative;
20
- }
21
-
22
- h1 {
23
- font-size: 2.5rem;
24
- color: #0078d4;
25
- }
26
-
27
- p {
28
- font-size: 1.2rem;
29
- margin-top: 1rem;
30
- }
31
-
32
- /* Styling for animated IBM logos */
33
- .logo {
34
- position: absolute;
35
- bottom: -100px;
36
- width: 40px;
37
- height: 40px;
38
- background: none;
39
- display: flex;
40
- justify-content: center;
41
- align-items: center;
42
- animation: rise 10s infinite ease-in-out;
43
- }
44
-
45
- .logo svg {
46
- width: 100%;
47
- height: 100%;
48
- }
49
-
50
- .logo:nth-child(odd) {
51
- animation-duration: 8s;
52
- }
53
-
54
- .logo:nth-child(even) {
55
- animation-duration: 12s;
56
- }
57
-
58
- @keyframes rise {
59
- 0% {
60
- transform: translateY(0) scale(1);
61
- opacity: 1;
62
- }
63
-
64
- 50% {
65
- opacity: 0.7;
66
- }
67
-
68
- 100% {
69
- transform: translateY(-120vh) scale(0.7);
70
- opacity: 0;
71
- }
72
- }
73
- </style>
74
- </head>
75
-
76
- <body>
77
- <h1>Thank You!</h1>
78
- <p>You can close this window.</p>
79
- __ADD_INFO__
80
-
81
- <!-- JavaScript to generate IBM logos -->
82
- <script>
83
- // Function to create logos dynamically
84
- function createLogos() {
85
- const body = document.body;
86
- const svgContent = `
87
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1000px" height="401.149px" viewBox="0 0 1000 401.149" xml:space="preserve">
88
- <g>
89
- <rect fill="#1F70C1" x="0" y="373.217" width="194.433" height="27.833"/>
90
- <rect fill="#1F70C1" x="0" y="319.83" width="194.433" height="27.931"/>
91
- <rect fill="#1F70C1" x="55.468" y="266.541" width="83.399" height="27.932"/>
92
- <rect fill="#1F70C1" x="55.468" y="213.253" width="83.399" height="27.932"/>
93
- <rect fill="#1F70C1" x="55.468" y="159.964" width="83.399" height="27.932"/>
94
- <rect fill="#1F70C1" x="55.468" y="106.577" width="83.399" height="27.932"/>
95
- <rect fill="#1F70C1" x="0" y="53.288" width="194.433" height="27.932"/>
96
- <rect fill="#1F70C1" x="0" y="0" width="194.433" height="27.932"/>
97
- <path fill="#1F70C1" d="M222.167,347.761h299.029c5.051-8.617,8.815-18.027,11.094-27.932H222.167V347.761z"/>
98
- <path fill="#1F70C1" d="M497.92,213.253H277.734v27.932h243.463C514.857,230.487,507.032,221.078,497.92,213.253z"/>
99
- <path fill="#1F70C1" d="M277.734,159.964v27.932H497.92c9.311-7.825,17.135-17.235,23.277-27.932H277.734z"/>
100
- <path fill="#1F70C1" d="M521.197,53.288H222.167V81.22H532.29C529.715,71.315,525.951,61.906,521.197,53.288z"/>
101
- <path fill="#1F70C1" d="M429.279,0H222.167v27.932h278.526C482.072,10.697,456.815,0,429.279,0z"/>
102
- <rect fill="#1F70C1" x="277.734" y="106.577" width="83.3" height="27.932"/>
103
- <path fill="#1F70C1" d="M444.433,134.509h87.163c2.476-8.914,3.764-18.324,3.764-27.932h-90.927z"/>
104
- <rect fill="#1F70C1" x="277.734" y="266.541" width="83.3" height="27.932"/>
105
- <path fill="#1F70C1" d="M444.433,266.541v27.932h90.927c0-9.608-1.288-19.017-3.764-27.932H444.433z"/>
106
- <path fill="#1F70C1" d="M222.167,400.852h207.112c27.734,0,52.793-10.697,71.513-27.932H222.167V400.852z"/>
107
- <rect fill="#1F70C1" x="555.567" y="373.217" width="138.866" height="27.833"/>
108
- <rect fill="#1F70C1" x="555.567" y="319.83" width="138.866" height="27.931"/>
109
- <rect fill="#1F70C1" x="611.034" y="266.541" width="83.399" height="27.932"/>
110
- <rect fill="#1F70C1" x="611.034" y="213.253" width="83.399" height="27.932"/>
111
- <polygon fill="#1F70C1" points="733.063,53.288 555.567,53.288 555.567,81.22 742.67,81.22"/>
112
- <polygon fill="#1F70C1" points="714.639,0 555.567,0 555.567,27.932 724.247,27.932"/>
113
- <rect fill="#1F70C1" x="861.034" y="373.217" width="138.866" height="27.833"/>
114
- <rect fill="#1F70C1" x="861.034" y="319.83" width="138.866" height="27.931"/>
115
- <rect fill="#1F70C1" x="861.034" y="266.541" width="83.399" height="27.932"/>
116
- <rect fill="#1F70C1" x="861.034" y="213.253" width="83.399" height="27.932"/>
117
- <polygon fill="#1F70C1" points="861.034,187.896 944.433,187.896 944.433,159.964 861.034,159.964 694.433,159.964 611.034,159.964 611.034,187.896 694.433,187.896 852.219,187.896"/>
118
- <polygon fill="#1F70C1" points="944.433,106.577 803.982,106.577 794.374,134.509 944.433,134.509"/>
119
- <polygon fill="#1F70C1" points="840.927,0 831.319,27.932 1000,27.932 1000,0"/>
120
- <polygon fill="#1F70C1" points="777.734,400.852 787.341,373.217 768.126,373.217"/>
121
- <polygon fill="#1F70C1" points="759.311,347.761 796.157,347.761 806.062,319.83 749.505,319.83"/>
122
- <polygon fill="#1F70C1" points="740.59,294.473 814.877,294.473 824.683,266.541 730.784,266.541"/>
123
- <polygon fill="#1F70C1" points="721.969,241.185 833.597,241.185 843.106,213.253 712.361,213.253"/>
124
- <polygon fill="#1F70C1" points="611.034,134.509 761.093,134.509 751.486,106.577 611.034,106.577"/>
125
- <polygon fill="#1F70C1" points="812.896,81.22 1000,81.22 1000,53.288 822.405,53.288"/>
126
- </g>
127
- </svg>
128
- `;
129
- for (let i = 0; i < 20; i++) {
130
- const logo = document.createElement('div');
131
- logo.className = 'logo';
132
- const size = Math.random() * 30 + 20; // Random size between 20px and 50px
133
- logo.style.width = `${size}px`;
134
- logo.style.height = `${size}px`;
135
- logo.style.left = `${Math.random() * 100}vw`;
136
- logo.style.animationDelay = `${Math.random() * 5}s`;
137
- logo.innerHTML = svgContent;
138
- body.appendChild(logo);
139
- }
140
- }
141
-
142
- // Call the function to create logos on load
143
- createLogos();
144
- </script>
145
- </body>
146
-
147
- </html>