paperclip-plugin-autopilot-ops 0.1.15 → 0.1.16
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/manifest.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/worker.js +11 -1
- package/package.json +1 -1
package/dist/manifest.js
CHANGED
package/dist/ui/index.js
CHANGED
package/dist/worker.js
CHANGED
|
@@ -39932,7 +39932,7 @@ function startWorkerRpcHost(options) {
|
|
|
39932
39932
|
|
|
39933
39933
|
// src/manifest.ts
|
|
39934
39934
|
var PLUGIN_ID = "alephoo.autopilot-ops";
|
|
39935
|
-
var PLUGIN_VERSION = "0.1.
|
|
39935
|
+
var PLUGIN_VERSION = "0.1.16";
|
|
39936
39936
|
var DB_NAMESPACE_SLUG = "autopilot_ops";
|
|
39937
39937
|
var PAGE_ROUTE = "autopilot";
|
|
39938
39938
|
var TOOL_NAMES = {
|
|
@@ -41354,6 +41354,7 @@ import { randomUUID } from "node:crypto";
|
|
|
41354
41354
|
var ESTADOS_REGLA = ["borrador", "activa", "pausada"];
|
|
41355
41355
|
var LIMITES_REGLA = {
|
|
41356
41356
|
dias_desde: [1, 365, 30],
|
|
41357
|
+
dias_hasta: [2, 3650, 0],
|
|
41357
41358
|
cada_meses: [1, 60, 12],
|
|
41358
41359
|
max_intentos: [1, 5, 2],
|
|
41359
41360
|
dias_entre_intentos: [1, 30, 7],
|
|
@@ -41444,6 +41445,13 @@ function poblacion(problemas, p) {
|
|
|
41444
41445
|
}
|
|
41445
41446
|
return out;
|
|
41446
41447
|
}
|
|
41448
|
+
function diasHasta(problemas, parametros, p) {
|
|
41449
|
+
if (p.dias_hasta === void 0 || p.dias_hasta === null || p.dias_hasta === "") return;
|
|
41450
|
+
const hasta = numeroEn(problemas, "dias_hasta", p.dias_hasta);
|
|
41451
|
+
const desde = typeof parametros.dias_desde === "number" ? parametros.dias_desde : 0;
|
|
41452
|
+
if (hasta <= desde) problemas.push(`dias_hasta: tiene que ser mayor que dias_desde (${desde})`);
|
|
41453
|
+
else parametros.dias_hasta = hasta;
|
|
41454
|
+
}
|
|
41447
41455
|
function validarRegla(input2) {
|
|
41448
41456
|
const problemas = [];
|
|
41449
41457
|
const nombre = textoCorto(problemas, "nombre", input2.nombre, 80, true) ?? "";
|
|
@@ -41457,6 +41465,7 @@ function validarRegla(input2) {
|
|
|
41457
41465
|
const estudio = textoCorto(problemas, "estudio", p.estudio, 80, false);
|
|
41458
41466
|
if (estudio) parametros.estudio = estudio;
|
|
41459
41467
|
parametros.dias_desde = numeroEn(problemas, "dias_desde", p.dias_desde);
|
|
41468
|
+
diasHasta(problemas, parametros, p);
|
|
41460
41469
|
const sin = Array.isArray(p.sin) ? p.sin.map((x) => String(x).trim().toLowerCase()) : [...SIN_QUE];
|
|
41461
41470
|
if (sin.length === 0 || sin.some((x) => !SIN_QUE.includes(x))) problemas.push(`sin: lista con ${SIN_QUE.join(" y/o ")}`);
|
|
41462
41471
|
parametros.sin = [...new Set(sin)].filter((x) => SIN_QUE.includes(x));
|
|
@@ -41466,6 +41475,7 @@ function validarRegla(input2) {
|
|
|
41466
41475
|
const prioridad = textoCorto(problemas, "prioridad", p.prioridad, 40, false);
|
|
41467
41476
|
if (prioridad) parametros.prioridad = prioridad;
|
|
41468
41477
|
parametros.dias_desde = numeroEn(problemas, "dias_desde", p.dias_desde);
|
|
41478
|
+
diasHasta(problemas, parametros, p);
|
|
41469
41479
|
} else if (tipo === "control_periodico") {
|
|
41470
41480
|
const diagnostico = textoCorto(problemas, "diagnostico", p.diagnostico, 10, false);
|
|
41471
41481
|
if (diagnostico) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paperclip-plugin-autopilot-ops",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Autopilot Care · operación autónoma gobernada para instituciones de salud: workflows determinísticos, validaciones, registro de negocio, políticas (observa/propone/ejecuta/corte) y tablero del director, como plugin de Paperclip.",
|
|
6
6
|
"files": [
|