@spira-lab/cli 0.0.10 → 0.0.13
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.
- package/README.md +2 -1
- package/dist/index.cjs +408 -70
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,8 @@ spira ai models list
|
|
|
25
25
|
spira ai models list --media-type audio
|
|
26
26
|
spira ai jobs create --model-id nano-banana-2 --inputs-json '{"prompt":"A product photo"}' --wait
|
|
27
27
|
spira ai jobs create --model-id elevenlabs-music-generation --inputs-json '{"prompt":"A short ambient cue","duration":"10"}' --wait
|
|
28
|
-
spira workflows node-catalog --json
|
|
28
|
+
spira workflows node-catalog --view summary --json
|
|
29
|
+
spira workflows node-catalog --view full --node-type textInput --node-type textChatLlm --json
|
|
29
30
|
spira workflows create --name "Product launch workflow"
|
|
30
31
|
spira workflows update <workflowId> --workflow-definition-json '{"nodes":[],"edges":[]}'
|
|
31
32
|
```
|
package/dist/index.cjs
CHANGED
|
@@ -18581,7 +18581,8 @@ var cliAiModelDocs = [
|
|
|
18581
18581
|
"description": "Gemini Omni text/image/video-reference to video model.",
|
|
18582
18582
|
"capabilities": [
|
|
18583
18583
|
"text-to-video",
|
|
18584
|
-
"image-to-video"
|
|
18584
|
+
"image-to-video",
|
|
18585
|
+
"video-to-video"
|
|
18585
18586
|
],
|
|
18586
18587
|
"variants": [
|
|
18587
18588
|
{
|
|
@@ -18783,7 +18784,7 @@ var cliAiModelDocs = [
|
|
|
18783
18784
|
{
|
|
18784
18785
|
"name": "referenceVideo",
|
|
18785
18786
|
"type": "string[]",
|
|
18786
|
-
"description": "Optional source video URL. Requires videoStartSeconds and videoEndSeconds; selected clip must be 10 seconds or shorter."
|
|
18787
|
+
"description": "Optional source video URL; source must be 30 seconds or shorter. Requires videoStartSeconds and videoEndSeconds; selected clip must be 10 seconds or shorter."
|
|
18787
18788
|
},
|
|
18788
18789
|
{
|
|
18789
18790
|
"name": "videoStartSeconds",
|
|
@@ -19134,6 +19135,162 @@ var cliAiModelDocs = [
|
|
|
19134
19135
|
"image_to_video requires exactly 1 referenceImage and does not send aspect ratio; size applies to text_to_video and reference_to_video."
|
|
19135
19136
|
]
|
|
19136
19137
|
},
|
|
19138
|
+
{
|
|
19139
|
+
"id": "minimax-h3",
|
|
19140
|
+
"name": "MiniMax H3",
|
|
19141
|
+
"mediaType": "video",
|
|
19142
|
+
"description": "MiniMax H3 multimodal video model. The only model that accepts image, video, and audio references in the same request.",
|
|
19143
|
+
"capabilities": [
|
|
19144
|
+
"text-to-video",
|
|
19145
|
+
"image-to-video"
|
|
19146
|
+
],
|
|
19147
|
+
"variants": [
|
|
19148
|
+
{
|
|
19149
|
+
"key": "768p",
|
|
19150
|
+
"display": "768p",
|
|
19151
|
+
"conditions": {
|
|
19152
|
+
"resolution": "768p"
|
|
19153
|
+
},
|
|
19154
|
+
"billingUnit": "per_second",
|
|
19155
|
+
"creditsPerUnit": 9.6
|
|
19156
|
+
},
|
|
19157
|
+
{
|
|
19158
|
+
"key": "2k",
|
|
19159
|
+
"display": "2K",
|
|
19160
|
+
"conditions": {
|
|
19161
|
+
"resolution": "2k"
|
|
19162
|
+
},
|
|
19163
|
+
"billingUnit": "per_second",
|
|
19164
|
+
"creditsPerUnit": 15.6
|
|
19165
|
+
}
|
|
19166
|
+
],
|
|
19167
|
+
"fields": [
|
|
19168
|
+
{
|
|
19169
|
+
"name": "prompt",
|
|
19170
|
+
"type": "string",
|
|
19171
|
+
"description": "Text instruction for the video. Up to 7000 characters.",
|
|
19172
|
+
"required": true
|
|
19173
|
+
},
|
|
19174
|
+
{
|
|
19175
|
+
"name": "mode",
|
|
19176
|
+
"type": "string",
|
|
19177
|
+
"description": "Model mode or quality/speed tier.",
|
|
19178
|
+
"values": [
|
|
19179
|
+
"standard"
|
|
19180
|
+
],
|
|
19181
|
+
"defaultValue": "standard"
|
|
19182
|
+
},
|
|
19183
|
+
{
|
|
19184
|
+
"name": "duration",
|
|
19185
|
+
"type": "string",
|
|
19186
|
+
"description": "Output duration in seconds.",
|
|
19187
|
+
"values": [
|
|
19188
|
+
"6",
|
|
19189
|
+
"4",
|
|
19190
|
+
"5",
|
|
19191
|
+
"7",
|
|
19192
|
+
"8",
|
|
19193
|
+
"9",
|
|
19194
|
+
"10",
|
|
19195
|
+
"11",
|
|
19196
|
+
"12",
|
|
19197
|
+
"13",
|
|
19198
|
+
"14",
|
|
19199
|
+
"15"
|
|
19200
|
+
],
|
|
19201
|
+
"defaultValue": "6"
|
|
19202
|
+
},
|
|
19203
|
+
{
|
|
19204
|
+
"name": "size",
|
|
19205
|
+
"type": "string",
|
|
19206
|
+
"description": "Output aspect ratio. Only sent for text_to_video and reference_to_video; 'auto' is accepted for reference_to_video only.",
|
|
19207
|
+
"values": [
|
|
19208
|
+
"16:9",
|
|
19209
|
+
"9:16",
|
|
19210
|
+
"21:9",
|
|
19211
|
+
"4:3",
|
|
19212
|
+
"1:1",
|
|
19213
|
+
"3:4",
|
|
19214
|
+
"auto"
|
|
19215
|
+
],
|
|
19216
|
+
"defaultValue": "16:9"
|
|
19217
|
+
},
|
|
19218
|
+
{
|
|
19219
|
+
"name": "resolution",
|
|
19220
|
+
"type": "string",
|
|
19221
|
+
"description": "Output resolution.",
|
|
19222
|
+
"values": [
|
|
19223
|
+
"768p",
|
|
19224
|
+
"2k"
|
|
19225
|
+
],
|
|
19226
|
+
"defaultValue": "768p"
|
|
19227
|
+
},
|
|
19228
|
+
{
|
|
19229
|
+
"name": "referenceImage",
|
|
19230
|
+
"type": "string[]",
|
|
19231
|
+
"description": "Optional public HTTP image URLs, up to 9. 1 image is the start frame, 2 images are the first and last frames, 3 or more are general references."
|
|
19232
|
+
},
|
|
19233
|
+
{
|
|
19234
|
+
"name": "referenceVideo",
|
|
19235
|
+
"type": "string[]",
|
|
19236
|
+
"description": "Optional public HTTP MP4/MOV URLs, up to 3, reference_to_video only. Each clip must be 2 to 15 seconds and they must total at most 15 seconds."
|
|
19237
|
+
},
|
|
19238
|
+
{
|
|
19239
|
+
"name": "referenceAudio",
|
|
19240
|
+
"type": "string[]",
|
|
19241
|
+
"description": "Optional public HTTP WAV/MP3 URLs, up to 3, reference_to_video only. Each clip must be 2 to 15 seconds. Audio cannot be the only reference."
|
|
19242
|
+
},
|
|
19243
|
+
{
|
|
19244
|
+
"name": "generationType",
|
|
19245
|
+
"type": "string",
|
|
19246
|
+
"description": "Optional workflow mode hint. Inferred from the references when omitted.",
|
|
19247
|
+
"values": [
|
|
19248
|
+
"text_to_video",
|
|
19249
|
+
"image_to_video",
|
|
19250
|
+
"first_last_frames_to_video",
|
|
19251
|
+
"reference_to_video"
|
|
19252
|
+
]
|
|
19253
|
+
}
|
|
19254
|
+
],
|
|
19255
|
+
"examples": [
|
|
19256
|
+
{
|
|
19257
|
+
"label": "Text to video",
|
|
19258
|
+
"inputs": {
|
|
19259
|
+
"prompt": "A cinematic tracking shot gliding through a rain-soaked neon alley at night",
|
|
19260
|
+
"duration": "6",
|
|
19261
|
+
"size": "16:9",
|
|
19262
|
+
"resolution": "768p"
|
|
19263
|
+
}
|
|
19264
|
+
},
|
|
19265
|
+
{
|
|
19266
|
+
"label": "Multimodal reference to video",
|
|
19267
|
+
"inputs": {
|
|
19268
|
+
"prompt": "Keep the character appearance, follow the reference camera movement, match the reference music",
|
|
19269
|
+
"generationType": "reference_to_video",
|
|
19270
|
+
"referenceImage": [
|
|
19271
|
+
"https://example.com/character.jpg"
|
|
19272
|
+
],
|
|
19273
|
+
"referenceVideo": [
|
|
19274
|
+
"https://example.com/movement.mp4"
|
|
19275
|
+
],
|
|
19276
|
+
"referenceAudio": [
|
|
19277
|
+
"https://example.com/music.mp3"
|
|
19278
|
+
],
|
|
19279
|
+
"duration": "8",
|
|
19280
|
+
"size": "auto",
|
|
19281
|
+
"resolution": "2k"
|
|
19282
|
+
}
|
|
19283
|
+
}
|
|
19284
|
+
],
|
|
19285
|
+
"notes": [
|
|
19286
|
+
"generationType is inferred from the references: none is text_to_video, 1 image is image_to_video, 2 images are first_last_frames_to_video, and 3+ images or any video/audio reference is reference_to_video. Pass generationType=reference_to_video explicitly to treat 1 or 2 images as plain references instead of frames.",
|
|
19287
|
+
"image, video, and audio references support at most 12 items in total.",
|
|
19288
|
+
"size is rejected for image_to_video and first_last_frames_to_video, so it is not sent for those modes. 'auto' is valid only for reference_to_video.",
|
|
19289
|
+
"Billing counts the generated duration plus the full duration of every reference video, at the output resolution's rate. The first 5 reference images are free; each one after that adds a flat surcharge.",
|
|
19290
|
+
"sound, seed, negativePrompt, storyboard, elements, and video extension are not supported.",
|
|
19291
|
+
"An error_code of generation_failed with a 'system error, MiniMax-H3 task-control' message is an upstream capacity fault, not a prompt problem. Failed jobs are not charged, so retry the same prompt."
|
|
19292
|
+
]
|
|
19293
|
+
},
|
|
19137
19294
|
{
|
|
19138
19295
|
"id": "heygen-avatar-4",
|
|
19139
19296
|
"name": "HeyGen Avatar 4 Lipsync",
|
|
@@ -19965,6 +20122,159 @@ var cliAiModelDocs = [
|
|
|
19965
20122
|
"generationType=text_to_video rejects reference inputs; reference_to_video requires at least one reference input; first_last_frames_to_video requires exactly 2 reference images and no video/audio input."
|
|
19966
20123
|
]
|
|
19967
20124
|
},
|
|
20125
|
+
{
|
|
20126
|
+
"id": "seedance-2.5",
|
|
20127
|
+
"name": "Seedance 2.5",
|
|
20128
|
+
"mediaType": "video",
|
|
20129
|
+
"description": "Seedance 2.5 text/image/reference video model with multi-asset references and up to 30s output.",
|
|
20130
|
+
"capabilities": [
|
|
20131
|
+
"text-to-video",
|
|
20132
|
+
"image-to-video",
|
|
20133
|
+
"reference-to-video"
|
|
20134
|
+
],
|
|
20135
|
+
"variants": [
|
|
20136
|
+
{
|
|
20137
|
+
"key": "480p",
|
|
20138
|
+
"display": "480p",
|
|
20139
|
+
"conditions": {
|
|
20140
|
+
"resolution": "480p"
|
|
20141
|
+
},
|
|
20142
|
+
"billingUnit": "per_second",
|
|
20143
|
+
"creditsPerUnit": 13.63
|
|
20144
|
+
},
|
|
20145
|
+
{
|
|
20146
|
+
"key": "720p",
|
|
20147
|
+
"display": "720p",
|
|
20148
|
+
"conditions": {
|
|
20149
|
+
"resolution": "720p"
|
|
20150
|
+
},
|
|
20151
|
+
"billingUnit": "per_second",
|
|
20152
|
+
"creditsPerUnit": 30.68
|
|
20153
|
+
},
|
|
20154
|
+
{
|
|
20155
|
+
"key": "480p-video-url",
|
|
20156
|
+
"display": "480p, with input video",
|
|
20157
|
+
"conditions": {
|
|
20158
|
+
"resolution": "480p",
|
|
20159
|
+
"feature": "video_url"
|
|
20160
|
+
},
|
|
20161
|
+
"billingUnit": "per_second",
|
|
20162
|
+
"creditsPerUnit": 8.18
|
|
20163
|
+
},
|
|
20164
|
+
{
|
|
20165
|
+
"key": "720p-video-url",
|
|
20166
|
+
"display": "720p, with input video",
|
|
20167
|
+
"conditions": {
|
|
20168
|
+
"resolution": "720p",
|
|
20169
|
+
"feature": "video_url"
|
|
20170
|
+
},
|
|
20171
|
+
"billingUnit": "per_second",
|
|
20172
|
+
"creditsPerUnit": 18.41
|
|
20173
|
+
}
|
|
20174
|
+
],
|
|
20175
|
+
"fields": [
|
|
20176
|
+
{
|
|
20177
|
+
"name": "prompt",
|
|
20178
|
+
"type": "string",
|
|
20179
|
+
"description": "Text instruction for the video.",
|
|
20180
|
+
"required": true
|
|
20181
|
+
},
|
|
20182
|
+
{
|
|
20183
|
+
"name": "duration",
|
|
20184
|
+
"type": "string",
|
|
20185
|
+
"description": "Output duration in seconds.",
|
|
20186
|
+
"values": [
|
|
20187
|
+
"4",
|
|
20188
|
+
"5",
|
|
20189
|
+
"6",
|
|
20190
|
+
"8",
|
|
20191
|
+
"10",
|
|
20192
|
+
"12",
|
|
20193
|
+
"15",
|
|
20194
|
+
"20",
|
|
20195
|
+
"25",
|
|
20196
|
+
"30"
|
|
20197
|
+
],
|
|
20198
|
+
"defaultValue": "5"
|
|
20199
|
+
},
|
|
20200
|
+
{
|
|
20201
|
+
"name": "size",
|
|
20202
|
+
"type": "string",
|
|
20203
|
+
"description": "Output aspect ratio. 'adaptive' lets the model pick framing from its references.",
|
|
20204
|
+
"values": [
|
|
20205
|
+
"adaptive",
|
|
20206
|
+
"9:16",
|
|
20207
|
+
"16:9",
|
|
20208
|
+
"1:1",
|
|
20209
|
+
"4:3",
|
|
20210
|
+
"3:4",
|
|
20211
|
+
"21:9"
|
|
20212
|
+
],
|
|
20213
|
+
"defaultValue": "adaptive"
|
|
20214
|
+
},
|
|
20215
|
+
{
|
|
20216
|
+
"name": "resolution",
|
|
20217
|
+
"type": "string",
|
|
20218
|
+
"description": "Output resolution. Seedance 2.5 has no 1080p tier.",
|
|
20219
|
+
"values": [
|
|
20220
|
+
"720p",
|
|
20221
|
+
"480p"
|
|
20222
|
+
],
|
|
20223
|
+
"defaultValue": "720p"
|
|
20224
|
+
},
|
|
20225
|
+
{
|
|
20226
|
+
"name": "referenceImage",
|
|
20227
|
+
"type": "string[]",
|
|
20228
|
+
"description": "Optional image URLs. At most 30; must be public HTTP/HTTPS URLs."
|
|
20229
|
+
},
|
|
20230
|
+
{
|
|
20231
|
+
"name": "referenceVideo",
|
|
20232
|
+
"type": "string[]",
|
|
20233
|
+
"description": "Optional source video URLs. At most 10, each 2-30s, 30s total across all clips."
|
|
20234
|
+
},
|
|
20235
|
+
{
|
|
20236
|
+
"name": "referenceAudio",
|
|
20237
|
+
"type": "string[]",
|
|
20238
|
+
"description": "Optional reference audio URLs. At most 10, each 2-30s, 30s total across all clips."
|
|
20239
|
+
},
|
|
20240
|
+
{
|
|
20241
|
+
"name": "sound",
|
|
20242
|
+
"type": "boolean",
|
|
20243
|
+
"description": "Whether to request generated sound.",
|
|
20244
|
+
"defaultValue": true
|
|
20245
|
+
},
|
|
20246
|
+
{
|
|
20247
|
+
"name": "generationType",
|
|
20248
|
+
"type": "string",
|
|
20249
|
+
"description": "Optional workflow mode hint; inferred from reference counts when omitted.",
|
|
20250
|
+
"values": [
|
|
20251
|
+
"text_to_video",
|
|
20252
|
+
"image_to_video",
|
|
20253
|
+
"first_last_frames_to_video",
|
|
20254
|
+
"reference_to_video"
|
|
20255
|
+
]
|
|
20256
|
+
}
|
|
20257
|
+
],
|
|
20258
|
+
"examples": [
|
|
20259
|
+
{
|
|
20260
|
+
"label": "Generate video",
|
|
20261
|
+
"inputs": {
|
|
20262
|
+
"prompt": "A calm 5 second vertical shot of a minimal terminal interface glowing on a laptop",
|
|
20263
|
+
"duration": "5",
|
|
20264
|
+
"size": "9:16",
|
|
20265
|
+
"resolution": "480p",
|
|
20266
|
+
"sound": false
|
|
20267
|
+
}
|
|
20268
|
+
}
|
|
20269
|
+
],
|
|
20270
|
+
"notes": [
|
|
20271
|
+
"Seedance 2.5 has no fast tier, no 1080p, and does not support seed, extend, storyboard, elements, or negativePrompt.",
|
|
20272
|
+
"asset:// URIs are rejected; every reference must be a public HTTP/HTTPS URL. Seedance 2.0 does accept asset:// URIs.",
|
|
20273
|
+
"referenceImage supports at most 30 URLs, referenceVideo at most 10, referenceAudio at most 10, and at most 50 references in total.",
|
|
20274
|
+
"With input video the per-second rate drops but billable seconds become the summed duration of every input video (minimum 4) plus the output duration.",
|
|
20275
|
+
"generationType=text_to_video rejects reference inputs; first_last_frames_to_video requires exactly 2 reference images; only reference_to_video accepts video or audio references."
|
|
20276
|
+
]
|
|
20277
|
+
},
|
|
19968
20278
|
{
|
|
19969
20279
|
"id": "veo3.1",
|
|
19970
20280
|
"name": "Veo 3.1",
|
|
@@ -20076,9 +20386,11 @@ var cliAiModelDocs = [
|
|
|
20076
20386
|
{
|
|
20077
20387
|
"name": "duration",
|
|
20078
20388
|
"type": "string",
|
|
20079
|
-
"description": "Output duration in seconds.",
|
|
20389
|
+
"description": "Output duration in seconds. SoCheap supports 4, 6, and 8 for text_to_video and first_last_frames_to_video; fast reference_to_video is 8 only.",
|
|
20080
20390
|
"values": [
|
|
20081
|
-
"8"
|
|
20391
|
+
"8",
|
|
20392
|
+
"4",
|
|
20393
|
+
"6"
|
|
20082
20394
|
],
|
|
20083
20395
|
"defaultValue": "8"
|
|
20084
20396
|
},
|
|
@@ -20106,7 +20418,7 @@ var cliAiModelDocs = [
|
|
|
20106
20418
|
{
|
|
20107
20419
|
"name": "referenceImage",
|
|
20108
20420
|
"type": "string[]",
|
|
20109
|
-
"description": "Optional image URLs. 1
|
|
20421
|
+
"description": "Optional image URLs, at most 3. On veo-google: 1 = first frame, 2 = first and last frames, 3 = subject references. On socheap-media: 1 = reference_to_video (fast mode only), exactly 2 = first_last_frames_to_video."
|
|
20110
20422
|
},
|
|
20111
20423
|
{
|
|
20112
20424
|
"name": "generationType",
|
|
@@ -20145,8 +20457,12 @@ var cliAiModelDocs = [
|
|
|
20145
20457
|
"Veo 3.1 supports 16:9 and 9:16 output aspect ratios.",
|
|
20146
20458
|
"referenceVideo and referenceAudio are not supported.",
|
|
20147
20459
|
"image_to_video is not a supported generationType; use reference_to_video with one or more referenceImage URLs.",
|
|
20460
|
+
"socheap-media supports duration 4, 6, and 8 for text_to_video and first_last_frames_to_video at 720p, 1080p, and 4k. Fast reference_to_video remains 8 seconds.",
|
|
20461
|
+
"veo-google supports duration 4 and 6 only at resolution=720p, with at most 2 referenceImage URLs and extend unset.",
|
|
20462
|
+
"quality mode with a single referenceImage requires --provider-id veo-google; socheap-media needs exactly 2 frames in quality mode.",
|
|
20148
20463
|
"first_last_frames_to_video requires exactly 2 referenceImage URLs.",
|
|
20149
|
-
"extendFromJobId requires resolution=720p."
|
|
20464
|
+
"extendFromJobId requires resolution=720p and a source generated by socheap-media. Omit duration; SoCheap extensions have a fixed 7 second output.",
|
|
20465
|
+
"Veo renders picture and audio in one pass, so an audio-side failure fails the whole job. It is intermittent \u2014 retry the same prompt before rewriting it."
|
|
20150
20466
|
]
|
|
20151
20467
|
},
|
|
20152
20468
|
{
|
|
@@ -20674,13 +20990,6 @@ var commandDefinitions = [
|
|
|
20674
20990
|
type: "string",
|
|
20675
20991
|
enumValues: ["draft", "scheduled", "pending", "completed", "failed", "canceled"]
|
|
20676
20992
|
},
|
|
20677
|
-
{
|
|
20678
|
-
name: "accountSource",
|
|
20679
|
-
flag: "--account-source <source>",
|
|
20680
|
-
description: "Filter by account type.",
|
|
20681
|
-
type: "string",
|
|
20682
|
-
enumValues: ["oauth_account", "operation_account"]
|
|
20683
|
-
},
|
|
20684
20993
|
{
|
|
20685
20994
|
name: "agentId",
|
|
20686
20995
|
flag: "--agent-id <agentId>",
|
|
@@ -20697,7 +21006,6 @@ var commandDefinitions = [
|
|
|
20697
21006
|
{ name: "offset", source: "option", from: "offset" },
|
|
20698
21007
|
{ name: "platform", source: "option", from: "platform" },
|
|
20699
21008
|
{ name: "status", source: "option", from: "status" },
|
|
20700
|
-
{ name: "accountSource", source: "option", from: "accountSource" },
|
|
20701
21009
|
{ name: "agentId", source: "option", from: "agentId" }
|
|
20702
21010
|
]
|
|
20703
21011
|
},
|
|
@@ -20743,14 +21051,6 @@ var commandDefinitions = [
|
|
|
20743
21051
|
enumValues: ["video", "photo", "text", "mixed"]
|
|
20744
21052
|
},
|
|
20745
21053
|
{ name: "accountId", flag: "--account-id <accountId>", description: "Publishing account ID.", type: "string" },
|
|
20746
|
-
{
|
|
20747
|
-
name: "accountSource",
|
|
20748
|
-
flag: "--account-source <source>",
|
|
20749
|
-
description: "Publishing account type.",
|
|
20750
|
-
type: "string",
|
|
20751
|
-
enumValues: ["oauth_account", "operation_account"],
|
|
20752
|
-
defaultValue: "oauth_account"
|
|
20753
|
-
},
|
|
20754
21054
|
{ name: "title", flag: "--title <title>", description: "Draft title.", type: "string" },
|
|
20755
21055
|
{
|
|
20756
21056
|
name: "description",
|
|
@@ -20775,7 +21075,6 @@ var commandDefinitions = [
|
|
|
20775
21075
|
{ name: "platform", source: "option", from: "platform" },
|
|
20776
21076
|
{ name: "contentKind", source: "option", from: "contentKind" },
|
|
20777
21077
|
{ name: "accountId", source: "option", from: "accountId" },
|
|
20778
|
-
{ name: "accountSource", source: "option", from: "accountSource" },
|
|
20779
21078
|
{ name: "title", source: "option", from: "title" },
|
|
20780
21079
|
{ name: "description", source: "option", from: "description" },
|
|
20781
21080
|
{ name: "mediaUrls", source: "option", from: "mediaUrls" },
|
|
@@ -21020,16 +21319,37 @@ var commandDefinitions = [
|
|
|
21020
21319
|
type: "string",
|
|
21021
21320
|
enumValues: ["dashboard", "admin"],
|
|
21022
21321
|
defaultValue: "dashboard"
|
|
21322
|
+
},
|
|
21323
|
+
{
|
|
21324
|
+
name: "view",
|
|
21325
|
+
flag: "--view <view>",
|
|
21326
|
+
description: "Catalog detail level. Use summary for discovery and full for selected node schemas.",
|
|
21327
|
+
type: "string",
|
|
21328
|
+
enumValues: ["summary", "full"],
|
|
21329
|
+
defaultValue: "full"
|
|
21330
|
+
},
|
|
21331
|
+
{
|
|
21332
|
+
name: "nodeType",
|
|
21333
|
+
flag: "--node-type <nodeType>",
|
|
21334
|
+
description: "Return only this node type. Repeat to request multiple types.",
|
|
21335
|
+
type: "stringArray"
|
|
21023
21336
|
}
|
|
21024
21337
|
],
|
|
21025
21338
|
http: {
|
|
21026
21339
|
method: "GET",
|
|
21027
21340
|
path: "/api/cli/v1/workflows/node-catalog",
|
|
21028
21341
|
authRequired: true,
|
|
21029
|
-
query: [
|
|
21342
|
+
query: [
|
|
21343
|
+
{ name: "surface", source: "option", from: "surface" },
|
|
21344
|
+
{ name: "view", source: "option", from: "view" },
|
|
21345
|
+
{ name: "type", source: "option", from: "nodeType" }
|
|
21346
|
+
]
|
|
21030
21347
|
},
|
|
21031
21348
|
resultType: "workflowNodeCatalog",
|
|
21032
|
-
examples: [
|
|
21349
|
+
examples: [
|
|
21350
|
+
"spira workflows node-catalog --view summary --json",
|
|
21351
|
+
"spira workflows node-catalog --view full --node-type textInput --node-type textChatLlm --json"
|
|
21352
|
+
],
|
|
21033
21353
|
relatedCommands: [
|
|
21034
21354
|
"spira workflows create --name <name>",
|
|
21035
21355
|
"spira workflows update <workflowId>",
|
|
@@ -21250,6 +21570,31 @@ var commandDefinitions = [
|
|
|
21250
21570
|
examples: ["spira workflows runs start wf_123"],
|
|
21251
21571
|
relatedCommands: ["spira workflows runs get <runId>", "spira credits balance"]
|
|
21252
21572
|
},
|
|
21573
|
+
{
|
|
21574
|
+
path: ["workflows", "runs", "cancel"],
|
|
21575
|
+
purpose: "Cancel a running workflow run. Idempotent.",
|
|
21576
|
+
arguments: [{ name: "runId", description: "Workflow run ID.", required: true }],
|
|
21577
|
+
options: [
|
|
21578
|
+
{
|
|
21579
|
+
name: "surface",
|
|
21580
|
+
flag: "--surface <surface>",
|
|
21581
|
+
description: "Workflow access surface.",
|
|
21582
|
+
type: "string",
|
|
21583
|
+
enumValues: ["dashboard", "admin"],
|
|
21584
|
+
defaultValue: "dashboard"
|
|
21585
|
+
}
|
|
21586
|
+
],
|
|
21587
|
+
http: {
|
|
21588
|
+
method: "POST",
|
|
21589
|
+
path: "/api/workflows/runs/:runId/cancel",
|
|
21590
|
+
authRequired: true,
|
|
21591
|
+
pathParams: [{ name: "runId", source: "argument", from: "runId" }],
|
|
21592
|
+
body: [{ name: "surface", source: "option", from: "surface" }]
|
|
21593
|
+
},
|
|
21594
|
+
resultType: "workflowRunAction",
|
|
21595
|
+
examples: ["spira workflows runs cancel run_abc"],
|
|
21596
|
+
relatedCommands: ["spira workflows runs get <runId>", "spira workflows runs list <workflowId>"]
|
|
21597
|
+
},
|
|
21253
21598
|
{
|
|
21254
21599
|
path: ["schedules", "list"],
|
|
21255
21600
|
purpose: "List schedules.",
|
|
@@ -21365,18 +21710,10 @@ var commandDefinitions = [
|
|
|
21365
21710
|
arguments: [{ name: "url", description: "Public post or video URL.", required: true }],
|
|
21366
21711
|
options: [
|
|
21367
21712
|
{
|
|
21368
|
-
name: "
|
|
21369
|
-
flag: "--
|
|
21370
|
-
description: "
|
|
21371
|
-
type: "
|
|
21372
|
-
minimum: 144
|
|
21373
|
-
},
|
|
21374
|
-
{
|
|
21375
|
-
name: "quality",
|
|
21376
|
-
flag: "--quality <mode>",
|
|
21377
|
-
description: "compatible (default) grabs H.264 MP4 that any editor opens; best grabs the highest resolution, which may be WebM/AV1.",
|
|
21378
|
-
type: "string",
|
|
21379
|
-
enumValues: ["compatible", "best"]
|
|
21713
|
+
name: "formatId",
|
|
21714
|
+
flag: "--format-id <id>",
|
|
21715
|
+
description: "A format_id from `spira media info`. Omit for the best rung that plays everywhere. Every rung is delivered with audio.",
|
|
21716
|
+
type: "string"
|
|
21380
21717
|
},
|
|
21381
21718
|
{
|
|
21382
21719
|
name: "output",
|
|
@@ -21391,15 +21728,14 @@ var commandDefinitions = [
|
|
|
21391
21728
|
authRequired: true,
|
|
21392
21729
|
body: [
|
|
21393
21730
|
{ name: "url", source: "argument", from: "url" },
|
|
21394
|
-
{ name: "
|
|
21395
|
-
{ name: "quality", source: "option", from: "quality" }
|
|
21731
|
+
{ name: "formatId", source: "option", from: "formatId" }
|
|
21396
21732
|
]
|
|
21397
21733
|
},
|
|
21398
21734
|
resultType: "mediaAsset",
|
|
21399
21735
|
examples: [
|
|
21400
21736
|
"spira media video https://www.tiktok.com/@user/video/123",
|
|
21401
|
-
"spira media video https://www.youtube.com/watch?v=dQw4w9WgXcQ --
|
|
21402
|
-
"spira media video https://www.
|
|
21737
|
+
"spira media video https://www.youtube.com/watch?v=dQw4w9WgXcQ --output ./downloads/",
|
|
21738
|
+
"spira media video https://www.tiktok.com/@user/video/123 --format-id bytevc1_1080p_612574-0"
|
|
21403
21739
|
],
|
|
21404
21740
|
relatedCommands: ["spira media info <url>", "spira media thumbnail <url>"]
|
|
21405
21741
|
},
|
|
@@ -21610,8 +21946,12 @@ var import_node_path2 = require("node:path");
|
|
|
21610
21946
|
var import_promises = require("node:fs/promises");
|
|
21611
21947
|
var import_node_path = require("node:path");
|
|
21612
21948
|
var import_node_os = require("node:os");
|
|
21613
|
-
|
|
21614
|
-
|
|
21949
|
+
function configDir() {
|
|
21950
|
+
return process.env.SPIRA_CLI_HOME || (0, import_node_path.join)((0, import_node_os.homedir)(), ".spira");
|
|
21951
|
+
}
|
|
21952
|
+
function sessionPath() {
|
|
21953
|
+
return (0, import_node_path.join)(configDir(), "session.json");
|
|
21954
|
+
}
|
|
21615
21955
|
function normalizeBaseUrl(apiUrl) {
|
|
21616
21956
|
const parsed = new URL(apiUrl);
|
|
21617
21957
|
parsed.pathname = parsed.pathname.replace(/\/+$/, "");
|
|
@@ -21644,7 +21984,7 @@ function cookieHeaderFromSession(session) {
|
|
|
21644
21984
|
}
|
|
21645
21985
|
async function readSession() {
|
|
21646
21986
|
try {
|
|
21647
|
-
const raw = await (0, import_promises.readFile)(
|
|
21987
|
+
const raw = await (0, import_promises.readFile)(sessionPath(), "utf8");
|
|
21648
21988
|
const parsed = JSON.parse(raw);
|
|
21649
21989
|
if (!parsed.apiUrl || !Array.isArray(parsed.cookies)) return null;
|
|
21650
21990
|
return parsed;
|
|
@@ -21654,17 +21994,17 @@ async function readSession() {
|
|
|
21654
21994
|
}
|
|
21655
21995
|
}
|
|
21656
21996
|
async function writeSession(session) {
|
|
21657
|
-
await (0, import_promises.mkdir)((0, import_node_path.dirname)(
|
|
21997
|
+
await (0, import_promises.mkdir)((0, import_node_path.dirname)(sessionPath()), { recursive: true, mode: 448 });
|
|
21658
21998
|
const normalized = {
|
|
21659
21999
|
...session,
|
|
21660
22000
|
apiUrl: normalizeBaseUrl(session.apiUrl)
|
|
21661
22001
|
};
|
|
21662
|
-
await (0, import_promises.writeFile)(
|
|
22002
|
+
await (0, import_promises.writeFile)(sessionPath(), `${JSON.stringify(normalized, null, 2)}
|
|
21663
22003
|
`, { mode: 384 });
|
|
21664
22004
|
return normalized;
|
|
21665
22005
|
}
|
|
21666
22006
|
async function clearSession() {
|
|
21667
|
-
await (0, import_promises.rm)(
|
|
22007
|
+
await (0, import_promises.rm)(sessionPath(), { force: true });
|
|
21668
22008
|
}
|
|
21669
22009
|
function splitCombinedSetCookieHeader(value) {
|
|
21670
22010
|
return value.split(/,(?=\s*[^;,=\s]+=[^;,]*)/g).map((item) => item.trim()).filter(Boolean);
|
|
@@ -21694,10 +22034,12 @@ async function refreshSessionCookies(session, headers) {
|
|
|
21694
22034
|
|
|
21695
22035
|
// src/auth/config.ts
|
|
21696
22036
|
var DEFAULT_BASE_URL = "https://spira.ai";
|
|
21697
|
-
|
|
22037
|
+
function configPath() {
|
|
22038
|
+
return (0, import_node_path2.join)(configDir(), "config.json");
|
|
22039
|
+
}
|
|
21698
22040
|
async function readConfig() {
|
|
21699
22041
|
try {
|
|
21700
|
-
const raw = await (0, import_promises2.readFile)(
|
|
22042
|
+
const raw = await (0, import_promises2.readFile)(configPath(), "utf8");
|
|
21701
22043
|
const parsed = JSON.parse(raw);
|
|
21702
22044
|
return parsed && typeof parsed === "object" ? parsed : {};
|
|
21703
22045
|
} catch (error51) {
|
|
@@ -21706,8 +22048,8 @@ async function readConfig() {
|
|
|
21706
22048
|
}
|
|
21707
22049
|
}
|
|
21708
22050
|
async function writeConfig(config2) {
|
|
21709
|
-
await (0, import_promises2.mkdir)((0, import_node_path2.dirname)(
|
|
21710
|
-
await (0, import_promises2.writeFile)(
|
|
22051
|
+
await (0, import_promises2.mkdir)((0, import_node_path2.dirname)(configPath()), { recursive: true, mode: 448 });
|
|
22052
|
+
await (0, import_promises2.writeFile)(configPath(), `${JSON.stringify(config2, null, 2)}
|
|
21711
22053
|
`, { mode: 384 });
|
|
21712
22054
|
return config2;
|
|
21713
22055
|
}
|
|
@@ -22325,11 +22667,10 @@ function renderAccountList(data) {
|
|
|
22325
22667
|
return {
|
|
22326
22668
|
platform: record2.platform,
|
|
22327
22669
|
connected: record2.oauthAccountsCount,
|
|
22328
|
-
managed: record2.cloudDeviceAccountsCount,
|
|
22329
22670
|
publishWith: record2.availableStrategies
|
|
22330
22671
|
};
|
|
22331
22672
|
});
|
|
22332
|
-
return renderRows(rows, ["platform", "connected", "
|
|
22673
|
+
return renderRows(rows, ["platform", "connected", "publishWith"]);
|
|
22333
22674
|
}
|
|
22334
22675
|
return renderKeyValues(data);
|
|
22335
22676
|
}
|
|
@@ -22388,7 +22729,6 @@ function renderSocialSubmissionDetail(data) {
|
|
|
22388
22729
|
platform: raw.platform,
|
|
22389
22730
|
status: raw.status ?? "published",
|
|
22390
22731
|
contentKind: raw.contentKind,
|
|
22391
|
-
accountSource: raw.accountSource,
|
|
22392
22732
|
agentId: raw.agentId,
|
|
22393
22733
|
postUrl: nested.postUrl,
|
|
22394
22734
|
providerSubmissionId: nested.tweetId
|
|
@@ -22398,7 +22738,6 @@ function renderSocialSubmissionDetail(data) {
|
|
|
22398
22738
|
`platform: ${valueToText(record2.platform)}`,
|
|
22399
22739
|
`status: ${valueToText(record2.status)}`,
|
|
22400
22740
|
`content: ${valueToText(record2.contentKind)}`,
|
|
22401
|
-
`accountType: ${valueToText(record2.accountSource)}`,
|
|
22402
22741
|
`agentId: ${valueToText(record2.agentId)}`
|
|
22403
22742
|
];
|
|
22404
22743
|
const title = compactText(record2.title);
|
|
@@ -22549,7 +22888,7 @@ function formatMediaDuration(value) {
|
|
|
22549
22888
|
}
|
|
22550
22889
|
function renderMediaInfo(data) {
|
|
22551
22890
|
const info = objectRecord2(objectRecord2(data).info);
|
|
22552
|
-
const
|
|
22891
|
+
const options = Array.isArray(info.options) ? info.options.map(objectRecord2) : [];
|
|
22553
22892
|
const lines = [
|
|
22554
22893
|
`platform: ${valueToText(info.platform)}`,
|
|
22555
22894
|
`title: ${compactText(info.title)}`,
|
|
@@ -22561,21 +22900,20 @@ function renderMediaInfo(data) {
|
|
|
22561
22900
|
`url: ${valueToText(info.webpage_url ?? info.url)}`,
|
|
22562
22901
|
`suggestedFilename: ${valueToText(info.suggested_filename)}`
|
|
22563
22902
|
];
|
|
22564
|
-
if (
|
|
22903
|
+
if (options.length === 0) return `${lines.join("\n")}
|
|
22565
22904
|
`;
|
|
22566
|
-
const rows =
|
|
22567
|
-
format_id:
|
|
22568
|
-
|
|
22569
|
-
|
|
22570
|
-
fps:
|
|
22571
|
-
size: formatByteSize(
|
|
22572
|
-
|
|
22905
|
+
const rows = options.map((option) => ({
|
|
22906
|
+
format_id: option.format_id,
|
|
22907
|
+
resolution: option.label,
|
|
22908
|
+
codec: option.codec,
|
|
22909
|
+
fps: option.fps,
|
|
22910
|
+
size: formatByteSize(option.filesize),
|
|
22911
|
+
plays: option.compatible === true ? "anywhere" : "limited",
|
|
22912
|
+
audio: option.audio_source
|
|
22573
22913
|
}));
|
|
22574
|
-
if (rows.length === 0) return `${lines.join("\n")}
|
|
22575
|
-
`;
|
|
22576
22914
|
return `${lines.join("\n")}
|
|
22577
|
-
|
|
22578
|
-
${renderRows(rows, ["format_id", "
|
|
22915
|
+
downloadOptions (${rows.length}):
|
|
22916
|
+
${renderRows(rows, ["format_id", "resolution", "codec", "fps", "size", "plays", "audio"])}`;
|
|
22579
22917
|
}
|
|
22580
22918
|
function renderMediaAsset(data) {
|
|
22581
22919
|
const asset = objectRecord2(objectRecord2(data).asset);
|
|
@@ -23074,8 +23412,8 @@ function renderCommandIndex() {
|
|
|
23074
23412
|
`;
|
|
23075
23413
|
}
|
|
23076
23414
|
async function packageVersion() {
|
|
23077
|
-
if ("0.0.
|
|
23078
|
-
return "0.0.
|
|
23415
|
+
if ("0.0.13".length > 0) {
|
|
23416
|
+
return "0.0.13";
|
|
23079
23417
|
}
|
|
23080
23418
|
try {
|
|
23081
23419
|
const packageUrl = new URL("../package.json", import_meta.url);
|