@ycodium-ai/agent-kimi 0.2.5921 → 0.2.5971

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 (2) hide show
  1. package/dist/index.js +22 -8
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ var __export = (target, all) => {
8
8
  import { definePlugin } from "@ycodium-ai/plugin-api";
9
9
 
10
10
  // ../../packages/plugin-api/src/version.ts
11
- var PLUGIN_API_VERSION = 187;
11
+ var PLUGIN_API_VERSION = 191;
12
12
 
13
13
  // src/index.ts
14
14
  import * as NodeOS6 from "node:os";
@@ -716,6 +716,7 @@ function canonicalItemTypeFromAcpToolKind(kind) {
716
716
 
717
717
  // ../../packages/ycodium-acp-executor/src/tool-call-state.ts
718
718
  var clearedIdentityFields = /* @__PURE__ */ new WeakMap();
719
+ var fallbackTitleStates = /* @__PURE__ */ new WeakSet();
719
720
  function readToolCallIdentityFields(state, options) {
720
721
  const cleared = clearedIdentityFields.get(state);
721
722
  return {
@@ -920,6 +921,9 @@ function makeToolCallState(input2, options) {
920
921
  ...textContent ? { contentText: textContent } : {},
921
922
  data
922
923
  };
924
+ if (title === void 0 && presentation?.summary === "Tool") {
925
+ fallbackTitleStates.add(state);
926
+ }
923
927
  if (input2.name === null || input2.mcpServer === null || input2.mcpTool === null || negativeMcp || explicitPositiveMcp) {
924
928
  clearedIdentityFields.set(state, {
925
929
  ...input2.name === null ? { name: null } : {},
@@ -962,11 +966,13 @@ function mergeToolCallState(previous, next) {
962
966
  const replaced = { ...next, status: status2 };
963
967
  const nextCleared2 = clearedIdentityFields.get(next);
964
968
  if (nextCleared2 !== void 0) clearedIdentityFields.set(replaced, nextCleared2);
969
+ if (fallbackTitleStates.has(next)) fallbackTitleStates.add(replaced);
965
970
  return replaced;
966
971
  }
967
972
  const nextKind = typeof next.data["kind"] === "string" ? next.data["kind"] : void 0;
968
973
  const kind = nextKind ?? previous?.kind;
969
- const title = next.title ?? previous?.title;
974
+ const nextIsFallbackTitle = fallbackTitleStates.has(next);
975
+ const title = nextIsFallbackTitle ? previous?.title ?? next.title : next.title ?? previous?.title;
970
976
  const status = next.status ?? previous?.status;
971
977
  const command = next.command ?? previous?.command;
972
978
  const detail = next.detail ?? previous?.detail;
@@ -1000,6 +1006,9 @@ function mergeToolCallState(previous, next) {
1000
1006
  } else if (nextPositiveMcp || prevCleared?.positiveMcp === true) {
1001
1007
  clearedIdentityFields.set(merged, { positiveMcp: true });
1002
1008
  }
1009
+ if (title === "Tool" && nextIsFallbackTitle && (previous === void 0 || fallbackTitleStates.has(previous))) {
1010
+ fallbackTitleStates.add(merged);
1011
+ }
1003
1012
  return merged;
1004
1013
  }
1005
1014
  var TOOL_CALL_UPDATE_MIN_DETAIL_GROWTH_CHARS = 256;
@@ -29323,6 +29332,16 @@ function modelSelectionStringOption(selection, optionId) {
29323
29332
  return void 0;
29324
29333
  }
29325
29334
 
29335
+ // ../../packages/ycodium-executor-common/src/redactDiagnostic.ts
29336
+ var PAIRING_URL_PATTERN = /https?:\/\/[^\s]*\/pair#[^\s]*/gi;
29337
+ var BEARER_TOKEN_PATTERN = /\bBearer\s+[A-Za-z0-9._\-+=/]+/gi;
29338
+ var BASIC_AUTH_PATTERN = /\bAuthorization:\s*Basic\s+\S+/gi;
29339
+ var API_KEY_HEADER_PATTERN = /\bx-api-key:\s*\S+/gi;
29340
+ var SECRET_TOKEN_PATTERN = /\b(?:sk-[A-Za-z0-9][A-Za-z0-9-]{7,}|ghp_[A-Za-z0-9]+|xox[a-zA-Z]-[A-Za-z0-9-]+)\b/g;
29341
+ function redactDiagnostic(text2) {
29342
+ return text2.replace(PAIRING_URL_PATTERN, "[pairing-url]").replace(BEARER_TOKEN_PATTERN, "Bearer [redacted]").replace(BASIC_AUTH_PATTERN, "Authorization: Basic [redacted]").replace(API_KEY_HEADER_PATTERN, "x-api-key: [redacted]").replace(SECRET_TOKEN_PATTERN, "[redacted]").trim();
29343
+ }
29344
+
29326
29345
  // ../../packages/ycodium-executor-common/src/nodeStreams.ts
29327
29346
  import * as NodeOS2 from "node:os";
29328
29347
  import * as NodeStream2 from "node:stream";
@@ -29385,11 +29404,6 @@ function nodeWritableFromHandle(handle, errors = ownErrors) {
29385
29404
  }
29386
29405
  var STDERR_TAIL_MAX_CHARS = 4096;
29387
29406
  var STDERR_SETTLE_MS = 500;
29388
- var PAIRING_URL_PATTERN = /https?:\/\/[^\s]*\/pair#[^\s]*/gi;
29389
- var BEARER_TOKEN_PATTERN = /\bBearer\s+[A-Za-z0-9._\-+=/]+/gi;
29390
- var BASIC_AUTH_PATTERN = /\bAuthorization:\s*Basic\s+\S+/gi;
29391
- var API_KEY_HEADER_PATTERN = /\bx-api-key:\s*\S+/gi;
29392
- var SECRET_TOKEN_PATTERN = /\b(?:sk-[A-Za-z0-9][A-Za-z0-9-]{7,}|ghp_[A-Za-z0-9]+|xox[a-zA-Z]-[A-Za-z0-9-]+)\b/g;
29393
29407
  function redactStderrExcerpt(text2, environment = process.env) {
29394
29408
  let result = text2.replaceAll("\0", "");
29395
29409
  const homes = [environment["HOME"], environment["USERPROFILE"], NodeOS2.homedir()].filter(
@@ -29398,7 +29412,7 @@ function redactStderrExcerpt(text2, environment = process.env) {
29398
29412
  for (const home of new Set(homes)) {
29399
29413
  result = result.split(home).join("~");
29400
29414
  }
29401
- return result.replace(PAIRING_URL_PATTERN, "[pairing-url]").replace(BEARER_TOKEN_PATTERN, "Bearer [redacted]").replace(BASIC_AUTH_PATTERN, "Authorization: Basic [redacted]").replace(API_KEY_HEADER_PATTERN, "x-api-key: [redacted]").replace(SECRET_TOKEN_PATTERN, "[redacted]").trim();
29415
+ return redactDiagnostic(result);
29402
29416
  }
29403
29417
  function drainStderrTail(stderr) {
29404
29418
  let tail = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-kimi",
3
- "version": "0.2.5921",
3
+ "version": "0.2.5971",
4
4
  "description": "Kimi Code executor: runs `kimi acp` over Agent Client Protocol stdio.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -21,9 +21,9 @@
21
21
  "@types/node": "24.12.4",
22
22
  "esbuild": "0.28.1",
23
23
  "vite-plus": "0.2.2",
24
- "@ycodium-ai/plugin-api": "0.2.5921",
24
+ "@ycodium-ai/plugin-api": "0.2.5971",
25
25
  "ycodium-executor-testing": "0.0.0",
26
- "ycodium-acp-executor": "0.2.5921",
26
+ "ycodium-acp-executor": "0.2.5971",
27
27
  "ycodium-instance-config": "0.0.0"
28
28
  },
29
29
  "ycodium": {