kritya 0.8.2-beta → 0.8.3-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/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # kritya
2
2
 
3
+ [![CI](https://github.com/GenAICloudDevOps/Kritya/actions/workflows/ci.yml/badge.svg)](https://github.com/GenAICloudDevOps/Kritya/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/kritya/beta)](https://www.npmjs.com/package/kritya)
5
+ [![License](https://img.shields.io/github/license/GenAICloudDevOps/Kritya)](LICENSE)
6
+
3
7
  > ⚠️ **Beta** — APIs, flags, and behavior may still change between releases.
4
8
 
5
9
  Open source, [MIT licensed](LICENSE).
@@ -47,6 +47,11 @@ export class LspClient {
47
47
  windowsHide: true,
48
48
  });
49
49
  this.proc = proc;
50
+ // A write can still be in flight when dispose() kills the process —
51
+ // stdin then errors asynchronously (EPIPE), separately from proc's own
52
+ // "error" event below. Unhandled, that's an uncaught exception; on
53
+ // Windows the timing between kill() and pipe teardown makes it common.
54
+ proc.stdin.on("error", () => { });
50
55
  proc.on("error", (err) => {
51
56
  this.markDead(err.code === "ENOENT"
52
57
  ? `'${this.config.command}' is not installed (install: ${this.config.installHint})`
@@ -149,10 +149,30 @@ function readGatedContent(workspace) {
149
149
  return null;
150
150
  return { allow, hooks, env, commands, mcp, memory, skills };
151
151
  }
152
+ /**
153
+ * Redacts secret values from .env content while preserving variable names, so
154
+ * the trust prompt can show what's being loaded without printing raw
155
+ * credentials to the terminal (visible in scrollback, screen shares,
156
+ * recordings, or session logs).
157
+ */
158
+ function redactEnvContent(env) {
159
+ return env
160
+ .split("\n")
161
+ .map((line) => {
162
+ const match = /^([A-Za-z_][A-Za-z0-9_]*)=(.*)$/.exec(line);
163
+ if (!match)
164
+ return line;
165
+ const [, key, value] = match;
166
+ return value.length ? `${key}=<redacted>` : line;
167
+ })
168
+ .join("\n");
169
+ }
152
170
  /**
153
171
  * A human-readable rendering of ALL the gated content, for the trust prompt.
154
172
  * The user must be able to see everything they're approving — not just
155
- * settings.json but the .env contents and each custom command file.
173
+ * settings.json but the .env contents and each custom command file. .env
174
+ * values are redacted (see {@link redactEnvContent}) since they're often
175
+ * secrets that shouldn't be printed to the terminal.
156
176
  */
157
177
  export function describeGatedContent(workspace) {
158
178
  const { allow, hooks } = readSettingsGatedContent(workspace);
@@ -163,7 +183,7 @@ export function describeGatedContent(workspace) {
163
183
  sections.push(`.kritya/settings.json (allow rules / hooks):\n${JSON.stringify({ allow, hooks }, null, 2)}`);
164
184
  }
165
185
  if (env !== undefined) {
166
- sections.push(`.env (loaded into the environment of every command):\n${env.trimEnd()}`);
186
+ sections.push(`.env (loaded into the environment of every command — values redacted):\n${redactEnvContent(env.trimEnd())}`);
167
187
  }
168
188
  if (commands) {
169
189
  const list = Object.entries(commands)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kritya",
3
- "version": "0.8.2-beta",
3
+ "version": "0.8.3-beta",
4
4
  "description": "Kritya — a lean, provider-agnostic terminal coding agent (NVIDIA, OpenAI, OpenRouter, Groq, Ollama, and more)",
5
5
  "type": "module",
6
6
  "bin": {