@spira-lab/cli 0.0.7 → 0.0.8

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 (2) hide show
  1. package/dist/index.cjs +100 -117
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -18048,7 +18048,6 @@ var cliResultTypeSchema = external_exports.enum([
18048
18048
  "aiJobAction",
18049
18049
  "aiModelList",
18050
18050
  "aiModelDetail",
18051
- "aiModelProviderList",
18052
18051
  "workflowList",
18053
18052
  "workflowNodeCatalog",
18054
18053
  "workflowDetail",
@@ -18084,13 +18083,16 @@ var cliResultSchema = external_exports.object({
18084
18083
  // src/ai/model-docs.ts
18085
18084
  var cliAiModelDocs = [
18086
18085
  {
18087
- "id": "ai-influencer-image",
18086
+ "id": "higgsfield-ai/soul/standard",
18088
18087
  "name": "AI Influencer",
18089
18088
  "mediaType": "image",
18090
18089
  "description": "AI Influencer image generation model.",
18091
18090
  "capabilities": [
18092
18091
  "text-to-image"
18093
18092
  ],
18093
+ "providers": [
18094
+ "image-higgsfield"
18095
+ ],
18094
18096
  "variants": [
18095
18097
  {
18096
18098
  "key": "default",
@@ -18153,6 +18155,9 @@ var cliAiModelDocs = [
18153
18155
  "text-to-image",
18154
18156
  "image-to-image"
18155
18157
  ],
18158
+ "providers": [
18159
+ "socheap-media"
18160
+ ],
18156
18161
  "variants": [
18157
18162
  {
18158
18163
  "key": "1k",
@@ -18243,6 +18248,9 @@ var cliAiModelDocs = [
18243
18248
  "text-to-image",
18244
18249
  "image-to-image"
18245
18250
  ],
18251
+ "providers": [
18252
+ "socheap-media"
18253
+ ],
18246
18254
  "variants": [
18247
18255
  {
18248
18256
  "key": "standard",
@@ -18323,6 +18331,9 @@ var cliAiModelDocs = [
18323
18331
  "text-to-image",
18324
18332
  "image-to-image"
18325
18333
  ],
18334
+ "providers": [
18335
+ "socheap-media"
18336
+ ],
18326
18337
  "variants": [
18327
18338
  {
18328
18339
  "key": "1k",
@@ -18419,6 +18430,9 @@ var cliAiModelDocs = [
18419
18430
  "text-to-image",
18420
18431
  "image-to-image"
18421
18432
  ],
18433
+ "providers": [
18434
+ "image-kie"
18435
+ ],
18422
18436
  "variants": [
18423
18437
  {
18424
18438
  "key": "default",
@@ -18491,6 +18505,9 @@ var cliAiModelDocs = [
18491
18505
  "text-to-image",
18492
18506
  "image-to-image"
18493
18507
  ],
18508
+ "providers": [
18509
+ "socheap-media"
18510
+ ],
18494
18511
  "variants": [
18495
18512
  {
18496
18513
  "key": "1k",
@@ -18581,6 +18598,9 @@ var cliAiModelDocs = [
18581
18598
  "text-to-video",
18582
18599
  "image-to-video"
18583
18600
  ],
18601
+ "providers": [
18602
+ "socheap-media"
18603
+ ],
18584
18604
  "variants": [
18585
18605
  {
18586
18606
  "key": "4s-720p",
@@ -18840,6 +18860,9 @@ var cliAiModelDocs = [
18840
18860
  "text-to-video",
18841
18861
  "image-to-video"
18842
18862
  ],
18863
+ "providers": [
18864
+ "socheap-media"
18865
+ ],
18843
18866
  "variants": [
18844
18867
  {
18845
18868
  "key": "480p",
@@ -18951,6 +18974,9 @@ var cliAiModelDocs = [
18951
18974
  "text-to-video",
18952
18975
  "image-to-video"
18953
18976
  ],
18977
+ "providers": [
18978
+ "hailuo-comfly"
18979
+ ],
18954
18980
  "variants": [
18955
18981
  {
18956
18982
  "key": "default",
@@ -19004,8 +19030,8 @@ var cliAiModelDocs = [
19004
19030
  }
19005
19031
  ],
19006
19032
  "notes": [
19007
- "referenceVideo and generationType are not supported for this model.",
19008
- "duration=10 with resolution=1080P is not supported."
19033
+ "referenceVideo and generationType are not supported by the Hailuo Comfly provider.",
19034
+ "duration=10 with resolution=1080P is rejected by the provider validator."
19009
19035
  ]
19010
19036
  },
19011
19037
  {
@@ -19017,6 +19043,9 @@ var cliAiModelDocs = [
19017
19043
  "text-to-video",
19018
19044
  "image-to-video"
19019
19045
  ],
19046
+ "providers": [
19047
+ "socheap-media"
19048
+ ],
19020
19049
  "variants": [
19021
19050
  {
19022
19051
  "key": "720p",
@@ -19140,6 +19169,9 @@ var cliAiModelDocs = [
19140
19169
  "capabilities": [
19141
19170
  "image-to-video"
19142
19171
  ],
19172
+ "providers": [
19173
+ "fal-ai"
19174
+ ],
19143
19175
  "variants": [
19144
19176
  {
19145
19177
  "key": "default",
@@ -19254,6 +19286,9 @@ var cliAiModelDocs = [
19254
19286
  "text-to-video",
19255
19287
  "image-to-video"
19256
19288
  ],
19289
+ "providers": [
19290
+ "socheap-media"
19291
+ ],
19257
19292
  "variants": [
19258
19293
  {
19259
19294
  "key": "standard-no-sound",
@@ -19396,7 +19431,7 @@ var cliAiModelDocs = [
19396
19431
  ],
19397
19432
  "notes": [
19398
19433
  "generation type is derived from referenceImage count: 0 text, 1 reference, 2 first/last frames.",
19399
- "referenceVideo, negativePrompt, and elements are not supported for Kling 3.0.",
19434
+ "referenceVideo, negativePrompt, and elements are not supported on the SoCheap Kling 3.0 path.",
19400
19435
  "Use mode=4K for 4K generation; do not pass resolution."
19401
19436
  ]
19402
19437
  },
@@ -19408,6 +19443,9 @@ var cliAiModelDocs = [
19408
19443
  "capabilities": [
19409
19444
  "image-to-video"
19410
19445
  ],
19446
+ "providers": [
19447
+ "socheap-media"
19448
+ ],
19411
19449
  "variants": [
19412
19450
  {
19413
19451
  "key": "standard",
@@ -19528,6 +19566,9 @@ var cliAiModelDocs = [
19528
19566
  "text-to-video",
19529
19567
  "image-to-video"
19530
19568
  ],
19569
+ "providers": [
19570
+ "socheap-media"
19571
+ ],
19531
19572
  "variants": [
19532
19573
  {
19533
19574
  "key": "standard-480p-no-sound",
@@ -19689,6 +19730,9 @@ var cliAiModelDocs = [
19689
19730
  "text-to-video",
19690
19731
  "image-to-video"
19691
19732
  ],
19733
+ "providers": [
19734
+ "socheap-media"
19735
+ ],
19692
19736
  "variants": [
19693
19737
  {
19694
19738
  "key": "standard-480p",
@@ -19972,6 +20016,9 @@ var cliAiModelDocs = [
19972
20016
  "text-to-video",
19973
20017
  "image-to-video"
19974
20018
  ],
20019
+ "providers": [
20020
+ "socheap-media"
20021
+ ],
19975
20022
  "variants": [
19976
20023
  {
19977
20024
  "key": "fast-720p",
@@ -20122,9 +20169,14 @@ var cliAiModelDocs = [
20122
20169
  "description": "Whether the generated video should be extendable when supported."
20123
20170
  },
20124
20171
  {
20125
- "name": "extendFromJobId",
20172
+ "name": "extendFromTaskId",
20126
20173
  "type": "string",
20127
- "description": "Spira job ID of an extendable Veo generation owned by the current user."
20174
+ "description": "Provider task id of an existing Veo generation to extend."
20175
+ },
20176
+ {
20177
+ "name": "extendProviderId",
20178
+ "type": "string",
20179
+ "description": "Original provider id for extension lineage. Must be socheap-media for this CLI path."
20128
20180
  }
20129
20181
  ],
20130
20182
  "examples": [
@@ -20144,7 +20196,7 @@ var cliAiModelDocs = [
20144
20196
  "referenceVideo and referenceAudio are not supported.",
20145
20197
  "image_to_video is not a supported generationType; use reference_to_video with one or more referenceImage URLs.",
20146
20198
  "first_last_frames_to_video requires exactly 2 referenceImage URLs.",
20147
- "extendFromJobId requires resolution=720p."
20199
+ "extendFromTaskId requires extendProviderId=socheap-media and resolution=720p."
20148
20200
  ]
20149
20201
  },
20150
20202
  {
@@ -20153,6 +20205,7 @@ var cliAiModelDocs = [
20153
20205
  mediaType: "audio",
20154
20206
  description: "Suno music generation with simple prompt and custom song modes.",
20155
20207
  capabilities: ["text-to-audio"],
20208
+ providers: ["socheap-media"],
20156
20209
  variants: [
20157
20210
  {
20158
20211
  key: "v5_5",
@@ -20217,6 +20270,7 @@ var cliAiModelDocs = [
20217
20270
  mediaType: "audio",
20218
20271
  description: "ElevenLabs prompt-to-music generation.",
20219
20272
  capabilities: ["text-to-audio"],
20273
+ providers: ["elevenlabs-audio"],
20220
20274
  variants: [
20221
20275
  {
20222
20276
  key: "default",
@@ -20256,6 +20310,7 @@ var cliAiModelDocs = [
20256
20310
  mediaType: "audio",
20257
20311
  description: "ElevenLabs sound-effect generation from an English prompt.",
20258
20312
  capabilities: ["text-to-audio"],
20313
+ providers: ["elevenlabs-audio"],
20259
20314
  variants: [
20260
20315
  {
20261
20316
  key: "default",
@@ -20295,6 +20350,7 @@ var cliAiModelDocs = [
20295
20350
  mediaType: "audio",
20296
20351
  description: "ElevenLabs text-to-speech using an existing voice ID.",
20297
20352
  capabilities: ["text-to-speech"],
20353
+ providers: ["elevenlabs-audio"],
20298
20354
  variants: [
20299
20355
  {
20300
20356
  key: "multilingual-v2-v3",
@@ -20342,6 +20398,7 @@ var cliAiModelDocs = [
20342
20398
  mediaType: "audio",
20343
20399
  description: "Text-to-speech using either an existing voice ID or one reference audio URL.",
20344
20400
  capabilities: ["text-to-speech", "audio-to-speech"],
20401
+ providers: ["elevenlabs-audio"],
20345
20402
  variants: [
20346
20403
  {
20347
20404
  key: "voice-clone-tts",
@@ -20405,7 +20462,6 @@ function getCliAiModelDoc(modelId) {
20405
20462
  }
20406
20463
 
20407
20464
  // src/ai/wait.ts
20408
- var DEFAULT_WAIT_COMMAND = "spira ai jobs create";
20409
20465
  function wait(durationMs) {
20410
20466
  return new Promise((resolve) => setTimeout(resolve, durationMs));
20411
20467
  }
@@ -20425,27 +20481,27 @@ function providerError(result) {
20425
20481
  }
20426
20482
  return void 0;
20427
20483
  }
20428
- function completedResult(result, command) {
20484
+ function completedResult(result) {
20429
20485
  return cliResultSchema.parse({
20430
20486
  ...result,
20431
20487
  resultType: "aiJobStatus",
20432
- command,
20488
+ command: "spira ai jobs create",
20433
20489
  nextActions: []
20434
20490
  });
20435
20491
  }
20436
- function pollingError(result, command) {
20492
+ function pollingError(result) {
20437
20493
  return cliResultSchema.parse({
20438
20494
  ...result,
20439
- command
20495
+ command: "spira ai jobs create"
20440
20496
  });
20441
20497
  }
20442
- function terminalError(result, jobId, status, command) {
20498
+ function terminalError(result, jobId, status) {
20443
20499
  const message = providerError(result) ?? `AI job ${jobId} ended with status ${status}.`;
20444
20500
  return cliResultSchema.parse({
20445
20501
  ...result,
20446
20502
  status: "error",
20447
20503
  resultType: "aiJobStatus",
20448
- command,
20504
+ command: "spira ai jobs create",
20449
20505
  error: {
20450
20506
  code: status === "FAILED" ? "PROVIDER_FAILED" : "ASYNC_STATE",
20451
20507
  message,
@@ -20455,12 +20511,12 @@ function terminalError(result, jobId, status, command) {
20455
20511
  }
20456
20512
  });
20457
20513
  }
20458
- function timeoutResult(jobId, timeoutMs, command, lastResult) {
20514
+ function timeoutResult(jobId, timeoutMs, lastResult) {
20459
20515
  return cliResultSchema.parse({
20460
20516
  object: "cli.result",
20461
20517
  status: "error",
20462
20518
  resultType: "aiJobStatus",
20463
- command,
20519
+ command: "spira ai jobs create",
20464
20520
  data: lastResult?.data,
20465
20521
  ids: { ...lastResult?.ids, jobId },
20466
20522
  error: {
@@ -20468,19 +20524,16 @@ function timeoutResult(jobId, timeoutMs, command, lastResult) {
20468
20524
  message: `AI job ${jobId} did not finish within ${timeoutMs}ms.`,
20469
20525
  resource: { type: "aiJob", id: jobId },
20470
20526
  retryable: true,
20471
- nextActions: [
20472
- { label: "Keep waiting", command: `spira ai jobs wait ${jobId}` },
20473
- { label: "Show job status", command: `spira ai jobs status ${jobId}` }
20474
- ]
20527
+ nextActions: [{ label: "Show job status", command: `spira ai jobs status ${jobId}` }]
20475
20528
  }
20476
20529
  });
20477
20530
  }
20478
- function contractError(result, jobId, command) {
20531
+ function contractError(result, jobId) {
20479
20532
  return cliResultSchema.parse({
20480
20533
  ...result,
20481
20534
  status: "error",
20482
20535
  resultType: "aiJobStatus",
20483
- command,
20536
+ command: "spira ai jobs create",
20484
20537
  error: {
20485
20538
  code: "CONTRACT_MISMATCH",
20486
20539
  message: `AI job ${jobId} status response did not contain a recognized status.`,
@@ -20493,7 +20546,6 @@ function contractError(result, jobId, command) {
20493
20546
  async function waitForAiJob(input) {
20494
20547
  const now = input.now ?? Date.now;
20495
20548
  const sleep = input.sleep ?? wait;
20496
- const command = input.command ?? DEFAULT_WAIT_COMMAND;
20497
20549
  const deadline = now() + input.timeoutMs;
20498
20550
  let lastResult;
20499
20551
  let lastStatus;
@@ -20501,19 +20553,19 @@ async function waitForAiJob(input) {
20501
20553
  const result = await input.poll();
20502
20554
  lastResult = result;
20503
20555
  if (result.status === "error") {
20504
- if (!result.error?.retryable) return pollingError(result, command);
20556
+ if (!result.error?.retryable) return pollingError(result);
20505
20557
  } else {
20506
20558
  const status = jobStatus(result);
20507
20559
  if (status && status !== lastStatus) {
20508
20560
  input.onStatus?.(status);
20509
20561
  lastStatus = status;
20510
20562
  }
20511
- if (status === "COMPLETED") return completedResult(result, command);
20512
- if (status === "FAILED" || status === "CANCELED") return terminalError(result, input.jobId, status, command);
20513
- if (status !== "QUEUED" && status !== "RUNNING") return contractError(result, input.jobId, command);
20563
+ if (status === "COMPLETED") return completedResult(result);
20564
+ if (status === "FAILED" || status === "CANCELED") return terminalError(result, input.jobId, status);
20565
+ if (status !== "QUEUED" && status !== "RUNNING") return contractError(result, input.jobId);
20514
20566
  }
20515
20567
  const remainingMs = deadline - now();
20516
- if (remainingMs <= 0) return timeoutResult(input.jobId, input.timeoutMs, command, lastResult);
20568
+ if (remainingMs <= 0) return timeoutResult(input.jobId, input.timeoutMs, lastResult);
20517
20569
  await sleep(Math.min(input.intervalMs, remainingMs));
20518
20570
  }
20519
20571
  }
@@ -20843,33 +20895,7 @@ var commandDefinitions = [
20843
20895
  },
20844
20896
  resultType: "aiJobStatus",
20845
20897
  examples: ["spira ai jobs status job_123"],
20846
- relatedCommands: ["spira ai jobs wait <jobId>"]
20847
- },
20848
- {
20849
- path: ["ai", "jobs", "wait"],
20850
- purpose: "Block until an AI job finishes, then print the final result.",
20851
- arguments: [{ name: "jobId", description: "AI job ID.", required: true }],
20852
- options: [
20853
- {
20854
- name: "timeout",
20855
- flag: "--timeout <duration>",
20856
- description: "Maximum wait duration.",
20857
- type: "duration",
20858
- defaultValue: 6e5,
20859
- minimum: 1e3
20860
- },
20861
- {
20862
- name: "interval",
20863
- flag: "--interval <duration>",
20864
- description: "Polling interval while waiting.",
20865
- type: "duration",
20866
- defaultValue: 3e3,
20867
- minimum: 1e3
20868
- }
20869
- ],
20870
- resultType: "aiJobStatus",
20871
- examples: ["spira ai jobs wait job_123", "spira ai jobs wait job_123 --timeout 20m --interval 5s"],
20872
- relatedCommands: ["spira ai jobs status <jobId>", "spira ai jobs create"]
20898
+ relatedCommands: []
20873
20899
  },
20874
20900
  {
20875
20901
  path: ["ai", "models", "list"],
@@ -20895,21 +20921,6 @@ var commandDefinitions = [
20895
20921
  examples: ["spira ai models get nano-banana-2", "spira ai models get seedance-2.0"],
20896
20922
  relatedCommands: ["spira ai jobs create"]
20897
20923
  },
20898
- {
20899
- path: ["ai", "models", "providers"],
20900
- purpose: "List provider routing IDs for AI models; requires admin.access.",
20901
- permissions: ["admin.access"],
20902
- arguments: [{ name: "modelId", description: "Optional AI model ID.", required: false }],
20903
- http: {
20904
- method: "GET",
20905
- path: "/api/cli/v1/ai/models/providers",
20906
- authRequired: true,
20907
- query: [{ name: "modelId", source: "argument", from: "modelId" }]
20908
- },
20909
- resultType: "aiModelProviderList",
20910
- examples: ["spira ai models providers", "spira ai models providers veo3.1 --json"],
20911
- relatedCommands: ["spira ai models list", "spira ai jobs create"]
20912
- },
20913
20924
  {
20914
20925
  path: ["ai", "jobs", "create"],
20915
20926
  purpose: "Create an AI image, video, or audio generation job.",
@@ -20918,8 +20929,9 @@ var commandDefinitions = [
20918
20929
  {
20919
20930
  name: "providerId",
20920
20931
  flag: "--provider-id <providerId>",
20921
- description: "Explicit provider routing override; requires admin.access.",
20922
- type: "string"
20932
+ description: "Advanced routing override.",
20933
+ type: "string",
20934
+ hidden: true
20923
20935
  },
20924
20936
  {
20925
20937
  name: "inputsJson",
@@ -20966,12 +20978,7 @@ var commandDefinitions = [
20966
20978
  `spira ai jobs create --model-id nano-banana-2 --inputs-json '{"prompt":"A product photo"}'`,
20967
20979
  `spira ai jobs create --model-id nano-banana-2 --inputs-json '{"prompt":"A product photo"}' --wait`
20968
20980
  ],
20969
- relatedCommands: [
20970
- "spira ai jobs wait <jobId>",
20971
- "spira ai jobs status <jobId>",
20972
- "spira ai models get <modelId>",
20973
- "spira credits balance"
20974
- ]
20981
+ relatedCommands: ["spira ai jobs status <jobId>", "spira ai models get <modelId>", "spira credits balance"]
20975
20982
  },
20976
20983
  {
20977
20984
  path: ["workflows", "list"],
@@ -21605,7 +21612,7 @@ async function refreshSessionCookies(session, headers) {
21605
21612
  }
21606
21613
 
21607
21614
  // src/auth/config.ts
21608
- var DEFAULT_BASE_URL = "http://localhost:3000";
21615
+ var DEFAULT_BASE_URL = "https://spira.ai";
21609
21616
  var CONFIG_PATH = (0, import_node_path2.join)(CONFIG_DIR, "config.json");
21610
21617
  async function readConfig() {
21611
21618
  try {
@@ -22103,18 +22110,20 @@ function dataArray(data) {
22103
22110
  }
22104
22111
  function renderRows(rows, columns) {
22105
22112
  if (rows.length === 0) return "No results.\n";
22106
- const records = rows.map(
22107
- (row) => row && typeof row === "object" ? row : { value: row }
22108
- );
22113
+ const records = rows.map((row) => row && typeof row === "object" ? row : { value: row });
22109
22114
  const widths = columns.map(
22110
- (column) => Math.min(42, Math.max(column.length, ...records.map((record2) => valueToText(record2[column]).slice(0, 42).length)))
22115
+ (column) => Math.min(
22116
+ 42,
22117
+ Math.max(
22118
+ column.length,
22119
+ ...records.map((record2) => valueToText(record2[column]).slice(0, 42).length)
22120
+ )
22121
+ )
22111
22122
  );
22112
22123
  const header = columns.map((column, index) => column.padEnd(widths[index])).join(" ");
22113
22124
  const divider = widths.map((width) => "-".repeat(width)).join(" ");
22114
22125
  const body = records.map(
22115
- (record2) => columns.map(
22116
- (column, index) => valueToText(record2[column]).replace(/\s+/g, " ").slice(0, widths[index]).padEnd(widths[index])
22117
- ).join(" ")
22126
+ (record2) => columns.map((column, index) => valueToText(record2[column]).replace(/\s+/g, " ").slice(0, widths[index]).padEnd(widths[index])).join(" ")
22118
22127
  ).join("\n");
22119
22128
  return `${header}
22120
22129
  ${divider}
@@ -22284,9 +22293,6 @@ function renderAiJobStatus(data) {
22284
22293
  function renderAiModelList(data) {
22285
22294
  return renderRows(dataArray(data), ["id", "mediaType", "creditOptions", "name", "capabilities"]);
22286
22295
  }
22287
- function renderAiModelProviderList(data) {
22288
- return renderRows(dataArray(data), ["modelId", "name", "providers", "hidden"]);
22289
- }
22290
22296
  function renderAiModelDetail(data) {
22291
22297
  const record2 = objectRecord2(data);
22292
22298
  const fields = Array.isArray(record2.fields) ? record2.fields.map(objectRecord2) : [];
@@ -22506,8 +22512,6 @@ function renderSuccess(result) {
22506
22512
  return renderAiModelList(result.data);
22507
22513
  case "aiModelDetail":
22508
22514
  return renderAiModelDetail(result.data);
22509
- case "aiModelProviderList":
22510
- return renderAiModelProviderList(result.data);
22511
22515
  case "workflowList":
22512
22516
  return renderRows(dataArray(result.data), ["id", "name", "creatorName", "nodeTypes", "updatedAt"]);
22513
22517
  case "workflowNodeCatalog":
@@ -22523,14 +22527,7 @@ function renderSuccess(result) {
22523
22527
  case "scheduleOccurrenceList":
22524
22528
  return renderRows(dataArray(result.data), ["id", "scheduleId", "scheduledAt", "status", "executorType"]);
22525
22529
  case "scheduleExecutionList":
22526
- return renderRows(dataArray(result.data), [
22527
- "id",
22528
- "scheduleId",
22529
- "status",
22530
- "originalScheduledAt",
22531
- "startedAt",
22532
- "finishedAt"
22533
- ]);
22530
+ return renderRows(dataArray(result.data), ["id", "scheduleId", "status", "originalScheduledAt", "startedAt", "finishedAt"]);
22534
22531
  case "dataBaseGlob":
22535
22532
  return renderDataBaseGlob(result.data);
22536
22533
  case "dataBaseRead":
@@ -22868,8 +22865,8 @@ function renderCommandIndex() {
22868
22865
  `;
22869
22866
  }
22870
22867
  async function packageVersion() {
22871
- if ("0.0.7".length > 0) {
22872
- return "0.0.7";
22868
+ if ("0.0.8".length > 0) {
22869
+ return "0.0.8";
22873
22870
  }
22874
22871
  try {
22875
22872
  const packageUrl = new URL("../package.json", import_meta.url);
@@ -23072,20 +23069,6 @@ ${url2}
23072
23069
  timeoutMs: options.waitTimeout,
23073
23070
  intervalMs: options.waitInterval,
23074
23071
  onStatus: (status) => output.error(`AI job ${jobId}: ${status}
23075
- `),
23076
- poll: () => executeHttpCommand({ command: statusCommand, args: { jobId }, options: {} })
23077
- });
23078
- }
23079
- if (commandKey(definition.path) === "ai jobs wait") {
23080
- const statusCommand = findCommandDefinition(["ai", "jobs", "status"]);
23081
- if (!statusCommand) throw new Error("AI job status command is not registered.");
23082
- const jobId = args.jobId;
23083
- return waitForAiJob({
23084
- jobId,
23085
- command: "spira ai jobs wait",
23086
- timeoutMs: options.timeout,
23087
- intervalMs: options.interval,
23088
- onStatus: (status) => output.error(`AI job ${jobId}: ${status}
23089
23072
  `),
23090
23073
  poll: () => executeHttpCommand({ command: statusCommand, args: { jobId }, options: {} })
23091
23074
  });
@@ -23115,7 +23098,7 @@ function addLeafCommand(root, definition, output) {
23115
23098
  output.write(
23116
23099
  renderResult(result, {
23117
23100
  json: Boolean(options.json),
23118
- compactAiJobWait: commandKey(definition.path) === "ai jobs create" && options.wait === true || commandKey(definition.path) === "ai jobs wait"
23101
+ compactAiJobWait: commandKey(definition.path) === "ai jobs create" && options.wait === true
23119
23102
  })
23120
23103
  );
23121
23104
  if (result.status === "error") process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spira-lab/cli",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Command line client for Spira.",
5
5
  "type": "module",
6
6
  "bin": {