@petercjl/seedaudiocli 0.2.0 → 0.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petercjl/seedaudiocli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Seed Audio CLI with portable Agent skill and persistent user credentials",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,6 +12,8 @@ Inputs are an explicit audio prompt, selected reference mode, output settings an
12
12
 
13
13
  Requires Node.js 22+, Python 3.9+ with SSL, network access to Doubao Speech, and an authorized API key. Run `seedaudiocli version`, `seedaudiocli capabilities --json` and `seedaudiocli doctor --json`. Resolve the canonical Skill with `seedaudiocli skill source --json`; the returned `source` directory belongs to the installed npm package.
14
14
 
15
+ When continuing an existing conversation or after a package update, load the current canonical `SKILL.md` and read the selected leaf command's `--help` (for example, `seedaudiocli generate text --help`). Build the invocation from that live contract; earlier conversation commands may belong to a different version.
16
+
15
17
  Use the current host's terminal execution capability. Its mapping is declared in [capabilities.json](capabilities.json) and the selected adapter: [Codex](adapters/codex.json) or [SealSeek](adapters/sealseek.json). Adapter mappings are implemented; host integration evidence is separate from CLI tests.
16
18
 
17
19
  ## Main flow
@@ -19,15 +21,16 @@ Use the current host's terminal execution capability. Its mapping is declared in
19
21
  1. Check `seedaudiocli auth status`. This checks local configuration only and does not prove the key is accepted remotely.
20
22
  2. If configuration is missing, ask the user for the local path to the administrator-provided JSON or env configuration file. Import with `seedaudiocli config import "FILE"`. Pass the file path to the CLI without displaying or reading its secret contents into the conversation. If configuration already exists, preserve it; an explicitly requested replacement uses `--replace`, which creates a backup. After import, return to step 1. Interactive terminal users can run `seedaudiocli setup`.
21
23
  3. Preserve the caller's prompt, model, reference mode and output choices. Choose `generate text`, `generate audio-ref`, or `generate image-ref` according to those inputs. Prompts support 1–3000 characters. Audio mode accepts up to three preset speaker IDs, public URLs or local recordings (each at most 30 seconds and 10 MiB). Image mode accepts one JPEG/PNG/WebP URL or local image (at most 10 MiB). Use `--audio-file` / `--image-file` for local files; the CLI sends their bytes directly. Audio and image references are mutually exclusive.
22
- 4. Validate the intended request with `--dry-run`. Validation must succeed before paid submission. Configuration import and dry-run do not submit generation jobs.
24
+ 4. Construct the complete generation command, including references, output settings, timeout, destination and output name. Validate that exact command by adding `--dry-run`; after success, remove only `--dry-run` for the authorized submission. If any argument changes, repeat this preflight. Configuration import and dry-run do not submit generation jobs.
23
25
  5. Execute the authorized request with `--download "OUTPUT_DIRECTORY"` when local delivery is required. The official call is synchronous; `--wait` remains a compatibility flag. Save the local task ID emitted before submission. The CLI saves the official response and audio in private local state. Generation can incur service charges.
24
26
  6. Inspect status and actual output paths. A completed task without an audio file is incomplete delivery. Report the task ID, file and material limitations; content quality remains the caller's acceptance responsibility.
25
27
 
26
28
  ## Invocation examples
27
29
 
28
30
  ```bash
29
- seedaudiocli generate text --prompt "Generate five seconds of instrumental piano." --dry-run
30
- seedaudiocli generate text --prompt "Generate five seconds of instrumental piano." --wait --download ./audio
31
+ seedaudiocli generate text --help
32
+ seedaudiocli generate text --prompt "Generate five seconds of instrumental piano." --timeout 300 --download ./audio --output-name piano --dry-run
33
+ seedaudiocli generate text --prompt "Generate five seconds of instrumental piano." --timeout 300 --download ./audio --output-name piano
31
34
  seedaudiocli generate audio-ref --audio-reference zh_female_vv_uranus_bigtts --prompt "@音频1 今天的咖啡刚刚好。" --wait --download ./audio
32
35
  seedaudiocli generate image-ref --image-url "https://example.com/reference.jpg" --prompt "Generate audio matching the supplied reference." --dry-run
33
36
  seedaudiocli task get TASK_ID
@@ -39,8 +42,11 @@ Use `@音频1` through `@音频3` to address references in order; `--audio-refer
39
42
 
40
43
  The only provider endpoint is `https://openspeech.bytedance.com/api/v3/tts/create`, with model `seed-audio-1.0` and `X-Api-Key` authentication. Use a Doubao Speech API key authorized for Seed Audio. Ark credentials belong to another service. The official schema is documented at https://docs.volcengine.com/docs/DoubaoVoice/audio-generation-http?lang=zh.
41
44
 
45
+ Official generation waits synchronously for the HTTP response. `--timeout` sets the request timeout in seconds; `--wait` is an optional compatibility flag. `--interval` is unsupported because there is no remote polling loop. When migrating an old invocation, omit `--interval` and its value while preserving the caller's supported choices; it is not a substitute for `--timeout`.
46
+
42
47
  ## Error and recovery branches
43
48
 
49
+ - Argument parsing error (`unrecognized arguments`, exit 2): read the selected command's current help, correct the invocation and return to step 4. A confirmed local parser rejection happens before audio submission, so it does not require `--force`. This branch applies only to a parser error; timeout, connection loss or a returned task ID require the recovery branches below. Inspect the CLI exit status and stderr directly; a following shell command can mask its exit status.
44
50
  - `CONFIG_REQUIRED`: request the file path, import, then return to authentication check.
45
51
  - `CONFIG_INVALID` or `CONFIG_READ_FAILED`: request a corrected file/path. Preserve the saved configuration.
46
52
  - `CONFIG_EXISTS`: explain that configuration already exists; replace only when the user requests it.