@kikimoradev/kcloud 1.5.4 → 1.5.6

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/main.js +9 -4
  2. package/package.json +3 -3
package/dist/main.js CHANGED
@@ -907,9 +907,10 @@ const workerEnvelope = (event) => ({
907
907
  level: agentEventLevelSchema,
908
908
  event: z.literal(event)
909
909
  });
910
+ const reportedRoleSchema = z.string().optional();
910
911
  const roleEnvelope = (event) => ({
911
912
  ...workerEnvelope(event),
912
- agent: agentRoleSchema.optional()
913
+ agent: reportedRoleSchema
913
914
  });
914
915
  const agentEventSchema = z.discriminatedUnion("event", [
915
916
  z.looseObject({
@@ -1089,7 +1090,7 @@ const agentEventSchema = z.discriminatedUnion("event", [
1089
1090
  z.looseObject({
1090
1091
  ts: instantSchema$2,
1091
1092
  level: agentEventLevelSchema,
1092
- agent: agentRoleSchema.optional(),
1093
+ agent: reportedRoleSchema,
1093
1094
  event: z.string().min(1).max(64)
1094
1095
  });
1095
1096
  agentEventSchema.options.map((option) => option.shape.event.value);
@@ -1324,6 +1325,7 @@ const agentSessionSchema = z.object({
1324
1325
  costUsd: z.number().nullable(),
1325
1326
  durationMs: z.int().nullable(),
1326
1327
  numTurns: z.int().nullable(),
1328
+ resumedAt: z.iso.datetime().nullable(),
1327
1329
  transcriptAvailable: z.boolean()
1328
1330
  }).meta({ id: "AgentSession" });
1329
1331
  pageSchema(agentSessionSchema).meta({ id: "AgentSessionPage" });
@@ -4542,7 +4544,8 @@ const poolLimitText = (limit) => {
4542
4544
  };
4543
4545
  const sessionFailures = {
4544
4546
  poolMemoryLimit: "killed by the pool memory limit",
4545
- launcherRefused: "refused by the session starter"
4547
+ launcherRefused: "refused by the session starter",
4548
+ resumeFailed: "could not be resumed"
4546
4549
  };
4547
4550
  const sessionFailureText = (reason) => reason === null ? "-" : sessionFailures[reason] ?? reason;
4548
4551
  const unsupportedReasons = {
@@ -4890,12 +4893,14 @@ const waitTexts = {
4890
4893
  renewal: "held while the node restarts the run"
4891
4894
  };
4892
4895
  const reasonOf$1 = ({ reason }) => reason ?? "slot";
4896
+ const isKnownReason = (reason) => Object.hasOwn(waitTexts, reason);
4897
+ const waitTextOf = (reason) => isKnownReason(reason) ? waitTexts[reason] : `held by the node (${reason})`;
4893
4898
  const waitRowsOf = ({ runtime }) => {
4894
4899
  const { admission } = runtime;
4895
4900
  if (admission === null) return [];
4896
4901
  const waits = ["monitor", "executor"].flatMap((role) => {
4897
4902
  const state = admission[role];
4898
- return state?.state === "waiting" ? [`${role} ${waitTexts[reasonOf$1(state)]}`] : [];
4903
+ return state?.state === "waiting" ? [`${role} ${waitTextOf(reasonOf$1(state))}`] : [];
4899
4904
  });
4900
4905
  return waits.length === 0 ? [] : [["admissions", waits.join("; ")]];
4901
4906
  };
package/package.json CHANGED
@@ -15,11 +15,11 @@
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
18
- "version": "1.5.4",
18
+ "version": "1.5.6",
19
19
  "dependencies": {
20
20
  "@clack/prompts": "1.8.1",
21
- "@modelcontextprotocol/server": "2.1.0",
21
+ "@modelcontextprotocol/server": "2.3.0",
22
22
  "openapi-fetch": "0.17.0",
23
- "zod": "4.6.2"
23
+ "zod": "4.6.6"
24
24
  }
25
25
  }