Repository navigation
feat!: argc 10 — provider keys as secret apiKey fields, YAML whole input (3.0.0) - #5
Merged
Merged
Conversation
…put (3.0.0)
- Provider keys are `secret()` `apiKey` fields (`@celados/argc/ref`) with the
default chain env → `bw://` via `@celados/argc-latch` `createLatch()`.
Commands that always call DashScope (vocab.sync/prune, voice.record/remove)
resolve it during validation; cache-aware commands (hear, say, vocab.list,
voice.list) take an optional override and read the chain only when a provider
is called, so stored runs and cached audio stay offline.
- `defineValueSource`, `cli({ values })`, `@celados/latch-source` removed;
`value_unavailable` → `INVALID_INPUT` on `apiKey` or `key_unavailable`.
- Field-level `--text -` / `--text @file` and the `say` argv rewrite removed
(src/text-body.ts); multi-line text goes through `vox say - <<'EOF'` YAML.
- valibot ^1.5, @valibot/to-json-schema ^1.8 (argc 10 peers).
- @celados/argc ^10.2.0. - Key fields named once with addGlobalDefs: DashScopeKey (default chain, commands that always call DashScope) and ProviderKey (lazy override); @Schema declares each type once instead of repeating it per command. - say.text is ref(string, [file()]): a script on disk is text: { ref: 'file:script.txt' }, restoring reading text from a file. - Tests: argv secret literal is refused (10.1); the whitespace-key check goes through stdin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@celados/argc10.0.0 +@celados/argc-latch1.0.0; drop@celados/latch-source.secret()apiKeyfields (src/auth.ts), default chainenv:DASHSCOPE_API_KEY → bw://…/env:MIMO_API_KEY → bw://….vocab.sync,vocab.prune,voice.record,voice.remove) spread...dashscopeAuth: resolved during validation, miss =INVALID_INPUTonapiKey.hear,say,vocab.list,voice.list) take an optional override; the default chain is read only when a provider is actually called (stored runs / cached audio stay offline), miss =key_unavailable.statusprobes both default chains through the same field schemas.--text -/--text @fileand thesayargv rewrite (src/text-body.ts); multi-line TTS usesvox say - <<'EOF'YAML withtext: |.Do not merge yet — batch review with the other argc 10 migrations; merging to
maintriggers the release workflow.Test plan
bun run check(fmt, tsc, 57 tests) +bun run build;dist/vox statusresolves both keys via latchlatch env DASHSCOPE_API_KEY=bw://… -- vox vocab.list→ quota 2/10apiKey: { ref: 'env:VOXK' }+ YAML heredocsay→ real TTS wav🤖 Generated with Claude Code