@stalfh233/omc-cli 0.4.11 → 0.4.12

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/README.md CHANGED
@@ -246,12 +246,12 @@ src/ args/support/plan/read/write/package/context(治理管道)
246
246
 
247
247
  ## npm 分发
248
248
 
249
- 本包(`@stalfh233/omc-cli`,可执行命令仍是 `omc`)通过公共 npm registry 分发。`omc-core` 是 `omc-cli` 的内部依赖,发布时先发 `omc-core`,再发 `omc-cli`;两者版本保持一致。当前版本为 `0.4.11`,尚未宣称 `1.0.0` 稳定契约。
249
+ 本包(`@stalfh233/omc-cli`,可执行命令仍是 `omc`)通过公共 npm registry 分发。`omc-core` 是 `omc-cli` 的内部依赖,发布时先发 `omc-core`,再发 `omc-cli`;两者版本保持一致。当前版本为 `0.4.12`,尚未宣称 `1.0.0` 稳定契约。
250
250
 
251
251
  ### 使用已发布包
252
252
 
253
253
  ```bash
254
- npm install -g @stalfh233/omc-cli@0.4.11
254
+ npm install -g @stalfh233/omc-cli@0.4.12
255
255
  omc setup
256
256
  omc doctor
257
257
  omc help omc-write-hazards
@@ -13,27 +13,16 @@ export function envelope(status, result, requestId, error = null) {
13
13
  /**
14
14
  * The single stdout serialization for every envelope.
15
15
  *
16
- * On zh-CN Windows, PowerShell decodes a native process's bytes with the legacy
17
- * console code page and mangles UTF-8 Chinese ("付文�?"), which forces callers
18
- * into a "write to file, then re-read" workaround. When `OMC_ASCII_STDOUT`
19
- * resolves on, non-ASCII is escaped to `\uXXXX`: stdout stays pure ASCII and
20
- * decodes identically under any code page while still parsing to the original
21
- * string. It is on by default only on win32, so Linux output keeps its smaller
22
- * UTF-8 bytes. Override with `OMC_ASCII_STDOUT=1|0`. Artifacts keep raw UTF-8 —
23
- * they are files, not a console stream. See `CONTEXT.md` → Agent-facing CLI.
16
+ * stdout is always UTF-8, on every platform. Escaping non-ASCII to `\uXXXX`
17
+ * (an earlier win32 "ASCII-safe" mode) is deliberately gone: it made Windows
18
+ * output diverge from POSIX byte-for-byte, broke plain string matching
19
+ * (`findstr 采购`), and only worked around a legacy console code page that a
20
+ * modern terminal (Windows Terminal, PowerShell 7, `chcp 65001`) fixes by
21
+ * itself. JSON is UTF-8 by spec; downstream tools parse it losslessly. Callers
22
+ * that truly need a file use `--out`, which was always raw UTF-8.
24
23
  */
25
- export function asciiStdout() {
26
- const override = process.env.OMC_ASCII_STDOUT;
27
- if (override === "1")
28
- return true;
29
- if (override === "0")
30
- return false;
31
- return process.platform === "win32";
32
- }
33
24
  export function serializeEnvelope(value) {
34
- const json = JSON.stringify(value);
35
- const escaped = asciiStdout() ? json.replace(/[\u007f-\uffff]/g, (character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, "0")}`) : json;
36
- return escaped + "\n";
25
+ return JSON.stringify(value) + "\n";
37
26
  }
38
27
  export function requestId() {
39
28
  return randomUUID();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "commander": "14.0.3",
54
- "omc-core": "0.4.11",
54
+ "omc-core": "0.4.12",
55
55
  "proper-lockfile": "4.1.2",
56
56
  "write-file-atomic": "6.0.0",
57
57
  "zod": "^3.23.8",