@k-msg/cli 0.9.8 → 0.9.10

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/CHANGELOG.md +14 -0
  2. package/README.md +45 -15
  3. package/package.json +18 -33
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @k-msg/cli
2
2
 
3
+ ## 0.9.10 — 2026-06-29
4
+
5
+ ### Patch changes
6
+
7
+ - [a07acba](https://github.com/k-otp/k-msg/commit/a07acba136eef659aa6eaf5d77ee802149fb2970) Reset the CLI runtime around an internal command dispatcher and prompt-first interactive flows, remove generated command scaffolding and fullscreen UI dependencies, and keep shell completion/help behavior on the supported public command surface. — Thanks @imjlk!
8
+ - [28d929f](https://github.com/k-otp/k-msg/commit/28d929fc4541c576c6c6d2ea25f61d06edcecb25) Add opt-in interactive `sms send` / `alimtalk send` flows for filling missing fields, refresh provider doctor and AlimTalk preflight output with provider-specific `reason` / `next` guidance, and reposition manual onboarding checks as operator evidence for vendor prerequisites rather than CLI-managed approval state. — Thanks @imjlk!
9
+ - Updated dependencies: channel@0.29.7, core@0.29.7, messaging@0.29.7, provider@0.29.7, template@0.29.7, k-msg@0.29.7
10
+
11
+ ## 0.9.9 — 2026-04-12
12
+
13
+ ### Patch changes
14
+
15
+ - Updated dependencies: channel@0.29.6, core@0.29.6, messaging@0.29.6, provider@0.29.6, template@0.29.6, k-msg@0.29.6
16
+
3
17
  ## 0.9.8 — 2026-04-12
4
18
 
5
19
  ### Patch changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # k-msg CLI (`apps/cli`)
2
2
 
3
- This CLI is built with [Bunli](https://bunli.dev/) and uses the unified `k-msg` package (KMsg + Providers).
3
+ This CLI uses the unified `k-msg` package (KMsg + Providers) and a prompt-first runtime for interactive setup flows.
4
4
 
5
5
  ## Install (curl only)
6
6
 
@@ -29,10 +29,10 @@ It resolves shell init files by context:
29
29
  ## Run (local/dev)
30
30
 
31
31
  ```bash
32
- # Generate command types
32
+ # Prepare CLI runtime metadata
33
33
  bun run --cwd apps/cli generate
34
34
 
35
- # Validate completion metadata graph (strict)
35
+ # Validate shell completion output (strict)
36
36
  bun run --cwd apps/cli doctor:completions
37
37
 
38
38
  # Build native binary
@@ -103,18 +103,18 @@ Schema URLs:
103
103
  Initialize config:
104
104
 
105
105
  ```bash
106
- # default: interactive wizard (TTY opens the fullscreen TUI)
106
+ # default: interactive wizard (TTY uses prompt-based setup)
107
107
  k-msg config init
108
108
 
109
109
  # force full template (also auto-used in non-interactive environments)
110
110
  k-msg config init --template full
111
111
 
112
112
  # add providers incrementally
113
- # interactive TTY: opens the alternate-buffer TUI
113
+ # interactive TTY: runs prompt-based setup
114
114
  k-msg config provider add
115
115
  k-msg config provider add iwinv
116
116
 
117
- # non-interactive environments still fall back to the prompt/validation path
117
+ # non-interactive environments stay on the validation/template path
118
118
  ```
119
119
 
120
120
  ### `env:` substitution
@@ -127,8 +127,8 @@ If the env var is missing/empty, commands that need runtime providers will fail
127
127
  When you are unsure which values must be prepared before send, use this checklist:
128
128
 
129
129
  1. Configure provider credentials with `env:` references.
130
- 2. Run `k-msg providers doctor` to verify account/config readiness.
131
- 3. For AlimTalk, run `k-msg alimtalk preflight` with the provider/template/channel you will use.
130
+ 2. Run `k-msg providers doctor` to verify account/config readiness and read the provider-specific `reason` / `next` checklist lines.
131
+ 3. For AlimTalk, run `k-msg alimtalk preflight` with the provider/template/channel you will use, then follow any `reason` / `next` guidance before live sends.
132
132
  4. Send only after preflight passes.
133
133
 
134
134
  Credential examples:
@@ -166,13 +166,24 @@ Required values by provider/channel:
166
166
  | `solapi` | `ALIMTALK` | `apiKey`, `apiSecret` | `to`, `template-id`, `vars`, profileId/pfId (`--sender-key`/channel alias or `solapi.config.kakaoPfId`) | For preflight policy checks, set `plusId` via `--plus-id` or channel/default alias |
167
167
  | `mock` | all | none | minimal message fields (`to`, `text` or `template-id`/`vars`) | Local test provider |
168
168
 
169
+ ### Provider onboarding expectations
170
+
171
+ CLI readiness checks describe the vendor prerequisite path. They do **not** create or manage a generic channel approval state.
172
+
173
+ | Provider | Vendor prerequisite path | What CLI checks | Recommended next command |
174
+ | --- | --- | --- | --- |
175
+ | `iwinv` | Manual console approval | config keys, manual evidence record, template probe, sender fallback config | `k-msg providers doctor` -> `k-msg alimtalk preflight` |
176
+ | `aligo` | API-backed Kakao channel path | config keys, channel/template capabilities, Kakao list probe, plusId inference guidance | `k-msg providers doctor` -> `k-msg alimtalk preflight` |
177
+ | `solapi` | External vendor metadata + explicit binding | config keys, explicit plusId expectations, template probe result when available | `k-msg providers doctor` -> `k-msg alimtalk preflight --plus-id <plusId>` |
178
+ | `mock` | Local fixture only | basic capability checks and seed template path | `k-msg providers doctor` -> `k-msg alimtalk preflight` |
179
+
169
180
  ## Commands
170
181
 
171
- - `k-msg config init|show|validate` (`init` opens the fullscreen config form in interactive TTYs)
172
- - `k-msg config provider add [type]` (interactive TTY opens the fullscreen provider form)
182
+ - `k-msg config init|show|validate` (`init` uses prompt-based setup in interactive TTYs)
183
+ - `k-msg config provider add [type]` (interactive TTY uses prompt-based provider setup)
173
184
  - `k-msg providers list|health|doctor`
174
- - `k-msg sms send`
175
- - `k-msg alimtalk preflight|send`
185
+ - `k-msg sms send [--interactive]`
186
+ - `k-msg alimtalk preflight|send [--interactive]`
176
187
  - `k-msg completions <bash|zsh|fish|powershell>`
177
188
  - `k-msg send --input <json> | --file <path> | --stdin` (advanced/raw JSON only)
178
189
  - `k-msg db schema print|generate`
@@ -252,8 +263,9 @@ k-msg alimtalk send --provider iwinv --template-id TPL_001 --to 01012345678 --va
252
263
 
253
264
  Notes:
254
265
 
255
- - For IWINV, Kakao channel onboarding is manual in vendor console. Keep the manual ack in config updated.
266
+ - For IWINV, Kakao channel onboarding is manual in vendor console. Keep the manual evidence record in config updated.
256
267
  - For providers with `required_if_no_inference`, preflight fails when `plusId` is missing and inference cannot resolve it.
268
+ - `providers doctor` and `alimtalk preflight` print `reason:` and `next:` lines so the failing prerequisite and follow-up action are visible in text mode.
257
269
 
258
270
  ## Send
259
271
 
@@ -263,6 +275,14 @@ Notes:
263
275
  k-msg sms send --to 01012345678 --text "hello"
264
276
  ```
265
277
 
278
+ Interactive prompt flow for missing fields:
279
+
280
+ ```bash
281
+ k-msg sms send --interactive
282
+ ```
283
+
284
+ `--interactive` is opt-in, requires a TTY, and fills only missing fields. It does not change the raw JSON `k-msg send` contract.
285
+
266
286
  ### AlimTalk
267
287
 
268
288
  Terminology: the CLI uses **Kakao Channel** and **senderKey** (never “profile”).
@@ -276,6 +296,14 @@ k-msg alimtalk send \
276
296
  --plus-id @my_channel
277
297
  ```
278
298
 
299
+ Interactive prompt flow for missing fields:
300
+
301
+ ```bash
302
+ k-msg alimtalk send --interactive
303
+ ```
304
+
305
+ The interactive path prefers Kakao channel aliases first and only asks for manual `senderKey` / `plusId` input when alias/default bindings do not resolve them.
306
+
279
307
  Failover options:
280
308
 
281
309
  ```bash
@@ -303,6 +331,7 @@ k-msg alimtalk preflight \
303
331
  ```
304
332
 
305
333
  `preflight` runs onboarding checks (manual/config/capability/api probes) and template lookup before send.
334
+ Use it as an explicit readiness gate; `alimtalk send --interactive` does not auto-run preflight for you.
306
335
 
307
336
  ### Advanced JSON send
308
337
 
@@ -384,7 +413,7 @@ k-msg kakao template request --template-id TPL_001 --channel main
384
413
  ## Output / Exit Codes
385
414
 
386
415
  - `--json`: print machine-readable JSON
387
- - AI environments (Bunli `@bunli/plugin-ai-detect`): JSON output is auto-enabled
416
+ - AI environments: JSON output is auto-enabled
388
417
  when an agent is detected (`CLAUDECODE`, `CURSOR_AGENT`, `CODEX_CI` /
389
418
  `CODEX_SHELL` / `CODEX_THREAD_ID`, `MCP_SERVER_NAME` / `MCP_SESSION_ID` /
390
419
  `MCP_TOOL_NAME`)
@@ -398,7 +427,8 @@ k-msg kakao template request --template-id TPL_001 --channel main
398
427
 
399
428
  ## Manual Check Config Example
400
429
 
401
- `k-msg.config.json` can store manual onboarding evidence used by `doctor/preflight`:
430
+ `k-msg.config.json` can store manual onboarding evidence used by `doctor/preflight`.
431
+ These records are notes/evidence for external vendor steps, not a CLI-managed approval state:
402
432
 
403
433
  ```json
404
434
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k-msg/cli",
3
- "version": "0.9.8",
3
+ "version": "0.9.10",
4
4
  "private": false,
5
5
  "description": "k-msg CLI (prebuilt binaries via GitHub Releases)",
6
6
  "type": "module",
@@ -20,11 +20,11 @@
20
20
  "CHANGELOG.md"
21
21
  ],
22
22
  "scripts": {
23
- "generate": "bun run scripts/bunli-generate.ts",
24
- "doctor:completions": "bun run generate && bun run scripts/bunli-doctor-completions.ts --strict",
25
- "build": "bun run scripts/bunli-build.ts",
26
- "build:all": "bun run scripts/bunli-build.ts --targets all",
27
- "build:native": "bun run scripts/bunli-build.ts --targets native",
23
+ "generate": "bun run scripts/generate-runtime.ts",
24
+ "doctor:completions": "bun run generate && bun run scripts/doctor-completions.ts --strict",
25
+ "build": "bun run scripts/build-runtime.ts",
26
+ "build:all": "bun run scripts/build-runtime.ts --targets all",
27
+ "build:native": "bun run scripts/build-runtime.ts --targets native",
28
28
  "build:js": "bun run generate && bun build src/k-msg.ts --outdir=dist --format=esm --target=bun",
29
29
  "dev": "bun run generate && bun --watch src/k-msg.ts",
30
30
  "typecheck": "bun run generate && tsc --noEmit -p tsconfig.json",
@@ -34,33 +34,18 @@
34
34
  "clean": "rm -rf dist"
35
35
  },
36
36
  "devDependencies": {
37
- "@bunli/core": "0.9.1",
38
- "@bunli/generator": "^0.6.5",
39
- "@bunli/plugin-ai-detect": "0.6.4",
40
- "@bunli/plugin-completions": "0.3.5",
41
- "@bunli/runtime": "0.3.2",
42
- "@bunli/test": "^0.6.0",
43
- "@bunli/tui": "0.6.0",
44
- "@k-msg/channel": "0.29.4",
45
- "@k-msg/core": "0.29.4",
46
- "@k-msg/messaging": "0.29.4",
47
- "@k-msg/provider": "0.29.4",
48
- "@k-msg/template": "0.29.4",
49
- "@opentui/core-darwin-arm64": "0.1.97",
50
- "@opentui/core-darwin-x64": "0.1.97",
51
- "@opentui/core-linux-arm64": "0.1.97",
52
- "@opentui/core-linux-x64": "0.1.97",
53
- "@opentui/core-win32-x64": "0.1.97",
54
- "@types/bun": "^1.3.11",
55
- "@types/node": "^22.19.17",
56
- "@types/react": "^19.2.14",
57
- "@types/react-dom": "^19.2.3",
58
- "bunli": "0.9.1",
59
- "k-msg": "0.29.4",
60
- "react": "^19.2.5",
61
- "react-dom": "^19.2.5",
62
- "solapi": "^5.5.4",
63
- "typescript": "^5.7.2",
37
+ "@gunshi/plugin-completion": "0.35.1",
38
+ "@k-msg/channel": "0.29.6",
39
+ "@k-msg/core": "0.29.6",
40
+ "@k-msg/messaging": "0.29.6",
41
+ "@k-msg/provider": "0.29.6",
42
+ "@k-msg/template": "0.29.6",
43
+ "@types/bun": "^1.3.14",
44
+ "@types/node": "^26.0.1",
45
+ "gunshi": "0.35.1",
46
+ "k-msg": "0.29.6",
47
+ "solapi": "^6.0.1",
48
+ "typescript": "^6.0.3",
64
49
  "zod": "^4.0.14"
65
50
  },
66
51
  "keywords": [