kritya 0.8.51-beta → 0.8.52-beta

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/dist/index.js CHANGED
@@ -258,7 +258,16 @@ if (args.prompt) {
258
258
  trust: args.trust,
259
259
  timeoutSeconds: args.timeoutSeconds,
260
260
  privacy: args.privacy,
261
- }).then((code) => process.exit(code));
261
+ })
262
+ .then((code) => process.exit(code))
263
+ // runHeadless is documented to resolve with an exit code rather than
264
+ // throw, so reaching here means a bug in that path. Fail loudly with a
265
+ // non-zero code instead of letting Node print an unhandled-rejection
266
+ // trace — a CI job reading `$?` deserves a real exit status either way.
267
+ .catch((err) => {
268
+ console.error(err);
269
+ process.exit(1);
270
+ });
262
271
  }
263
272
  else {
264
273
  runInteractive();
@@ -216,7 +216,14 @@ class McpConnection {
216
216
  * server can tell the difference between an unsupported client and a hung one.
217
217
  */
218
218
  onServerRequest(id, method, params) {
219
- const reply = (body) => this.transport.send({ jsonrpc: "2.0", id, ...body }, CONNECT_TIMEOUT_MS).catch(() => { });
219
+ // Typed void on purpose: every reply is best-effort, its own `.catch`
220
+ // already keeps a failed send from becoming an unhandled rejection, and no
221
+ // caller of `reply` has anything to do with the promise. The explicit
222
+ // return type is what tells that to callers — and to no-floating-promises,
223
+ // which cannot see through the `.catch` above.
224
+ const reply = (body) => {
225
+ void this.transport.send({ jsonrpc: "2.0", id, ...body }, CONNECT_TIMEOUT_MS).catch(() => { });
226
+ };
220
227
  if (method === "roots/list") {
221
228
  reply({
222
229
  result: {
package/dist/ui/App.js CHANGED
@@ -576,7 +576,11 @@ export function App({ agent, workspace, modelRef, providerRef, config, resumedCo
576
576
  costReport,
577
577
  statusReport,
578
578
  gitDiffStat,
579
- exit: exitAfterFlush,
579
+ // exitAfterFlush is async because it waits for Ink to flush the final
580
+ // render, but `exit` is typed void: no caller can do anything with the
581
+ // promise, so the detach is marked here rather than by widening the
582
+ // interface to `void | Promise<void>` to silence the lint rule.
583
+ exit: () => void exitAfterFlush(),
580
584
  };
581
585
  void runCommand(cmd, ctx);
582
586
  };
@@ -739,7 +743,11 @@ export function App({ agent, workspace, modelRef, providerRef, config, resumedCo
739
743
  setInput(v.replace(/\t/g, ""));
740
744
  setCmdIndex(0);
741
745
  setFileIndex(0);
742
- }, onSubmit: handleSubmit }, inputKey)] }), suggestions.length > 0 && (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [suggestionWindow.visible.map((line, i) => {
746
+ },
747
+ // handleSubmit is async only because it awaits runAgent, which
748
+ // catches its own errors and renders them as transcript items —
749
+ // so there is no rejection left for this callback to surface.
750
+ onSubmit: (value) => void handleSubmit(value) }, inputKey)] }), suggestions.length > 0 && (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [suggestionWindow.visible.map((line, i) => {
743
751
  if (line.kind === "header") {
744
752
  return (_jsx(Text, { dimColor: true, wrap: "truncate", children: line.label }, `header:${line.label}`));
745
753
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kritya",
3
- "version": "0.8.51-beta",
3
+ "version": "0.8.52-beta",
4
4
  "description": "Kritya — Superintelligence at your command line",
5
5
  "type": "module",
6
6
  "publishConfig": {