ultracode-ai 1.3.0

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 (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/dist/commands/authoring-agents.d.ts +19 -0
  4. package/dist/commands/authoring-agents.d.ts.map +1 -0
  5. package/dist/commands/authoring-agents.js +123 -0
  6. package/dist/commands/authoring-agents.js.map +1 -0
  7. package/dist/commands/budget.d.ts +16 -0
  8. package/dist/commands/budget.d.ts.map +1 -0
  9. package/dist/commands/budget.js +105 -0
  10. package/dist/commands/budget.js.map +1 -0
  11. package/dist/commands/config.d.ts +15 -0
  12. package/dist/commands/config.d.ts.map +1 -0
  13. package/dist/commands/config.js +147 -0
  14. package/dist/commands/config.js.map +1 -0
  15. package/dist/commands/doctor.d.ts +65 -0
  16. package/dist/commands/doctor.d.ts.map +1 -0
  17. package/dist/commands/doctor.js +188 -0
  18. package/dist/commands/doctor.js.map +1 -0
  19. package/dist/commands/ext-format.d.ts +22 -0
  20. package/dist/commands/ext-format.d.ts.map +1 -0
  21. package/dist/commands/ext-format.js +115 -0
  22. package/dist/commands/ext-format.js.map +1 -0
  23. package/dist/commands/ext-helpers.d.ts +25 -0
  24. package/dist/commands/ext-helpers.d.ts.map +1 -0
  25. package/dist/commands/ext-helpers.js +36 -0
  26. package/dist/commands/ext-helpers.js.map +1 -0
  27. package/dist/commands/learn.d.ts +29 -0
  28. package/dist/commands/learn.d.ts.map +1 -0
  29. package/dist/commands/learn.js +190 -0
  30. package/dist/commands/learn.js.map +1 -0
  31. package/dist/commands/list.d.ts +11 -0
  32. package/dist/commands/list.d.ts.map +1 -0
  33. package/dist/commands/list.js +58 -0
  34. package/dist/commands/list.js.map +1 -0
  35. package/dist/commands/run.d.ts +13 -0
  36. package/dist/commands/run.d.ts.map +1 -0
  37. package/dist/commands/run.js +46 -0
  38. package/dist/commands/run.js.map +1 -0
  39. package/dist/commands/setup.d.ts +40 -0
  40. package/dist/commands/setup.d.ts.map +1 -0
  41. package/dist/commands/setup.js +146 -0
  42. package/dist/commands/setup.js.map +1 -0
  43. package/dist/commands/skills.d.ts +16 -0
  44. package/dist/commands/skills.d.ts.map +1 -0
  45. package/dist/commands/skills.js +148 -0
  46. package/dist/commands/skills.js.map +1 -0
  47. package/dist/commands/versioning.d.ts +13 -0
  48. package/dist/commands/versioning.d.ts.map +1 -0
  49. package/dist/commands/versioning.js +63 -0
  50. package/dist/commands/versioning.js.map +1 -0
  51. package/dist/context.d.ts +60 -0
  52. package/dist/context.d.ts.map +1 -0
  53. package/dist/context.js +69 -0
  54. package/dist/context.js.map +1 -0
  55. package/dist/core-loader.d.ts +22 -0
  56. package/dist/core-loader.d.ts.map +1 -0
  57. package/dist/core-loader.js +22 -0
  58. package/dist/core-loader.js.map +1 -0
  59. package/dist/format.d.ts +15 -0
  60. package/dist/format.d.ts.map +1 -0
  61. package/dist/format.js +80 -0
  62. package/dist/format.js.map +1 -0
  63. package/dist/index.d.ts +22 -0
  64. package/dist/index.d.ts.map +1 -0
  65. package/dist/index.js +59 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/program.d.ts +19 -0
  68. package/dist/program.d.ts.map +1 -0
  69. package/dist/program.js +120 -0
  70. package/dist/program.js.map +1 -0
  71. package/dist/themes/dark.d.ts +4 -0
  72. package/dist/themes/dark.d.ts.map +1 -0
  73. package/dist/themes/dark.js +16 -0
  74. package/dist/themes/dark.js.map +1 -0
  75. package/dist/themes/dracula.d.ts +4 -0
  76. package/dist/themes/dracula.d.ts.map +1 -0
  77. package/dist/themes/dracula.js +16 -0
  78. package/dist/themes/dracula.js.map +1 -0
  79. package/dist/themes/index.d.ts +32 -0
  80. package/dist/themes/index.d.ts.map +1 -0
  81. package/dist/themes/index.js +45 -0
  82. package/dist/themes/index.js.map +1 -0
  83. package/dist/themes/light.d.ts +4 -0
  84. package/dist/themes/light.d.ts.map +1 -0
  85. package/dist/themes/light.js +16 -0
  86. package/dist/themes/light.js.map +1 -0
  87. package/dist/themes/theme.d.ts +34 -0
  88. package/dist/themes/theme.d.ts.map +1 -0
  89. package/dist/themes/theme.js +2 -0
  90. package/dist/themes/theme.js.map +1 -0
  91. package/dist/ui/App.d.ts +24 -0
  92. package/dist/ui/App.d.ts.map +1 -0
  93. package/dist/ui/App.js +217 -0
  94. package/dist/ui/App.js.map +1 -0
  95. package/dist/ui/ChatInput.d.ts +21 -0
  96. package/dist/ui/ChatInput.d.ts.map +1 -0
  97. package/dist/ui/ChatInput.js +88 -0
  98. package/dist/ui/ChatInput.js.map +1 -0
  99. package/dist/ui/ChatOutput.d.ts +22 -0
  100. package/dist/ui/ChatOutput.d.ts.map +1 -0
  101. package/dist/ui/ChatOutput.js +27 -0
  102. package/dist/ui/ChatOutput.js.map +1 -0
  103. package/dist/ui/StatusBar.d.ts +22 -0
  104. package/dist/ui/StatusBar.d.ts.map +1 -0
  105. package/dist/ui/StatusBar.js +17 -0
  106. package/dist/ui/StatusBar.js.map +1 -0
  107. package/dist/ui/ToolOutput.d.ts +20 -0
  108. package/dist/ui/ToolOutput.d.ts.map +1 -0
  109. package/dist/ui/ToolOutput.js +14 -0
  110. package/dist/ui/ToolOutput.js.map +1 -0
  111. package/dist/ui/ctrl-c.d.ts +21 -0
  112. package/dist/ui/ctrl-c.d.ts.map +1 -0
  113. package/dist/ui/ctrl-c.js +27 -0
  114. package/dist/ui/ctrl-c.js.map +1 -0
  115. package/dist/ui/start.d.ts +13 -0
  116. package/dist/ui/start.d.ts.map +1 -0
  117. package/dist/ui/start.js +25 -0
  118. package/dist/ui/start.js.map +1 -0
  119. package/dist/utils/cli-version.d.ts +15 -0
  120. package/dist/utils/cli-version.d.ts.map +1 -0
  121. package/dist/utils/cli-version.js +33 -0
  122. package/dist/utils/cli-version.js.map +1 -0
  123. package/dist/utils/resolve-home.d.ts +19 -0
  124. package/dist/utils/resolve-home.d.ts.map +1 -0
  125. package/dist/utils/resolve-home.js +28 -0
  126. package/dist/utils/resolve-home.js.map +1 -0
  127. package/dist/utils/text.d.ts +50 -0
  128. package/dist/utils/text.d.ts.map +1 -0
  129. package/dist/utils/text.js +133 -0
  130. package/dist/utils/text.js.map +1 -0
  131. package/package.json +45 -0
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Bottom status bar: active agent, model, session id and token usage.
4
+ */
5
+ import React from "react";
6
+ import { Box, Text } from "ink";
7
+ /** Shorten a session id for display (first 8 characters). */
8
+ export function shortSessionId(id) {
9
+ if (id === undefined || id === "")
10
+ return "new";
11
+ return Array.from(id).slice(0, 8).join("");
12
+ }
13
+ /** Render the status bar. */
14
+ export function StatusBar({ agent, model, sessionId, usage, theme, themeName, }) {
15
+ return (_jsx(Box, { children: _jsxs(Text, { color: theme.dim, children: [_jsx(Text, { color: theme.primary, bold: true, children: agent }), " · ", model, " · session:", shortSessionId(sessionId), " · tokens ", usage.input, "/", usage.output, " · theme:", themeName, " · shift+tab: agent · esc: cancel · ctrl+c ctrl+c: exit"] }) }));
16
+ }
17
+ //# sourceMappingURL=StatusBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../src/ui/StatusBar.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAahC,6DAA6D;AAC7D,MAAM,UAAU,cAAc,CAAC,EAAW;IACxC,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;IAChD,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,6BAA6B;AAC7B,MAAM,UAAU,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,KAAK,EACL,SAAS,GACM;IACf,OAAO,CACL,KAAC,GAAG,cACF,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,GAAG,aACpB,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,kBAC7B,KAAK,GACD,EACN,KAAK,EACL,KAAK,EACL,aAAa,EACb,cAAc,CAAC,SAAS,CAAC,EACzB,YAAY,EACZ,KAAK,CAAC,KAAK,OAAG,KAAK,CAAC,MAAM,EAC1B,WAAW,EACX,SAAS,EACT,yDAAyD,IACrD,GACH,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Compact display of recent `tool.executed` events from the facade event bus.
3
+ */
4
+ import React from "react";
5
+ import type { Theme } from "../themes/index.js";
6
+ /** A condensed `tool.executed` event. */
7
+ export interface ToolEventView {
8
+ toolName: string;
9
+ ok: boolean;
10
+ durationMs: number;
11
+ }
12
+ export interface ToolOutputProps {
13
+ events: ReadonlyArray<ToolEventView>;
14
+ theme: Theme;
15
+ /** Maximum number of events to show (most recent last). */
16
+ max?: number;
17
+ }
18
+ /** Render the recent tool executions, or nothing when there are none. */
19
+ export declare function ToolOutput({ events, theme, max }: ToolOutputProps): React.JSX.Element | null;
20
+ //# sourceMappingURL=ToolOutput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolOutput.d.ts","sourceRoot":"","sources":["../../src/ui/ToolOutput.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,yCAAyC;AACzC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAO,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAYhG"}
@@ -0,0 +1,14 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Compact display of recent `tool.executed` events from the facade event bus.
4
+ */
5
+ import React from "react";
6
+ import { Box, Text } from "ink";
7
+ /** Render the recent tool executions, or nothing when there are none. */
8
+ export function ToolOutput({ events, theme, max = 5 }) {
9
+ if (events.length === 0)
10
+ return null;
11
+ const shown = events.slice(-max);
12
+ return (_jsx(Box, { flexDirection: "column", children: shown.map((e, i) => (_jsxs(Text, { color: theme.tool, children: [e.ok ? "✓" : "✗", " ", e.toolName, " ", _jsxs(Text, { color: theme.dim, children: ["(", Math.round(e.durationMs), "ms)"] })] }, i))) }));
13
+ }
14
+ //# sourceMappingURL=ToolOutput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolOutput.js","sourceRoot":"","sources":["../../src/ui/ToolOutput.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAiBhC,yEAAyE;AACzE,MAAM,UAAU,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,EAAmB;IACpE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;IACjC,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACxB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,MAAC,IAAI,IAAS,KAAK,EAAE,KAAK,CAAC,IAAI,aAC5B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,OAAG,CAAC,CAAC,QAAQ,OAAE,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,GAAG,kBAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,KADpF,CAAC,CAEL,CACR,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Double-press detection for the "press Ctrl+C twice to exit" behaviour.
3
+ * Pure and timer-free, so it is trivially unit-testable.
4
+ */
5
+ export declare class DoublePress {
6
+ private readonly windowMs;
7
+ private last;
8
+ /**
9
+ * @param windowMs - maximum gap between two presses to count as a double
10
+ * press (default 1500 ms).
11
+ */
12
+ constructor(windowMs?: number);
13
+ /**
14
+ * Record a press.
15
+ *
16
+ * @param now - timestamp in ms (defaults to `Date.now()`).
17
+ * @returns `true` when this press completes a double press.
18
+ */
19
+ press(now?: number): boolean;
20
+ }
21
+ //# sourceMappingURL=ctrl-c.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ctrl-c.d.ts","sourceRoot":"","sources":["../../src/ui/ctrl-c.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,WAAW;IAOV,OAAO,CAAC,QAAQ,CAAC,QAAQ;IANrC,OAAO,CAAC,IAAI,CAA4B;IAExC;;;OAGG;gBAC0B,QAAQ,GAAE,MAAa;IAEpD;;;;;OAKG;IACH,KAAK,CAAC,GAAG,GAAE,MAAmB,GAAG,OAAO;CAKzC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Double-press detection for the "press Ctrl+C twice to exit" behaviour.
3
+ * Pure and timer-free, so it is trivially unit-testable.
4
+ */
5
+ export class DoublePress {
6
+ windowMs;
7
+ last = Number.NEGATIVE_INFINITY;
8
+ /**
9
+ * @param windowMs - maximum gap between two presses to count as a double
10
+ * press (default 1500 ms).
11
+ */
12
+ constructor(windowMs = 1500) {
13
+ this.windowMs = windowMs;
14
+ }
15
+ /**
16
+ * Record a press.
17
+ *
18
+ * @param now - timestamp in ms (defaults to `Date.now()`).
19
+ * @returns `true` when this press completes a double press.
20
+ */
21
+ press(now = Date.now()) {
22
+ const isDouble = now - this.last <= this.windowMs;
23
+ this.last = now;
24
+ return isDouble;
25
+ }
26
+ }
27
+ //# sourceMappingURL=ctrl-c.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ctrl-c.js","sourceRoot":"","sources":["../../src/ui/ctrl-c.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,WAAW;IAOO;IANrB,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;IAExC;;;OAGG;IACH,YAA6B,WAAmB,IAAI;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAAG,CAAC;IAExD;;;;;OAKG;IACH,KAAK,CAAC,MAAc,IAAI,CAAC,GAAG,EAAE;QAC5B,MAAM,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC;QAClD,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Bootstrap for the interactive Ink UI.
3
+ *
4
+ * Kept in its own module (and imported dynamically from `program.ts`) so that
5
+ * non-interactive commands never pay the cost of loading Ink/React.
6
+ */
7
+ import type { CliContext } from "../context.js";
8
+ /**
9
+ * Create the facade, render the {@link App} and block until the UI exits.
10
+ * `exitOnCtrlC` is disabled — the App implements double-Ctrl+C itself.
11
+ */
12
+ export declare function startInteractive(ctx: CliContext): Promise<void>;
13
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/ui/start.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAWrE"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Bootstrap for the interactive Ink UI.
3
+ *
4
+ * Kept in its own module (and imported dynamically from `program.ts`) so that
5
+ * non-interactive commands never pay the cost of loading Ink/React.
6
+ */
7
+ import React from "react";
8
+ import { render } from "ink";
9
+ import { safeDispose } from "../context.js";
10
+ import { App } from "./App.js";
11
+ /**
12
+ * Create the facade, render the {@link App} and block until the UI exits.
13
+ * `exitOnCtrlC` is disabled — the App implements double-Ctrl+C itself.
14
+ */
15
+ export async function startInteractive(ctx) {
16
+ const facade = await ctx.createFacade({ cwd: ctx.cwd });
17
+ try {
18
+ const instance = render(React.createElement(App, { facade, initialTheme: facade.config.ui.theme }), { exitOnCtrlC: false });
19
+ await instance.waitUntilExit();
20
+ }
21
+ finally {
22
+ await safeDispose(facade);
23
+ }
24
+ }
25
+ //# sourceMappingURL=start.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/ui/start.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAe;IACpD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;IACxD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,CACrB,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAC1E,EAAE,WAAW,EAAE,KAAK,EAAE,CACvB,CAAC;QACF,MAAM,QAAQ,CAAC,aAAa,EAAE,CAAC;IACjC,CAAC;YAAS,CAAC;QACT,MAAM,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Robust resolution of the CLI's own version for `--version`.
3
+ *
4
+ * Reads the package's `package.json` via `createRequire` (works from both
5
+ * `src/` during tests and `dist/` after the build) and falls back to the
6
+ * shared protocol {@link VERSION} constant if the file cannot be found.
7
+ */
8
+ /**
9
+ * Resolve the version of the `ultracode` CLI package.
10
+ *
11
+ * @returns the `version` field of the nearest matching `package.json`,
12
+ * or the shared `VERSION` constant as a last resort.
13
+ */
14
+ export declare function getCliVersion(): string;
15
+ //# sourceMappingURL=cli-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-version.d.ts","sourceRoot":"","sources":["../../src/utils/cli-version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAetC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Robust resolution of the CLI's own version for `--version`.
3
+ *
4
+ * Reads the package's `package.json` via `createRequire` (works from both
5
+ * `src/` during tests and `dist/` after the build) and falls back to the
6
+ * shared protocol {@link VERSION} constant if the file cannot be found.
7
+ */
8
+ import { createRequire } from "node:module";
9
+ import { VERSION } from "ultracode-shared";
10
+ /**
11
+ * Resolve the version of the `ultracode` CLI package.
12
+ *
13
+ * @returns the `version` field of the nearest matching `package.json`,
14
+ * or the shared `VERSION` constant as a last resort.
15
+ */
16
+ export function getCliVersion() {
17
+ const require = createRequire(import.meta.url);
18
+ // From src/utils or dist/utils the package root is two levels up; keep one
19
+ // level as well in case the file is ever flattened.
20
+ for (const rel of ["../../package.json", "../package.json"]) {
21
+ try {
22
+ const pkg = require(rel);
23
+ if (pkg.name === "ultracode-ai" && typeof pkg.version === "string") {
24
+ return pkg.version;
25
+ }
26
+ }
27
+ catch {
28
+ // try next candidate
29
+ }
30
+ }
31
+ return VERSION;
32
+ }
33
+ //# sourceMappingURL=cli-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-version.js","sourceRoot":"","sources":["../../src/utils/cli-version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAO3C;;;;;GAKG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,2EAA2E;IAC3E,oDAAoD;IACpD,KAAK,MAAM,GAAG,IAAI,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,EAAE,CAAC;QAC5D,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAoB,CAAC;YAC5C,IAAI,GAAG,CAAC,IAAI,KAAK,cAAc,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;gBACnE,OAAO,GAAG,CAAC,OAAO,CAAC;YACrB,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,qBAAqB;QACvB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Cross-platform `~` expansion.
3
+ *
4
+ * The shared constants (`USER_CONFIG_DIR`, `USER_ENV_FILE`, ...) are
5
+ * tilde-prefixed. `~` does not exist on Windows, so every consumer must expand
6
+ * it via this helper before touching the filesystem.
7
+ */
8
+ /**
9
+ * Expand a leading `~` (or `~/`, `~\`) to the user's home directory.
10
+ *
11
+ * Paths without a leading tilde are returned unchanged. `~user` style paths
12
+ * are NOT expanded (not portable).
13
+ *
14
+ * @param p - the (possibly tilde-prefixed) path.
15
+ * @param homedir - home directory override, mainly for tests; defaults to
16
+ * `os.homedir()`.
17
+ */
18
+ export declare function resolveHome(p: string, homedir?: string): string;
19
+ //# sourceMappingURL=resolve-home.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-home.d.ts","sourceRoot":"","sources":["../../src/utils/resolve-home.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,MAAqB,GAAG,MAAM,CAM7E"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Cross-platform `~` expansion.
3
+ *
4
+ * The shared constants (`USER_CONFIG_DIR`, `USER_ENV_FILE`, ...) are
5
+ * tilde-prefixed. `~` does not exist on Windows, so every consumer must expand
6
+ * it via this helper before touching the filesystem.
7
+ */
8
+ import os from "node:os";
9
+ import path from "node:path";
10
+ /**
11
+ * Expand a leading `~` (or `~/`, `~\`) to the user's home directory.
12
+ *
13
+ * Paths without a leading tilde are returned unchanged. `~user` style paths
14
+ * are NOT expanded (not portable).
15
+ *
16
+ * @param p - the (possibly tilde-prefixed) path.
17
+ * @param homedir - home directory override, mainly for tests; defaults to
18
+ * `os.homedir()`.
19
+ */
20
+ export function resolveHome(p, homedir = os.homedir()) {
21
+ if (p === "~")
22
+ return homedir;
23
+ if (p.startsWith("~/") || p.startsWith("~\\")) {
24
+ return path.join(homedir, p.slice(2));
25
+ }
26
+ return p;
27
+ }
28
+ //# sourceMappingURL=resolve-home.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-home.js","sourceRoot":"","sources":["../../src/utils/resolve-home.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,CAAS,EAAE,UAAkB,EAAE,CAAC,OAAO,EAAE;IACnE,IAAI,CAAC,KAAK,GAAG;QAAE,OAAO,OAAO,CAAC;IAC9B,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Small, dependency-free text/value helpers used across the CLI:
3
+ * CLI-value parsing, dotted-path access, secret masking, config redaction,
4
+ * plain-text tables and optional ANSI colouring.
5
+ */
6
+ /** Maximum rendered width of a single table cell, in characters. */
7
+ export declare const MAX_CELL_WIDTH = 60;
8
+ /**
9
+ * Parse a CLI-supplied value string into a JSON-ish value.
10
+ *
11
+ * `"true"`/`"false"`/`"null"` and numeric literals are converted; strings
12
+ * starting with `[`, `{` or `"` are parsed as JSON (falling back to the raw
13
+ * string on parse failure); everything else stays a plain string.
14
+ */
15
+ export declare function parseCliValue(raw: string): unknown;
16
+ /**
17
+ * Read a value from a nested object via a dotted path (`"core.activeModel"`).
18
+ * Returns `undefined` for unknown paths or non-object intermediates.
19
+ */
20
+ export declare function getAtPath(obj: unknown, dotted: string): unknown;
21
+ /**
22
+ * Flatten a nested plain object into `[dottedPath, leafValue]` pairs.
23
+ * Arrays and non-plain objects are treated as leaves.
24
+ */
25
+ export declare function flattenLeaves(obj: Record<string, unknown>, prefix?: string): Array<[string, unknown]>;
26
+ /**
27
+ * Mask a secret for display: at most the first three characters survive,
28
+ * the rest becomes `***`. Unicode-safe (never splits surrogate pairs).
29
+ */
30
+ export declare function maskSecret(value: string): string;
31
+ /**
32
+ * Deep-copy a value, masking every string whose *key* looks secret
33
+ * (`key`/`token`/`secret`/`password`/`credential`). Used as the fallback
34
+ * redacted view for `config show` when core does not provide one.
35
+ */
36
+ export declare function redactConfig<T>(value: T): T;
37
+ /**
38
+ * Render a simple, ANSI-free, two-space-separated table with a header row and
39
+ * a dashed separator. Cells are flattened to one line and truncated to
40
+ * {@link MAX_CELL_WIDTH} characters (Unicode-safe).
41
+ */
42
+ export declare function formatTable(headers: ReadonlyArray<string>, rows: ReadonlyArray<ReadonlyArray<string>>): string;
43
+ /**
44
+ * Wrap `s` in an ANSI SGR sequence when `enabled` is true; otherwise return
45
+ * `s` untouched. The CLI only emits ANSI when the target stream is a TTY.
46
+ *
47
+ * @param code - SGR code, e.g. `"31"` for red.
48
+ */
49
+ export declare function paint(s: string, code: string, enabled: boolean): string;
50
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,oEAAoE;AACpE,eAAO,MAAM,cAAc,KAAK,CAAC;AAKjC;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAclD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,MAAM,SAAK,GACV,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAW1B;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAE3C;AAwBD;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,EAC9B,IAAI,EAAE,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GACzC,MAAM,CAcR;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAEvE"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Small, dependency-free text/value helpers used across the CLI:
3
+ * CLI-value parsing, dotted-path access, secret masking, config redaction,
4
+ * plain-text tables and optional ANSI colouring.
5
+ */
6
+ import { isPlainObject, truncate } from "ultracode-shared";
7
+ /** Maximum rendered width of a single table cell, in characters. */
8
+ export const MAX_CELL_WIDTH = 60;
9
+ /** Key names whose string values are considered secrets and get masked. */
10
+ const SECRET_KEY_RE = /(api[-_]?key|key|token|secret|password|credential)/i;
11
+ /**
12
+ * Parse a CLI-supplied value string into a JSON-ish value.
13
+ *
14
+ * `"true"`/`"false"`/`"null"` and numeric literals are converted; strings
15
+ * starting with `[`, `{` or `"` are parsed as JSON (falling back to the raw
16
+ * string on parse failure); everything else stays a plain string.
17
+ */
18
+ export function parseCliValue(raw) {
19
+ const t = raw.trim();
20
+ if (t === "true")
21
+ return true;
22
+ if (t === "false")
23
+ return false;
24
+ if (t === "null")
25
+ return null;
26
+ if (t !== "" && /^-?\d+(\.\d+)?$/.test(t) && Number.isFinite(Number(t)))
27
+ return Number(t);
28
+ if (t.startsWith("[") || t.startsWith("{") || (t.startsWith('"') && t.endsWith('"') && t.length >= 2)) {
29
+ try {
30
+ return JSON.parse(t);
31
+ }
32
+ catch {
33
+ return raw;
34
+ }
35
+ }
36
+ return raw;
37
+ }
38
+ /**
39
+ * Read a value from a nested object via a dotted path (`"core.activeModel"`).
40
+ * Returns `undefined` for unknown paths or non-object intermediates.
41
+ */
42
+ export function getAtPath(obj, dotted) {
43
+ if (dotted === "")
44
+ return undefined;
45
+ let cur = obj;
46
+ for (const part of dotted.split(".")) {
47
+ if (cur === null || typeof cur !== "object")
48
+ return undefined;
49
+ cur = cur[part];
50
+ }
51
+ return cur;
52
+ }
53
+ /**
54
+ * Flatten a nested plain object into `[dottedPath, leafValue]` pairs.
55
+ * Arrays and non-plain objects are treated as leaves.
56
+ */
57
+ export function flattenLeaves(obj, prefix = "") {
58
+ const out = [];
59
+ for (const [key, value] of Object.entries(obj)) {
60
+ const p = prefix === "" ? key : `${prefix}.${key}`;
61
+ if (isPlainObject(value)) {
62
+ out.push(...flattenLeaves(value, p));
63
+ }
64
+ else {
65
+ out.push([p, value]);
66
+ }
67
+ }
68
+ return out;
69
+ }
70
+ /**
71
+ * Mask a secret for display: at most the first three characters survive,
72
+ * the rest becomes `***`. Unicode-safe (never splits surrogate pairs).
73
+ */
74
+ export function maskSecret(value) {
75
+ if (value.length === 0)
76
+ return "(empty)";
77
+ if (value.length <= 6)
78
+ return "***";
79
+ return `${Array.from(value).slice(0, 3).join("")}***`;
80
+ }
81
+ /**
82
+ * Deep-copy a value, masking every string whose *key* looks secret
83
+ * (`key`/`token`/`secret`/`password`/`credential`). Used as the fallback
84
+ * redacted view for `config show` when core does not provide one.
85
+ */
86
+ export function redactConfig(value) {
87
+ return redactInner(value, "");
88
+ }
89
+ function redactInner(value, key) {
90
+ if (typeof value === "string") {
91
+ return SECRET_KEY_RE.test(key) && value.length > 0 ? maskSecret(value) : value;
92
+ }
93
+ if (Array.isArray(value)) {
94
+ return value.map((v) => redactInner(v, key));
95
+ }
96
+ if (isPlainObject(value)) {
97
+ const out = {};
98
+ for (const [k, v] of Object.entries(value)) {
99
+ out[k] = redactInner(v, k);
100
+ }
101
+ return out;
102
+ }
103
+ return value;
104
+ }
105
+ /** Unicode-aware character count (code points, not UTF-16 units). */
106
+ function charLen(s) {
107
+ return Array.from(s).length;
108
+ }
109
+ /**
110
+ * Render a simple, ANSI-free, two-space-separated table with a header row and
111
+ * a dashed separator. Cells are flattened to one line and truncated to
112
+ * {@link MAX_CELL_WIDTH} characters (Unicode-safe).
113
+ */
114
+ export function formatTable(headers, rows) {
115
+ const cols = headers.length;
116
+ const cell = (s) => truncate(String(s ?? "").replace(/\r?\n/g, " "), MAX_CELL_WIDTH);
117
+ const all = [headers, ...rows].map((r) => Array.from({ length: cols }, (_, i) => cell(r[i])));
118
+ const widths = Array.from({ length: cols }, (_, i) => Math.max(...all.map((r) => charLen(r[i] ?? ""))));
119
+ const pad = (s, w) => s + " ".repeat(Math.max(0, w - charLen(s)));
120
+ const lines = all.map((r) => r.map((c, i) => pad(c, widths[i] ?? 0)).join(" ").trimEnd());
121
+ lines.splice(1, 0, widths.map((w) => "-".repeat(Math.max(1, w))).join(" ").trimEnd());
122
+ return `${lines.join("\n")}\n`;
123
+ }
124
+ /**
125
+ * Wrap `s` in an ANSI SGR sequence when `enabled` is true; otherwise return
126
+ * `s` untouched. The CLI only emits ANSI when the target stream is a TTY.
127
+ *
128
+ * @param code - SGR code, e.g. `"31"` for red.
129
+ */
130
+ export function paint(s, code, enabled) {
131
+ return enabled ? `\u001B[${code}m${s}\u001B[0m` : s;
132
+ }
133
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE3D,oEAAoE;AACpE,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC,2EAA2E;AAC3E,MAAM,aAAa,GAAG,qDAAqD,CAAC;AAE5E;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACrB,IAAI,CAAC,KAAK,MAAM;QAAE,OAAO,IAAI,CA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tD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "ultracode-ai",
3
+ "version": "1.3.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "description": "UltraCode CLI – interactive AI code assistant for the terminal",
7
+ "bin": {
8
+ "ultracode-ai": "./dist/index.js"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "files": [
13
+ "dist",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/AndreasSchwan-SIMO/UltraCode.git",
20
+ "directory": "packages/cli"
21
+ },
22
+ "homepage": "https://github.com/AndreasSchwan-SIMO/UltraCode#readme",
23
+ "bugs": {
24
+ "url": "https://github.com/AndreasSchwan-SIMO/UltraCode/issues"
25
+ },
26
+ "dependencies": {
27
+ "commander": "^12.1.0",
28
+ "ink": "^5.1.0",
29
+ "react": "^18.3.1",
30
+ "ultracode-core": "^1.3.0",
31
+ "ultracode-shared": "^1.3.0"
32
+ },
33
+ "devDependencies": {
34
+ "@types/react": "^18.3.0",
35
+ "ink-testing-library": "^4.0.0"
36
+ },
37
+ "engines": {
38
+ "node": ">=22.13.0"
39
+ },
40
+ "scripts": {
41
+ "build": "tsc -b",
42
+ "test": "vitest run",
43
+ "dev": "node --enable-source-maps dist/index.js"
44
+ }
45
+ }