@kikimoradev/kcloud 1.3.0 → 1.4.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.
- package/dist/main.js +8 -8
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1611,8 +1611,10 @@ const admissionHoldSchema = z.object({
|
|
|
1611
1611
|
const nodeStateSchema = z.enum([
|
|
1612
1612
|
"pending",
|
|
1613
1613
|
"online",
|
|
1614
|
-
"offline"
|
|
1614
|
+
"offline",
|
|
1615
|
+
"outdated"
|
|
1615
1616
|
]);
|
|
1617
|
+
const minimumNodeVersion = "1.3.0";
|
|
1616
1618
|
const nodeProviders = ["self_hosted", "digitalocean"];
|
|
1617
1619
|
const nodeProviderSchema = z.enum(nodeProviders);
|
|
1618
1620
|
const nodeNameSchema = z.string().trim().regex(slugPattern);
|
|
@@ -2627,10 +2629,7 @@ const agentMachineSchema = z.object({
|
|
|
2627
2629
|
diskGb: agentDiskGbSchema
|
|
2628
2630
|
});
|
|
2629
2631
|
const agentMachineInputSchema = agentMachineSchema.extend({ diskGb: agentDiskGbSchema.optional() });
|
|
2630
|
-
const agentMachineDtoSchema = agentMachineSchema.
|
|
2631
|
-
cpus: z.number().positive().optional().meta({ deprecated: true }),
|
|
2632
|
-
memoryMb: z.int().positive().optional().meta({ deprecated: true })
|
|
2633
|
-
}).meta({ id: "AgentMachine" });
|
|
2632
|
+
const agentMachineDtoSchema = agentMachineSchema.meta({ id: "AgentMachine" });
|
|
2634
2633
|
const agentPromptsSchema = z.object({
|
|
2635
2634
|
monitor: agentPromptSchema,
|
|
2636
2635
|
executor: agentPromptSchema
|
|
@@ -3152,7 +3151,6 @@ const masterKeyVersionSchema = z.object({
|
|
|
3152
3151
|
secrets: z.object({
|
|
3153
3152
|
credentials: secretCountSchema,
|
|
3154
3153
|
toolSecrets: secretCountSchema,
|
|
3155
|
-
platformSecrets: secretCountSchema,
|
|
3156
3154
|
providerAccounts: secretCountSchema.default(0)
|
|
3157
3155
|
}),
|
|
3158
3156
|
backups: secretCountSchema,
|
|
@@ -4292,7 +4290,8 @@ const agentHints = {
|
|
|
4292
4290
|
"agent.busy": "The agent is working on another action; try again in a moment.",
|
|
4293
4291
|
"concurrency.conflict": "Someone changed the agent meanwhile; read it again and retry.",
|
|
4294
4292
|
"agent.node_unsuitable": "The node lacks a capability the agent requires; kcloud nodes show <node> lists what it offers.",
|
|
4295
|
-
"node.offline": "The node of the agent is not connected; kcloud nodes show <node> tells when it was last seen."
|
|
4293
|
+
"node.offline": "The node of the agent is not connected; kcloud nodes show <node> tells when it was last seen.",
|
|
4294
|
+
"node.outdated": "The node of the agent runs an older release; kcloud nodes show <node> names the release it runs and its update."
|
|
4296
4295
|
};
|
|
4297
4296
|
const agentFrom = async (run, reference, project) => {
|
|
4298
4297
|
if (reference === void 0 || reference === "") throw new UsageError("This command needs an agent.", "Name it as <project>/<agent>, or pass --project.");
|
|
@@ -9878,6 +9877,7 @@ const capabilitiesOf = (node) => {
|
|
|
9878
9877
|
const { sandbox, uidIsolation } = node.capabilities;
|
|
9879
9878
|
return `sandbox ${sandbox ? "yes" : "no"}, uid isolation ${uidIsolation ? "yes" : "no"}`;
|
|
9880
9879
|
};
|
|
9880
|
+
const stateOf = (node) => node.state === "outdated" ? `outdated: runs ${node.version ?? "-"}, needs an update to ${minimumNodeVersion} or later` : node.state;
|
|
9881
9881
|
const registrationOf = (node) => node.registrationExpiresAt === null ? "-" : `a token waits until ${node.registrationExpiresAt}`;
|
|
9882
9882
|
const storageOf = ({ state, freeBytes, totalBytes, path }) => `${state}, ${gibibytes(freeBytes)} free of ${gibibytes(totalBytes)} at ${path}`;
|
|
9883
9883
|
const shapeText = ({ size, volumeGb }) => `${size} with a volume of ${volumeGb} GB`;
|
|
@@ -9938,7 +9938,7 @@ const lastUpdateOf = ({ update }) => {
|
|
|
9938
9938
|
const nodeDetailsText = (node) => [
|
|
9939
9939
|
renderTable([{ header: "FIELD" }, { header: "VALUE" }], [
|
|
9940
9940
|
["name", node.name],
|
|
9941
|
-
["state", node
|
|
9941
|
+
["state", stateOf(node)],
|
|
9942
9942
|
["provider", node.provider],
|
|
9943
9943
|
...machineRowsOf(node.machine),
|
|
9944
9944
|
...operationRowsOf(node.operation),
|