@spira-lab/cli 0.0.11 → 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.
Files changed (3) hide show
  1. package/README.md +2 -1
  2. package/dist/index.cjs +389 -41
  3. 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 image can be reference_to_video; exactly 2 images can be first_last_frames_to_video."
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: [{ name: "surface", source: "option", from: "surface" }]
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: ["spira workflows node-catalog --json", "spira workflows node-catalog --surface admin --json"],
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.",
@@ -21601,8 +21946,12 @@ var import_node_path2 = require("node:path");
21601
21946
  var import_promises = require("node:fs/promises");
21602
21947
  var import_node_path = require("node:path");
21603
21948
  var import_node_os = require("node:os");
21604
- var CONFIG_DIR = process.env.SPIRA_CLI_HOME || (0, import_node_path.join)((0, import_node_os.homedir)(), ".spira");
21605
- var SESSION_PATH = (0, import_node_path.join)(CONFIG_DIR, "session.json");
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
+ }
21606
21955
  function normalizeBaseUrl(apiUrl) {
21607
21956
  const parsed = new URL(apiUrl);
21608
21957
  parsed.pathname = parsed.pathname.replace(/\/+$/, "");
@@ -21635,7 +21984,7 @@ function cookieHeaderFromSession(session) {
21635
21984
  }
21636
21985
  async function readSession() {
21637
21986
  try {
21638
- const raw = await (0, import_promises.readFile)(SESSION_PATH, "utf8");
21987
+ const raw = await (0, import_promises.readFile)(sessionPath(), "utf8");
21639
21988
  const parsed = JSON.parse(raw);
21640
21989
  if (!parsed.apiUrl || !Array.isArray(parsed.cookies)) return null;
21641
21990
  return parsed;
@@ -21645,17 +21994,17 @@ async function readSession() {
21645
21994
  }
21646
21995
  }
21647
21996
  async function writeSession(session) {
21648
- await (0, import_promises.mkdir)((0, import_node_path.dirname)(SESSION_PATH), { recursive: true, mode: 448 });
21997
+ await (0, import_promises.mkdir)((0, import_node_path.dirname)(sessionPath()), { recursive: true, mode: 448 });
21649
21998
  const normalized = {
21650
21999
  ...session,
21651
22000
  apiUrl: normalizeBaseUrl(session.apiUrl)
21652
22001
  };
21653
- await (0, import_promises.writeFile)(SESSION_PATH, `${JSON.stringify(normalized, null, 2)}
22002
+ await (0, import_promises.writeFile)(sessionPath(), `${JSON.stringify(normalized, null, 2)}
21654
22003
  `, { mode: 384 });
21655
22004
  return normalized;
21656
22005
  }
21657
22006
  async function clearSession() {
21658
- await (0, import_promises.rm)(SESSION_PATH, { force: true });
22007
+ await (0, import_promises.rm)(sessionPath(), { force: true });
21659
22008
  }
21660
22009
  function splitCombinedSetCookieHeader(value) {
21661
22010
  return value.split(/,(?=\s*[^;,=\s]+=[^;,]*)/g).map((item) => item.trim()).filter(Boolean);
@@ -21685,10 +22034,12 @@ async function refreshSessionCookies(session, headers) {
21685
22034
 
21686
22035
  // src/auth/config.ts
21687
22036
  var DEFAULT_BASE_URL = "https://spira.ai";
21688
- var CONFIG_PATH = (0, import_node_path2.join)(CONFIG_DIR, "config.json");
22037
+ function configPath() {
22038
+ return (0, import_node_path2.join)(configDir(), "config.json");
22039
+ }
21689
22040
  async function readConfig() {
21690
22041
  try {
21691
- const raw = await (0, import_promises2.readFile)(CONFIG_PATH, "utf8");
22042
+ const raw = await (0, import_promises2.readFile)(configPath(), "utf8");
21692
22043
  const parsed = JSON.parse(raw);
21693
22044
  return parsed && typeof parsed === "object" ? parsed : {};
21694
22045
  } catch (error51) {
@@ -21697,8 +22048,8 @@ async function readConfig() {
21697
22048
  }
21698
22049
  }
21699
22050
  async function writeConfig(config2) {
21700
- await (0, import_promises2.mkdir)((0, import_node_path2.dirname)(CONFIG_PATH), { recursive: true, mode: 448 });
21701
- await (0, import_promises2.writeFile)(CONFIG_PATH, `${JSON.stringify(config2, null, 2)}
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)}
21702
22053
  `, { mode: 384 });
21703
22054
  return config2;
21704
22055
  }
@@ -22316,11 +22667,10 @@ function renderAccountList(data) {
22316
22667
  return {
22317
22668
  platform: record2.platform,
22318
22669
  connected: record2.oauthAccountsCount,
22319
- managed: record2.cloudDeviceAccountsCount,
22320
22670
  publishWith: record2.availableStrategies
22321
22671
  };
22322
22672
  });
22323
- return renderRows(rows, ["platform", "connected", "managed", "publishWith"]);
22673
+ return renderRows(rows, ["platform", "connected", "publishWith"]);
22324
22674
  }
22325
22675
  return renderKeyValues(data);
22326
22676
  }
@@ -22379,7 +22729,6 @@ function renderSocialSubmissionDetail(data) {
22379
22729
  platform: raw.platform,
22380
22730
  status: raw.status ?? "published",
22381
22731
  contentKind: raw.contentKind,
22382
- accountSource: raw.accountSource,
22383
22732
  agentId: raw.agentId,
22384
22733
  postUrl: nested.postUrl,
22385
22734
  providerSubmissionId: nested.tweetId
@@ -22389,7 +22738,6 @@ function renderSocialSubmissionDetail(data) {
22389
22738
  `platform: ${valueToText(record2.platform)}`,
22390
22739
  `status: ${valueToText(record2.status)}`,
22391
22740
  `content: ${valueToText(record2.contentKind)}`,
22392
- `accountType: ${valueToText(record2.accountSource)}`,
22393
22741
  `agentId: ${valueToText(record2.agentId)}`
22394
22742
  ];
22395
22743
  const title = compactText(record2.title);
@@ -23064,8 +23412,8 @@ function renderCommandIndex() {
23064
23412
  `;
23065
23413
  }
23066
23414
  async function packageVersion() {
23067
- if ("0.0.11".length > 0) {
23068
- return "0.0.11";
23415
+ if ("0.0.13".length > 0) {
23416
+ return "0.0.13";
23069
23417
  }
23070
23418
  try {
23071
23419
  const packageUrl = new URL("../package.json", import_meta.url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spira-lab/cli",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Command line client for Spira.",
5
5
  "type": "module",
6
6
  "bin": {