@xdxer/dingtalk-agent 0.1.5-beta.5 → 0.1.5-beta.6
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 +23 -0
- package/dist/bin/dingtalk-agent.js +338 -122
- package/dist/bin/dingtalk-agent.js.map +1 -1
- package/dist/src/actions.js +3 -2
- package/dist/src/actions.js.map +1 -1
- package/dist/src/dws.js +2 -1
- package/dist/src/dws.js.map +1 -1
- package/dist/src/init.js +2 -1
- package/dist/src/init.js.map +1 -1
- package/dist/src/map.js +157 -0
- package/dist/src/map.js.map +1 -0
- package/dist/src/tui.js +369 -0
- package/dist/src/tui.js.map +1 -0
- package/dist/src/upgrade.js +113 -33
- package/dist/src/upgrade.js.map +1 -1
- package/dist/src/waits.js +2 -1
- package/dist/src/waits.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@xdxer/dingtalk-agent` are documented here. The project follows semantic versioning; prerelease entries describe release candidates and do not imply that Live canaries or registry publication have completed.
|
|
4
4
|
|
|
5
|
+
## 0.1.5-beta.6 - 2026-07-23
|
|
6
|
+
|
|
7
|
+
The CLI's output layer becomes a human/machine dual channel: a person at a terminal gets colour, hierarchy and step-by-step progress, while an Agent capturing stdout through a Bash tool reads text with **not a single ANSI escape** in it (PR #17). Ships on the `beta` dist-tag; `latest` stays at 0.1.4.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `src/tui.ts`, a zero-dependency output layer built on two deliberately independent switches. The **colour axis** follows `NO_COLOR` / `NODE_DISABLE_COLORS` / `CLICOLOR` / `TERM=dumb`; the **motion axis** (`\r` redraw, cursor control, column alignment) follows `stream.isTTY` and nothing else. `NO_COLOR` therefore strips colour while leaving the layout skeleton byte-for-byte intact — the same rule half the spinner libraries in the ecosystem get wrong.
|
|
12
|
+
- `StepReporter`: one event stream, two renderers. On a TTY the in-progress line is redrawn in place and collapses into a single terminal fact (`[2/7] 安装 … ✔ (2.1MB, 0.3s)`); off a TTY it emits one line per step with a greppable leading status word and zero control characters. `dta upgrade` now reports its seven natural phases instead of going silent for up to 338 seconds.
|
|
13
|
+
- `dta upgrade --check` (resolve the target without installing, `dingtalk-agent/upgrade-check@1`), `--yes`, and `--help`. `--color` / `--no-color` / `--color=<auto|always|never>` are accepted globally: they are stripped from `argv` before dispatch, so a single site replaces edits to 23 strict-mode `parseArgs` blocks. Two contract scenarios (`DualChannelOutput`, `ConfirmSettles`) pin the invariants in the default `core` tier.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **Environment variables can now only turn colour off, never on.** `FORCE_COLOR=1` / `CLICOLOR_FORCE=1` no longer force colour into a pipe; the only way to colourise non-TTY output is an explicit `--color` on the command line. This deliberately departs from the npm-ecosystem convention, because dta's non-TTY reader is primarily an Agent: an inherited `FORCE_COLOR` would turn escape sequences into model-visible noise, and the leak is invisible to a human on a colour terminal. `TERM` / `COLORTERM` are likewise not treated as enabling signals — they survive into the Agent's environment untouched.
|
|
18
|
+
- Every human-facing printer, `fail()`, the help screens and `dta schedule` route through the theme. **The text and line structure are unchanged byte-for-byte**: semantics still ride on the existing `✅`/`⚠️`/`❌`/`PASS`/`FAIL` glyphs and `key=value` structure, so colour remains a discardable decoration and all existing output assertions keep matching. `--json` bypasses the theme structurally rather than "deciding not to colour", and `dta --version` stays bare — it is the machine-parsed object of dta's own self-upgrade chain.
|
|
19
|
+
- The interactive confirmation on `dta upgrade` appears only when stdin is a TTY. Pipes, CI and Agent invocations keep the previous "run it and it installs" behaviour, so `scripts/release-readiness.mjs` and the contract evals needed no changes.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- `displayWidth` mis-measured the very glyphs dta prints: `✅` (U+2705) and `❌` (U+274C) counted as one column each because they sit outside the East-Asian-Wide ranges and need `Emoji_Presentation` to be identified. The replacement derives its 62 ranges from a per-code-point sweep and adds zero-width marks (`Mn`/`Me`/`Cf`, but not the spacing `Mc`), emoji modifiers, text-presentation pictographs that are themselves Wide, and lone regional indicators. It now agrees with `string-width@8` across all 260,096 code points in `0x0..0x3FFFF`.
|
|
24
|
+
- The upgrade confirmation could not settle when a TTY's input stream ended: `readline`'s `question()` promise never resolves in that case, so the process exited silently with no error and no non-zero code. It now races the prompt against the `close` event, and both interruption paths decline rather than inheriting the non-interactive default.
|
|
25
|
+
- `npm run release:check` now builds first. The contract runner imports 16 modules from `dist/` at load time, so the gate only ever worked when `dist/` happened to be current; the first newly added source file turned the whole release gate into an opaque `ERR_MODULE_NOT_FOUND` before a single check ran. `eval:contract` already built — `release:check` did not.
|
|
26
|
+
- `dta upgrade --version <older> --force` announced "已是最新版本" and then downgraded anyway; the check result now carries `relation` (`upgrade`/`same`/`downgrade`) instead of a single `outdated` flag. The interactive path also pins the exact resolved version as the install source, closing the window in which a moving registry tag could install one version while the run verified against another.
|
|
27
|
+
|
|
5
28
|
## 0.1.5-beta.5 - 2026-07-23
|
|
6
29
|
|
|
7
30
|
Long-term memory becomes a bundled standard capability: any DingTalk Agent can maintain living profiles for the **people** and **conversations (groups/DMs)** it works with over time, storage-decoupled behind a port so the model layer never touches a specific medium (PR #13). Ships on the `beta` dist-tag; `latest` stays at 0.1.4.
|