mcoda 0.1.32 → 0.1.33

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.
@@ -1 +1 @@
1
- {"version":3,"file":"EstimateCommands.d.ts","sourceRoot":"","sources":["../../../src/commands/estimate/EstimateCommands.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,cAAc,EAGf,MAAM,aAAa,CAAC;AAErB,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB;AAmCD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,KAAG,UA4HlD,CAAC;AA8EF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAwBjE,CAAC;AA2OF,qBAAa,gBAAgB;WACd,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAkEhD"}
1
+ {"version":3,"file":"EstimateCommands.d.ts","sourceRoot":"","sources":["../../../src/commands/estimate/EstimateCommands.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,cAAc,EAGf,MAAM,aAAa,CAAC;AAErB,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB;AAmCD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,KAAG,UA4HlD,CAAC;AAqHF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAwBjE,CAAC;AA2OF,qBAAa,gBAAgB;WACd,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAkEhD"}
@@ -176,7 +176,65 @@ export const parseEstimateArgs = (argv) => {
176
176
  };
177
177
  const ANSI_REGEX = /\x1b\[[0-9;]*m/g;
178
178
  const stripAnsi = (value) => value.replace(ANSI_REGEX, "");
179
- const visibleLength = (value) => stripAnsi(value).length;
179
+ // Mirrors common wcwidth full-width ranges so CJK/emoji cells align in terminal output.
180
+ const isFullWidthCodePoint = (codePoint) => {
181
+ if (codePoint >= 0x1100 && codePoint <= 0x115f)
182
+ return true;
183
+ if (codePoint >= 0x2329 && codePoint <= 0x232a)
184
+ return true;
185
+ if (codePoint >= 0x2e80 && codePoint <= 0x303e)
186
+ return true;
187
+ if (codePoint >= 0x3040 && codePoint <= 0xa4cf)
188
+ return true;
189
+ if (codePoint >= 0xac00 && codePoint <= 0xd7a3)
190
+ return true;
191
+ if (codePoint >= 0xf900 && codePoint <= 0xfaff)
192
+ return true;
193
+ if (codePoint >= 0xfe10 && codePoint <= 0xfe19)
194
+ return true;
195
+ if (codePoint >= 0xfe30 && codePoint <= 0xfe6f)
196
+ return true;
197
+ if (codePoint >= 0xff00 && codePoint <= 0xff60)
198
+ return true;
199
+ if (codePoint >= 0xffe0 && codePoint <= 0xffe6)
200
+ return true;
201
+ if (codePoint >= 0x1f300 && codePoint <= 0x1f64f)
202
+ return true;
203
+ if (codePoint >= 0x1f900 && codePoint <= 0x1f9ff)
204
+ return true;
205
+ if (codePoint >= 0x20000 && codePoint <= 0x3fffd)
206
+ return true;
207
+ return false;
208
+ };
209
+ const isCombiningCodePoint = (codePoint) => {
210
+ if (codePoint >= 0x0300 && codePoint <= 0x036f)
211
+ return true;
212
+ if (codePoint >= 0x1ab0 && codePoint <= 0x1aff)
213
+ return true;
214
+ if (codePoint >= 0x1dc0 && codePoint <= 0x1dff)
215
+ return true;
216
+ if (codePoint >= 0x20d0 && codePoint <= 0x20ff)
217
+ return true;
218
+ if (codePoint >= 0xfe20 && codePoint <= 0xfe2f)
219
+ return true;
220
+ return false;
221
+ };
222
+ const visibleLength = (value) => {
223
+ const plain = stripAnsi(value);
224
+ if (!plain)
225
+ return 0;
226
+ let width = 0;
227
+ for (const ch of plain) {
228
+ // Zero-width shaping/selectors.
229
+ if (ch === "\u200d" || ch === "\ufe0e" || ch === "\ufe0f")
230
+ continue;
231
+ const codePoint = ch.codePointAt(0);
232
+ if (codePoint === undefined || isCombiningCodePoint(codePoint))
233
+ continue;
234
+ width += isFullWidthCodePoint(codePoint) ? 2 : 1;
235
+ }
236
+ return width;
237
+ };
180
238
  const padVisible = (value, width) => {
181
239
  const diff = width - visibleLength(value);
182
240
  return diff > 0 ? `${value}${" ".repeat(diff)}` : value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcoda",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Local-first CLI for planning, documentation, and execution workflows with agent assistance.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -45,12 +45,12 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "yaml": "^2.4.2",
48
- "@mcoda/shared": "0.1.32",
49
- "@mcoda/core": "0.1.32"
48
+ "@mcoda/core": "0.1.33",
49
+ "@mcoda/shared": "0.1.33"
50
50
  },
51
51
  "devDependencies": {
52
- "@mcoda/db": "0.1.32",
53
- "@mcoda/integrations": "0.1.32"
52
+ "@mcoda/db": "0.1.33",
53
+ "@mcoda/integrations": "0.1.33"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "tsc -p tsconfig.json",