aspera-cli 4.26.2 → 4.27.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 (136) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +281 -21
  4. data/CONTRIBUTING.md +98 -7
  5. data/bin/ascli +3 -3
  6. data/docs/README.md +10757 -0
  7. data/docs/test-mcp-with-ai.md +202 -0
  8. data/lib/aspera/agent/base.rb +20 -6
  9. data/lib/aspera/agent/connect.rb +53 -16
  10. data/lib/aspera/agent/desktop.rb +52 -17
  11. data/lib/aspera/agent/direct.rb +26 -24
  12. data/lib/aspera/agent/httpgw.rb +1 -1
  13. data/lib/aspera/agent/node.rb +32 -0
  14. data/lib/aspera/agent/transferd.rb +39 -3
  15. data/lib/aspera/api/alee.rb +1 -1
  16. data/lib/aspera/api/aoc.rb +14 -16
  17. data/lib/aspera/api/cos_node.rb +1 -1
  18. data/lib/aspera/api/faspex.rb +15 -14
  19. data/lib/aspera/api/httpgw.rb +4 -4
  20. data/lib/aspera/api/node.rb +26 -23
  21. data/lib/aspera/api/queries/bss_subscription_account.graphql +18 -0
  22. data/lib/aspera/api/queries/bss_subscription_usage.graphql +18 -0
  23. data/lib/aspera/ascmd.rb +21 -19
  24. data/lib/aspera/ascp/installation.rb +37 -38
  25. data/lib/aspera/ascp/management.rb +2 -3
  26. data/lib/aspera/cli/ascp_actions.rb +155 -0
  27. data/lib/aspera/cli/async_transfer_store.rb +81 -0
  28. data/lib/aspera/cli/bootstrapper.rb +197 -0
  29. data/lib/aspera/cli/command_registry.rb +145 -0
  30. data/lib/aspera/cli/command_spec.rb +138 -0
  31. data/lib/aspera/cli/context.rb +16 -3
  32. data/lib/aspera/cli/error.rb +16 -0
  33. data/lib/aspera/cli/extended_value.rb +2 -1
  34. data/lib/aspera/cli/formatter.rb +41 -27
  35. data/lib/aspera/cli/gem_checker.rb +65 -0
  36. data/lib/aspera/cli/hints.rb +2 -2
  37. data/lib/aspera/cli/http.rb +70 -19
  38. data/lib/aspera/cli/info.rb +2 -0
  39. data/lib/aspera/cli/mailer.rb +97 -0
  40. data/lib/aspera/cli/mcp_tool.rb +198 -0
  41. data/lib/aspera/cli/options.schema.yaml +364 -7
  42. data/lib/aspera/cli/{manager.rb → parser.rb} +334 -142
  43. data/lib/aspera/cli/plugins/alee.rb +20 -22
  44. data/lib/aspera/cli/plugins/aoc.rb +1166 -853
  45. data/lib/aspera/cli/plugins/ats.rb +200 -161
  46. data/lib/aspera/cli/plugins/base.rb +457 -100
  47. data/lib/aspera/cli/plugins/basic_auth.rb +14 -4
  48. data/lib/aspera/cli/plugins/config.rb +428 -754
  49. data/lib/aspera/cli/plugins/console.rb +106 -64
  50. data/lib/aspera/cli/plugins/cos.rb +44 -32
  51. data/lib/aspera/cli/plugins/factory.rb +4 -4
  52. data/lib/aspera/cli/plugins/faspex.rb +294 -257
  53. data/lib/aspera/cli/plugins/faspex5.rb +585 -357
  54. data/lib/aspera/cli/plugins/faspio.rb +49 -51
  55. data/lib/aspera/cli/plugins/httpgw.rb +18 -25
  56. data/lib/aspera/cli/plugins/mcp.rb +279 -0
  57. data/lib/aspera/cli/plugins/node.rb +998 -794
  58. data/lib/aspera/cli/plugins/oauth.rb +7 -10
  59. data/lib/aspera/cli/plugins/orchestrator.rb +111 -134
  60. data/lib/aspera/cli/plugins/preview.rb +180 -139
  61. data/lib/aspera/cli/plugins/server.rb +124 -79
  62. data/lib/aspera/cli/plugins/shares.rb +301 -107
  63. data/lib/aspera/cli/preset_actions.rb +139 -0
  64. data/lib/aspera/cli/preset_manager.rb +13 -12
  65. data/lib/aspera/cli/result.rb +61 -11
  66. data/lib/aspera/cli/runner.rb +275 -141
  67. data/lib/aspera/cli/secret_finder.rb +40 -0
  68. data/lib/aspera/cli/special_values.rb +1 -0
  69. data/lib/aspera/cli/sync_actions.rb +83 -59
  70. data/lib/aspera/cli/terminal_formatter.rb +1 -1
  71. data/lib/aspera/cli/transfer_actions.rb +83 -0
  72. data/lib/aspera/cli/transfer_agent.rb +116 -51
  73. data/lib/aspera/cli/transfer_progress.rb +3 -3
  74. data/lib/aspera/cli/vault_manager.rb +57 -0
  75. data/lib/aspera/cli/version.rb +1 -1
  76. data/lib/aspera/cli/wizard.rb +21 -20
  77. data/lib/aspera/command_line_builder.rb +22 -22
  78. data/lib/aspera/data_repository.rb +2 -1
  79. data/lib/aspera/dot_container.rb +4 -4
  80. data/lib/aspera/environment.rb +18 -11
  81. data/lib/aspera/exec_spec.rb +13 -0
  82. data/lib/aspera/faspex_gw.rb +1 -1
  83. data/lib/aspera/faspex_postproc.rb +4 -3
  84. data/lib/aspera/graphql.rb +35 -0
  85. data/lib/aspera/hash_ext.rb +6 -0
  86. data/lib/aspera/json_rpc/client.rb +62 -0
  87. data/lib/aspera/json_rpc/version.rb +7 -0
  88. data/lib/aspera/keychain/encrypted_hash.rb +1 -1
  89. data/lib/aspera/keychain/factory.rb +3 -3
  90. data/lib/aspera/keychain/macos_security.rb +3 -3
  91. data/lib/aspera/link_header.rb +82 -0
  92. data/lib/aspera/log.rb +17 -3
  93. data/lib/aspera/markdown.rb +85 -2
  94. data/lib/aspera/node_simulator.rb +3 -1
  95. data/lib/aspera/oauth/base.rb +5 -5
  96. data/lib/aspera/oauth/boot.rb +2 -2
  97. data/lib/aspera/oauth/factory.rb +7 -5
  98. data/lib/aspera/oauth/jwt.rb +4 -4
  99. data/lib/aspera/oauth/web.rb +2 -2
  100. data/lib/aspera/persistency_action_once.rb +8 -8
  101. data/lib/aspera/persistency_folder.rb +10 -3
  102. data/lib/aspera/preview/file_types.rb +3 -3
  103. data/lib/aspera/preview/generator.rb +3 -3
  104. data/lib/aspera/preview/utils.rb +1 -1
  105. data/lib/aspera/products/connect.rb +1 -1
  106. data/lib/aspera/products/other.rb +1 -1
  107. data/lib/aspera/products/transferd.rb +1 -1
  108. data/lib/aspera/proxy_auto_config.rb +7 -6
  109. data/lib/aspera/rest.rb +10 -36
  110. data/lib/aspera/rest_error_analyzer.rb +3 -3
  111. data/lib/aspera/rest_errors_aspera.rb +0 -10
  112. data/lib/aspera/rest_list.rb +3 -3
  113. data/lib/aspera/schema/IBM Aspera on Cloud API-0.2.6-enhanced.yaml +1853 -510
  114. data/lib/aspera/schema/documentation.rb +57 -26
  115. data/lib/aspera/schema/reader.rb +59 -10
  116. data/lib/aspera/schema/registry.rb +39 -6
  117. data/lib/aspera/secret_hider.rb +7 -2
  118. data/lib/aspera/ssl.rb +4 -4
  119. data/lib/aspera/sync/conf.schema.yaml +2 -2
  120. data/lib/aspera/sync/operations.rb +10 -13
  121. data/lib/aspera/temp_file_manager.rb +1 -1
  122. data/lib/aspera/timer_limiter.rb +1 -1
  123. data/lib/aspera/transfer/faux_file.rb +24 -11
  124. data/lib/aspera/transfer/parameters.rb +23 -21
  125. data/lib/aspera/transfer/result.rb +74 -0
  126. data/lib/aspera/transfer/resumer.rb +6 -6
  127. data/lib/aspera/transfer/spec.rb +18 -1
  128. data/lib/aspera/transfer/spec.schema.yaml +12 -3
  129. data/lib/aspera/uri_reader.rb +2 -2
  130. data/lib/aspera/web_auth.rb +2 -2
  131. data/lib/aspera/web_server_simple.rb +8 -5
  132. data/lib/aspera/yaml.rb +2 -1
  133. data.tar.gz.sig +0 -0
  134. metadata +25 -3
  135. metadata.gz.sig +0 -0
  136. data/lib/aspera/json_rpc.rb +0 -52
@@ -6,9 +6,32 @@ info:
6
6
  paths: {}
7
7
  components:
8
8
  schemas:
9
- TransferInfo:
9
+ LogOptions:
10
10
  type: object
11
- description: Optional parameters to control multi-session transfers, Web Socket Session, resume policy, and additional arguments for `ascp`.
11
+ description: Logging options.
12
+ properties:
13
+ level:
14
+ type: string
15
+ description: Minimum log level displayed.
16
+ enum: [trace2, trace1, debug, info, warn, error, fatal, unknown]
17
+ default: warn
18
+ type:
19
+ type: string
20
+ description: Log output destination.
21
+ enum: [stderr, stdout, syslog]
22
+ default: stderr
23
+ format:
24
+ type: string
25
+ description: Log line formatter. Use `@ruby:` for a custom lambda.
26
+ enum: [default, caller, standard]
27
+ default: default
28
+ secrets:
29
+ type: boolean
30
+ description: Show passwords and secrets in logs.
31
+ default: false
32
+ DirectAgentOptions:
33
+ type: object
34
+ description: Parameters for the `ascp` transfer agent.
12
35
  properties:
13
36
  wss:
14
37
  type: boolean
@@ -17,7 +40,14 @@ components:
17
40
  quiet:
18
41
  type: boolean
19
42
  description: Suppress the `ascp` progress bar display.
20
- default: false
43
+ default: true
44
+ file_list:
45
+ type: boolean
46
+ description: >-
47
+ If `true`, source paths are written to a temp file passed to `ascp` via `--file-list` or `--file-pair-list`.
48
+
49
+ If `false`, source paths are placed directly on the `ascp` command line.
50
+ default: true
21
51
  trusted_certs:
22
52
  type: array
23
53
  description: List of trusted certificate repositories.
@@ -41,7 +71,7 @@ components:
41
71
  type: number
42
72
  format: float
43
73
  description: Multi session - Maximum time (in seconds) to verify that `ascp` is running.
44
- default: 3
74
+ default: 2
45
75
  spawn_delay_sec:
46
76
  type: number
47
77
  format: float
@@ -51,11 +81,12 @@ components:
51
81
  type: boolean
52
82
  description: >-
53
83
  Multi session - Increment UDP port for each session.
54
-
84
+
55
85
  If `true`, each session uses a different UDP port starting at `fasp_port` (default: 33001).
56
-
86
+
57
87
  If `false`, all sessions use the same `fasp_port` (or `ascp` default).
58
- default: true
88
+
89
+ Default: `true` on Windows, `false` on other platforms.
59
90
  resume:
60
91
  type: object
61
92
  description: Configuration for automatic transfer resume on interruption.
@@ -80,3 +111,329 @@ components:
80
111
  type: boolean
81
112
  description: Enable use of the `ascp` management port for transfer monitoring.
82
113
  default: true
114
+ NodeAgentOptions:
115
+ type: object
116
+ description: Parameters for the Node API transfer agent.
117
+ required:
118
+ - url
119
+ - username
120
+ - password
121
+ properties:
122
+ url:
123
+ type: string
124
+ description: URL of the Node API.
125
+ username:
126
+ type: string
127
+ description: Node API user or access key.
128
+ password:
129
+ type: string
130
+ description: Password, secret, or bearer token.
131
+ root_id:
132
+ type: string
133
+ description: Root file ID. Mandatory only when `password` is a bearer token.
134
+ HttpgwAgentOptions:
135
+ type: object
136
+ description: Parameters for the HTTP Gateway transfer agent.
137
+ required:
138
+ - url
139
+ properties:
140
+ url:
141
+ type: string
142
+ description: URL of the HTTP Gateway.
143
+ upload_chunk_size:
144
+ type: integer
145
+ description: Size in bytes of each upload chunk.
146
+ default: 64000
147
+ api_version:
148
+ type: string
149
+ description: Force use of a specific API version.
150
+ enum:
151
+ - v1
152
+ - v2
153
+ default: v2
154
+ synchronous:
155
+ type: boolean
156
+ description: Wait for acknowledgment after each message.
157
+ default: false
158
+ DesktopAgentOptions:
159
+ type: object
160
+ description: >-
161
+ Parameters for the IBM Aspera Desktop Client transfer agent.
162
+ The Desktop Client must be running locally. No additional options are required.
163
+ properties: {}
164
+ ConnectAgentOptions:
165
+ type: object
166
+ description: >-
167
+ Parameters for the IBM Aspera Connect Client transfer agent.
168
+ The Connect Client must be running locally. No additional options are required.
169
+ properties: {}
170
+ TransferdAgentOptions:
171
+ type: object
172
+ description: Parameters for the Transfer Daemon transfer agent.
173
+ properties:
174
+ url:
175
+ type: string
176
+ description: >-
177
+ Address and port listened by the daemon (e.g. `:55002`).
178
+ If port is `0`, the daemon listens on a random available port.
179
+ If no address is given, `127.0.0.1` is used.
180
+ default: ":0"
181
+ start:
182
+ type: boolean
183
+ description: Start a new daemon instance.
184
+ default: true
185
+ stop:
186
+ type: boolean
187
+ description: Stop the daemon when `ascli` exits.
188
+ default: true
189
+ TransferAgentOptions:
190
+ description: >-
191
+ Transfer agent selector and agent-specific parameters.
192
+ Set `agent` to select the agent type (default: `direct`).
193
+ Remaining keys are passed to the selected agent.
194
+ oneOf:
195
+ - $ref: "#/components/schemas/DirectAgentOptions"
196
+ - $ref: "#/components/schemas/NodeAgentOptions"
197
+ - $ref: "#/components/schemas/HttpgwAgentOptions"
198
+ - $ref: "#/components/schemas/TransferdAgentOptions"
199
+ - $ref: "#/components/schemas/DesktopAgentOptions"
200
+ - $ref: "#/components/schemas/ConnectAgentOptions"
201
+ discriminator:
202
+ propertyName: agent
203
+ mapping:
204
+ direct: "#/components/schemas/DirectAgentOptions"
205
+ node: "#/components/schemas/NodeAgentOptions"
206
+ httpgw: "#/components/schemas/HttpgwAgentOptions"
207
+ transferd: "#/components/schemas/TransferdAgentOptions"
208
+ desktop: "#/components/schemas/DesktopAgentOptions"
209
+ connect: "#/components/schemas/ConnectAgentOptions"
210
+ SmtpOptions:
211
+ type: object
212
+ description: SMTP email server configuration.
213
+ required:
214
+ - server
215
+ properties:
216
+ server:
217
+ type: string
218
+ description: SMTP server address.
219
+ example: smtp.gmail.com
220
+ tls:
221
+ type: boolean
222
+ description: Enable `STARTTLS` (port 587).
223
+ default: true
224
+ ssl:
225
+ type: boolean
226
+ description: Enable `TLS/SSL` (port 465).
227
+ default: false
228
+ port:
229
+ type: integer
230
+ description: >-
231
+ Port for the SMTP service.
232
+
233
+ Defaults: `587` (TLS), `465` (SSL), `25` (plain).
234
+ example: 587
235
+ domain:
236
+ type: string
237
+ description: Email domain of the user. Defaults to the domain part of `server`.
238
+ example: gmail.com
239
+ username:
240
+ type: string
241
+ description: >-
242
+ User to authenticate on the SMTP server.
243
+ Leave empty for open (unauthenticated) relay.
244
+ example: john@example.com
245
+ password:
246
+ type: string
247
+ description: Password for the above `username`.
248
+ example: my_password
249
+ from_email:
250
+ type: string
251
+ description: Sender address (used in `From:` header and as reply-to). Defaults to `username` when defined.
252
+ example: johnny@example.com
253
+ from_name:
254
+ type: string
255
+ description: Display name of the sender. Defaults to the local-part of `from_email`.
256
+ example: John Wayne
257
+ HttpOptions:
258
+ type: object
259
+ description: >-
260
+ HTTP/S connection parameters for REST calls (not `ascp` WSS).
261
+
262
+ Keys are dispatched at startup to three targets:
263
+ `RestParameters` (`user_agent`, `download_partial_suffix`, `retry_*`),
264
+ `SSL` (`ssl_options`), and `OAuth` (`token_cache_max_age`, `token_refresh_threshold`).
265
+ Any remaining key is forwarded as a setter to the `Net::HTTP` session
266
+ (e.g. `ca_file`, `verify_mode`) — the list below covers the common ones.
267
+ additionalProperties: true
268
+ properties:
269
+ read_timeout:
270
+ type: number
271
+ description: Maximum time in seconds to wait for data to be read from the server. (Net::HTTP)
272
+ default: 60
273
+ write_timeout:
274
+ type: number
275
+ description: Maximum time in seconds to wait for data to be written to the server. (Net::HTTP)
276
+ default: 60
277
+ open_timeout:
278
+ type: number
279
+ description: Maximum time in seconds to wait for a connection to be established. (Net::HTTP)
280
+ default: 60
281
+ keep_alive_timeout:
282
+ type: number
283
+ description: Maximum time in seconds to keep an idle persistent connection open. (Net::HTTP)
284
+ default: 2
285
+ ssl_options:
286
+ type: array
287
+ description: List of OpenSSL option flags to set on the HTTP session (e.g. `IGNORE_UNEXPECTED_EOF`). (SSL)
288
+ items:
289
+ type: string
290
+ user_agent:
291
+ type: string
292
+ description: Value sent in the `User-Agent` HTTP request header. (Rest)
293
+ download_partial_suffix:
294
+ type: string
295
+ description: File suffix appended to the target filename while a download is in progress. (Rest)
296
+ default: .http_partial
297
+ retry_on_error:
298
+ type: boolean
299
+ description: Retry the request on any HTTP error response. (Rest)
300
+ default: false
301
+ retry_on_timeout:
302
+ type: boolean
303
+ description: Retry the request on connection timeout. (Rest)
304
+ default: true
305
+ retry_on_unavailable:
306
+ type: boolean
307
+ description: Retry the request on HTTP 503 Service Unavailable. (Rest)
308
+ default: true
309
+ retry_max:
310
+ type: integer
311
+ description: Maximum number of retry attempts. (Rest)
312
+ default: 1
313
+ retry_sleep:
314
+ type: integer
315
+ description: Delay in seconds between retry attempts. (Rest)
316
+ default: 4
317
+ token_cache_max_age:
318
+ type: integer
319
+ description: Maximum age in seconds of a cached OAuth token before it is discarded. (OAuth)
320
+ default: 1800
321
+ token_refresh_threshold:
322
+ type: integer
323
+ description: Remaining token lifetime in seconds below which the token is proactively refreshed. (OAuth)
324
+ default: 120
325
+ VaultHashicorpOptions:
326
+ type: object
327
+ description: IBM HashiCorp Vault secret store.
328
+ required:
329
+ - type
330
+ - url
331
+ properties:
332
+ type:
333
+ type: string
334
+ description: Vault type selector.
335
+ enum: [vault]
336
+ url:
337
+ type: string
338
+ description: URL of the HashiCorp Vault server.
339
+ example: "http://127.0.0.1:8200"
340
+ token:
341
+ type: string
342
+ description: Authentication token. Defaults to the value of `vault_password`.
343
+ example: dev-only-token
344
+ VaultSystemOptions:
345
+ type: object
346
+ description: macOS system keychain secret store.
347
+ required:
348
+ - type
349
+ properties:
350
+ type:
351
+ type: string
352
+ description: Vault type selector.
353
+ enum: [system]
354
+ name:
355
+ type: string
356
+ description: Name of the keychain to use.
357
+ VaultFileOptions:
358
+ type: object
359
+ description: Encrypted file secret store.
360
+ required:
361
+ - type
362
+ properties:
363
+ type:
364
+ type: string
365
+ description: Vault type selector.
366
+ enum: [file]
367
+ name:
368
+ type: string
369
+ description: >-
370
+ Path to the encrypted vault file.
371
+ Relative paths are resolved from the configuration folder.
372
+ default: vault.bin
373
+ VaultOptions:
374
+ title: Secret vault configuration
375
+ description: Secret vault configuration. Set `type` to select the vault backend.
376
+ oneOf:
377
+ - $ref: "#/components/schemas/VaultHashicorpOptions"
378
+ - $ref: "#/components/schemas/VaultSystemOptions"
379
+ - $ref: "#/components/schemas/VaultFileOptions"
380
+ discriminator:
381
+ propertyName: type
382
+ mapping:
383
+ vault: "#/components/schemas/VaultHashicorpOptions"
384
+ system: "#/components/schemas/VaultSystemOptions"
385
+ file: "#/components/schemas/VaultFileOptions"
386
+ ImageOptions:
387
+ type: object
388
+ description: Options for displaying images and thumbnails in the terminal.
389
+ properties:
390
+ reserve:
391
+ type: integer
392
+ description: Number of terminal lines reserved for non-image output.
393
+ default: 3
394
+ text:
395
+ type: boolean
396
+ description: Display the image as colorized text instead of using the iTerm2 inline protocol.
397
+ default: false
398
+ double:
399
+ type: boolean
400
+ description: Use double vertical resolution via half-block characters.
401
+ default: true
402
+ font_ratio:
403
+ type: number
404
+ format: float
405
+ description: Terminal font aspect ratio (height divided by width).
406
+ default: 2.3
407
+ PackageFolderOptions:
408
+ type: object
409
+ title: Package download folder organization
410
+ description: >-
411
+ Controls how downloaded packages are organized into subfolders under `to_folder`.
412
+ If not specified or empty, packages are downloaded directly into `to_folder`.
413
+ properties:
414
+ fld:
415
+ type: array
416
+ description: >-
417
+ List of package fields (up to 2) used to build the subfolder name.
418
+ Field values are joined with `.`.
419
+ items:
420
+ type: string
421
+ maxItems: 2
422
+ example: ["name", "id"]
423
+ seq:
424
+ type: boolean
425
+ description: >-
426
+ If `true`, appends an incrementing number to the folder name when a conflict occurs.
427
+ default: false
428
+ opt:
429
+ type: boolean
430
+ description: >-
431
+ If `false` (default), all fields in `fld` are always used.
432
+ If `true`, the first field is used unless the folder already exists.
433
+ default: false
434
+ inf:
435
+ type: boolean
436
+ description: >-
437
+ If `true`, creates a `<ID>.info.json` sidecar file inside the folder
438
+ containing package metadata.
439
+ default: false