@k-msg/cli 0.9.9 → 0.9.11

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @k-msg/cli
2
2
 
3
+ ## 0.9.11 — 2026-07-10
4
+
5
+ ### Patch changes
6
+
7
+ - [0fd984f](https://github.com/k-otp/k-msg/commit/0fd984fde13ff79e289cf30ac9b157acd906f20d) Improve CLI first-run onboarding and completion UX by fixing npm checksum installs, promoting global config usage, tightening Kakao alias validation, and clarifying interactive config flows. — Thanks @imjlk!
8
+ - Updated dependencies: channel@0.29.8, core@0.29.8, messaging@0.29.8, provider@0.29.8, template@0.29.8, k-msg@0.29.8
9
+
10
+ ## 0.9.10 — 2026-06-29
11
+
12
+ ### Patch changes
13
+
14
+ - [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!
15
+ - [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!
16
+ - 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
17
+
3
18
  ## 0.9.9 — 2026-04-12
4
19
 
5
20
  ### 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
@@ -88,10 +88,11 @@ Default config path:
88
88
  Override:
89
89
 
90
90
  ```bash
91
+ k-msg --config /path/to/k-msg.config.json providers list
91
92
  k-msg providers list --config /path/to/k-msg.config.json
92
93
  ```
93
94
 
94
- Note: `--config` is a subcommand option in the current CLI (for example: `providers`, `sms`, `alimtalk`).
95
+ `--config` can be passed either before the command path or as a command-local option.
95
96
 
96
97
  Example file: `apps/cli/k-msg.config.example.json`
97
98
 
@@ -103,32 +104,37 @@ Schema URLs:
103
104
  Initialize config:
104
105
 
105
106
  ```bash
106
- # default: interactive wizard (TTY opens the fullscreen TUI)
107
+ # default: interactive wizard on a TTY, mock-only template in non-interactive shells
107
108
  k-msg config init
108
109
 
109
- # force full template (also auto-used in non-interactive environments)
110
+ # force a local mock-only starter config
111
+ k-msg config init --template mock-only
112
+
113
+ # force the full multi-provider template
110
114
  k-msg config init --template full
111
115
 
112
116
  # add providers incrementally
113
- # interactive TTY: opens the alternate-buffer TUI
117
+ # interactive TTY: runs prompt-based setup
114
118
  k-msg config provider add
115
119
  k-msg config provider add iwinv
116
120
 
117
- # non-interactive environments still fall back to the prompt/validation path
121
+ # explicit interactive mode requires a TTY
122
+ k-msg config init --template interactive
118
123
  ```
119
124
 
120
125
  ### `env:` substitution
121
126
 
122
127
  Any string value like `"env:NAME"` is replaced with the `NAME` environment variable at runtime.
123
- If the env var is missing/empty, commands that need runtime providers will fail with exit code `2`.
128
+ If the env var is missing/empty, commands that need that provider will fail with exit code `2`.
129
+ For a first local smoke test, prefer `k-msg config init --template mock-only`.
124
130
 
125
131
  ### Provider send value guide
126
132
 
127
133
  When you are unsure which values must be prepared before send, use this checklist:
128
134
 
129
135
  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.
136
+ 2. Run `k-msg providers doctor` to verify account/config readiness and read the provider-specific `reason` / `next` checklist lines.
137
+ 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
138
  4. Send only after preflight passes.
133
139
 
134
140
  Credential examples:
@@ -166,13 +172,24 @@ Required values by provider/channel:
166
172
  | `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
173
  | `mock` | all | none | minimal message fields (`to`, `text` or `template-id`/`vars`) | Local test provider |
168
174
 
175
+ ### Provider onboarding expectations
176
+
177
+ CLI readiness checks describe the vendor prerequisite path. They do **not** create or manage a generic channel approval state.
178
+
179
+ | Provider | Vendor prerequisite path | What CLI checks | Recommended next command |
180
+ | --- | --- | --- | --- |
181
+ | `iwinv` | Manual console approval | config keys, manual evidence record, template probe, sender fallback config | `k-msg providers doctor` -> `k-msg alimtalk preflight` |
182
+ | `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` |
183
+ | `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>` |
184
+ | `mock` | Local fixture only | basic capability checks and seed template path | `k-msg providers doctor` -> `k-msg alimtalk preflight` |
185
+
169
186
  ## Commands
170
187
 
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)
188
+ - `k-msg config init|show|validate` (`init` uses prompt-based setup in interactive TTYs)
189
+ - `k-msg config provider add [type]` (interactive TTY uses prompt-based provider setup)
173
190
  - `k-msg providers list|health|doctor`
174
- - `k-msg sms send`
175
- - `k-msg alimtalk preflight|send`
191
+ - `k-msg sms send [--interactive]`
192
+ - `k-msg alimtalk preflight|send [--interactive]`
176
193
  - `k-msg completions <bash|zsh|fish|powershell>`
177
194
  - `k-msg send --input <json> | --file <path> | --stdin` (advanced/raw JSON only)
178
195
  - `k-msg db schema print|generate`
@@ -252,8 +269,9 @@ k-msg alimtalk send --provider iwinv --template-id TPL_001 --to 01012345678 --va
252
269
 
253
270
  Notes:
254
271
 
255
- - For IWINV, Kakao channel onboarding is manual in vendor console. Keep the manual ack in config updated.
272
+ - For IWINV, Kakao channel onboarding is manual in vendor console. Keep the manual evidence record in config updated.
256
273
  - For providers with `required_if_no_inference`, preflight fails when `plusId` is missing and inference cannot resolve it.
274
+ - `providers doctor` and `alimtalk preflight` print `reason:` and `next:` lines so the failing prerequisite and follow-up action are visible in text mode.
257
275
 
258
276
  ## Send
259
277
 
@@ -263,6 +281,14 @@ Notes:
263
281
  k-msg sms send --to 01012345678 --text "hello"
264
282
  ```
265
283
 
284
+ Interactive prompt flow for missing fields:
285
+
286
+ ```bash
287
+ k-msg sms send --interactive
288
+ ```
289
+
290
+ `--interactive` is opt-in, requires a TTY, and fills only missing fields. It does not change the raw JSON `k-msg send` contract.
291
+
266
292
  ### AlimTalk
267
293
 
268
294
  Terminology: the CLI uses **Kakao Channel** and **senderKey** (never “profile”).
@@ -276,6 +302,14 @@ k-msg alimtalk send \
276
302
  --plus-id @my_channel
277
303
  ```
278
304
 
305
+ Interactive prompt flow for missing fields:
306
+
307
+ ```bash
308
+ k-msg alimtalk send --interactive
309
+ ```
310
+
311
+ The interactive path prefers Kakao channel aliases first and only asks for manual `senderKey` / `plusId` input when alias/default bindings do not resolve them.
312
+
279
313
  Failover options:
280
314
 
281
315
  ```bash
@@ -303,6 +337,7 @@ k-msg alimtalk preflight \
303
337
  ```
304
338
 
305
339
  `preflight` runs onboarding checks (manual/config/capability/api probes) and template lookup before send.
340
+ Use it as an explicit readiness gate; `alimtalk send --interactive` does not auto-run preflight for you.
306
341
 
307
342
  ### Advanced JSON send
308
343
 
@@ -384,7 +419,7 @@ k-msg kakao template request --template-id TPL_001 --channel main
384
419
  ## Output / Exit Codes
385
420
 
386
421
  - `--json`: print machine-readable JSON
387
- - AI environments (Bunli `@bunli/plugin-ai-detect`): JSON output is auto-enabled
422
+ - AI environments: JSON output is auto-enabled
388
423
  when an agent is detected (`CLAUDECODE`, `CURSOR_AGENT`, `CODEX_CI` /
389
424
  `CODEX_SHELL` / `CODEX_THREAD_ID`, `MCP_SERVER_NAME` / `MCP_SESSION_ID` /
390
425
  `MCP_TOOL_NAME`)
@@ -398,7 +433,8 @@ k-msg kakao template request --template-id TPL_001 --channel main
398
433
 
399
434
  ## Manual Check Config Example
400
435
 
401
- `k-msg.config.json` can store manual onboarding evidence used by `doctor/preflight`:
436
+ `k-msg.config.json` can store manual onboarding evidence used by `doctor/preflight`.
437
+ These records are notes/evidence for external vendor steps, not a CLI-managed approval state:
402
438
 
403
439
  ```json
404
440
  {
package/bin/k-msg.js CHANGED
@@ -135,6 +135,10 @@ function parseChecksums(text) {
135
135
  if (!m) continue;
136
136
  const [, sum, file] = m;
137
137
  out.set(file, sum);
138
+ const normalizedFile = file.replace(/^\.\/+/, "");
139
+ if (normalizedFile !== file) {
140
+ out.set(normalizedFile, sum);
141
+ }
138
142
  }
139
143
  return out;
140
144
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k-msg/cli",
3
- "version": "0.9.9",
3
+ "version": "0.9.11",
4
4
  "private": false,
5
5
  "description": "k-msg CLI (prebuilt binaries via GitHub Releases)",
6
6
  "type": "module",
@@ -20,48 +20,34 @@
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
- "typecheck": "bun run generate && tsc --noEmit -p tsconfig.json",
30
+ "typecheck": "bun run generate && ttsc --noEmit -p tsconfig.json",
31
31
  "test": "bun run generate && bun test",
32
32
  "schema:generate": "bun run scripts/generate-config-schema.ts",
33
33
  "schema:check": "bun run scripts/generate-config-schema.ts --check",
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.5",
45
- "@k-msg/core": "0.29.5",
46
- "@k-msg/messaging": "0.29.5",
47
- "@k-msg/provider": "0.29.5",
48
- "@k-msg/template": "0.29.5",
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": "^25.6.0",
56
- "@types/react": "^19.2.14",
57
- "@types/react-dom": "^19.2.3",
58
- "bunli": "0.9.1",
59
- "k-msg": "0.29.5",
60
- "react": "^19.2.5",
61
- "react-dom": "^19.2.5",
62
- "solapi": "^5.5.4",
63
- "typescript": "^6.0.2",
64
- "zod": "^4.0.14"
37
+ "@gunshi/plugin-completion": "0.35.1",
38
+ "@k-msg/channel": "0.29.7",
39
+ "@k-msg/core": "0.29.7",
40
+ "@k-msg/messaging": "0.29.7",
41
+ "@k-msg/provider": "0.29.7",
42
+ "@k-msg/template": "0.29.7",
43
+ "@types/bun": "^1.3.14",
44
+ "@types/node": "^26.0.1",
45
+ "gunshi": "0.35.1",
46
+ "k-msg": "0.29.7",
47
+ "solapi": "^6.0.1",
48
+ "ttsc": "^0.18.1",
49
+ "typescript": "^7.0.2",
50
+ "zod": "^4.4.3"
65
51
  },
66
52
  "keywords": [
67
53
  "alimtalk",