paperclip-plugin-autopilot-ops 0.1.0 → 0.1.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.
- package/README.md +61 -5
- package/dist/manifest.js +85 -6
- package/dist/ui/index.js +89 -7
- package/dist/worker.js +1211 -332
- package/migrations/002_tableros.sql +30 -0
- package/package.json +1 -1
package/dist/worker.js
CHANGED
|
@@ -4,12 +4,12 @@ var __export = (target, all) => {
|
|
|
4
4
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
// node_modules
|
|
7
|
+
// node_modules/@paperclipai/plugin-sdk/dist/define-plugin.js
|
|
8
8
|
function definePlugin(definition) {
|
|
9
9
|
return Object.freeze({ definition });
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
// node_modules
|
|
12
|
+
// node_modules/zod/v4/classic/external.js
|
|
13
13
|
var external_exports = {};
|
|
14
14
|
__export(external_exports, {
|
|
15
15
|
$brand: () => $brand,
|
|
@@ -272,7 +272,7 @@ __export(external_exports, {
|
|
|
272
272
|
xor: () => xor
|
|
273
273
|
});
|
|
274
274
|
|
|
275
|
-
// node_modules
|
|
275
|
+
// node_modules/zod/v4/core/index.js
|
|
276
276
|
var core_exports2 = {};
|
|
277
277
|
__export(core_exports2, {
|
|
278
278
|
$ZodAny: () => $ZodAny,
|
|
@@ -589,7 +589,7 @@ __export(core_exports2, {
|
|
|
589
589
|
withParser: () => withParser
|
|
590
590
|
});
|
|
591
591
|
|
|
592
|
-
// node_modules
|
|
592
|
+
// node_modules/zod/v4/core/util.js
|
|
593
593
|
var util_exports = {};
|
|
594
594
|
__export(util_exports, {
|
|
595
595
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -660,6 +660,7 @@ __export(util_exports, {
|
|
|
660
660
|
required: () => required,
|
|
661
661
|
safeExtend: () => safeExtend,
|
|
662
662
|
shallowClone: () => shallowClone,
|
|
663
|
+
sizeCaps: () => sizeCaps,
|
|
663
664
|
slugify: () => slugify,
|
|
664
665
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
665
666
|
toZod: () => toZod,
|
|
@@ -912,8 +913,8 @@ function numKeys(data) {
|
|
|
912
913
|
return keyCount;
|
|
913
914
|
}
|
|
914
915
|
var getParsedType = (data) => {
|
|
915
|
-
const
|
|
916
|
-
switch (
|
|
916
|
+
const t3 = typeof data;
|
|
917
|
+
switch (t3) {
|
|
917
918
|
case "undefined":
|
|
918
919
|
return "undefined";
|
|
919
920
|
case "string":
|
|
@@ -952,7 +953,7 @@ var getParsedType = (data) => {
|
|
|
952
953
|
}
|
|
953
954
|
return "object";
|
|
954
955
|
default:
|
|
955
|
-
throw new Error(`Unknown data type: ${
|
|
956
|
+
throw new Error(`Unknown data type: ${t3}`);
|
|
956
957
|
}
|
|
957
958
|
};
|
|
958
959
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
@@ -1179,6 +1180,18 @@ function prefixIssues(path2, issues) {
|
|
|
1179
1180
|
function unwrapMessage(message2) {
|
|
1180
1181
|
return typeof message2 === "string" ? message2 : message2?.message;
|
|
1181
1182
|
}
|
|
1183
|
+
function sizeCaps(defChecks) {
|
|
1184
|
+
const caps = [];
|
|
1185
|
+
for (const ch of defChecks ?? []) {
|
|
1186
|
+
const d = ch._zod.def;
|
|
1187
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
1188
|
+
break;
|
|
1189
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
1190
|
+
if (max >= 0)
|
|
1191
|
+
caps.push([max, ch]);
|
|
1192
|
+
}
|
|
1193
|
+
return caps;
|
|
1194
|
+
}
|
|
1182
1195
|
function attachSchema(issues, start, inst) {
|
|
1183
1196
|
var _a3;
|
|
1184
1197
|
for (let i = start; i < issues.length; i++) {
|
|
@@ -1240,8 +1253,8 @@ function getLengthableOrigin(input2) {
|
|
|
1240
1253
|
return "unknown";
|
|
1241
1254
|
}
|
|
1242
1255
|
function parsedType(data) {
|
|
1243
|
-
const
|
|
1244
|
-
switch (
|
|
1256
|
+
const t3 = typeof data;
|
|
1257
|
+
switch (t3) {
|
|
1245
1258
|
case "number": {
|
|
1246
1259
|
return Number.isNaN(data) ? "nan" : "number";
|
|
1247
1260
|
}
|
|
@@ -1258,7 +1271,7 @@ function parsedType(data) {
|
|
|
1258
1271
|
}
|
|
1259
1272
|
}
|
|
1260
1273
|
}
|
|
1261
|
-
return
|
|
1274
|
+
return t3;
|
|
1262
1275
|
}
|
|
1263
1276
|
function issue(...args) {
|
|
1264
1277
|
const [iss, input2, inst] = args;
|
|
@@ -1432,7 +1445,7 @@ function constantCatch(value) {
|
|
|
1432
1445
|
return fn;
|
|
1433
1446
|
}
|
|
1434
1447
|
|
|
1435
|
-
// node_modules
|
|
1448
|
+
// node_modules/zod/v4/core/core.js
|
|
1436
1449
|
var _a;
|
|
1437
1450
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1438
1451
|
status: "aborted"
|
|
@@ -1554,7 +1567,7 @@ function config(newConfig) {
|
|
|
1554
1567
|
return globalConfig;
|
|
1555
1568
|
}
|
|
1556
1569
|
|
|
1557
|
-
// node_modules
|
|
1570
|
+
// node_modules/zod/v4/core/errors.js
|
|
1558
1571
|
function _getMessage() {
|
|
1559
1572
|
const internals = this._zod;
|
|
1560
1573
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -1746,7 +1759,7 @@ function prettifyError(error62) {
|
|
|
1746
1759
|
return lines.join("\n");
|
|
1747
1760
|
}
|
|
1748
1761
|
|
|
1749
|
-
// node_modules
|
|
1762
|
+
// node_modules/zod/v4/core/parse.js
|
|
1750
1763
|
function finalizeParams(callee, params) {
|
|
1751
1764
|
return { callee: params?.callee ?? callee, Err: params?.Err };
|
|
1752
1765
|
}
|
|
@@ -1906,7 +1919,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1906
1919
|
};
|
|
1907
1920
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
1908
1921
|
|
|
1909
|
-
// node_modules
|
|
1922
|
+
// node_modules/zod/v4/core/regexes.js
|
|
1910
1923
|
var regexes_exports = {};
|
|
1911
1924
|
__export(regexes_exports, {
|
|
1912
1925
|
anyString: () => anyString,
|
|
@@ -2078,7 +2091,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
2078
2091
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
2079
2092
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
2080
2093
|
|
|
2081
|
-
// node_modules
|
|
2094
|
+
// node_modules/zod/v4/core/checks.js
|
|
2082
2095
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def2) => {
|
|
2083
2096
|
var _a3;
|
|
2084
2097
|
inst._zod ?? (inst._zod = {});
|
|
@@ -2554,7 +2567,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
2554
2567
|
};
|
|
2555
2568
|
});
|
|
2556
2569
|
|
|
2557
|
-
// node_modules
|
|
2570
|
+
// node_modules/zod/v4/core/doc.js
|
|
2558
2571
|
var Doc = class {
|
|
2559
2572
|
constructor(args = [], closed = {}) {
|
|
2560
2573
|
this.content = [];
|
|
@@ -2595,14 +2608,14 @@ ${content.join("\n")}
|
|
|
2595
2608
|
}
|
|
2596
2609
|
};
|
|
2597
2610
|
|
|
2598
|
-
// node_modules
|
|
2611
|
+
// node_modules/zod/v4/core/versions.js
|
|
2599
2612
|
var version = {
|
|
2600
2613
|
major: 4,
|
|
2601
2614
|
minor: 6,
|
|
2602
|
-
patch:
|
|
2615
|
+
patch: 7
|
|
2603
2616
|
};
|
|
2604
2617
|
|
|
2605
|
-
// node_modules
|
|
2618
|
+
// node_modules/zod/v4/core/schemas.js
|
|
2606
2619
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def2) => {
|
|
2607
2620
|
var _a3;
|
|
2608
2621
|
inst ?? (inst = {});
|
|
@@ -3355,6 +3368,31 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def2) => {
|
|
|
3355
3368
|
return payload;
|
|
3356
3369
|
};
|
|
3357
3370
|
});
|
|
3371
|
+
function capSize(inst, size) {
|
|
3372
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
3373
|
+
if (!caps.length)
|
|
3374
|
+
return;
|
|
3375
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
3376
|
+
const parse3 = inst._zod.parse;
|
|
3377
|
+
inst._zod.parse = (payload, ctx) => {
|
|
3378
|
+
const n = size(payload.value);
|
|
3379
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
3380
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
3381
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
3382
|
+
const start = payload.issues.length;
|
|
3383
|
+
ch._zod.check(payload);
|
|
3384
|
+
payload.issues[start].continue = false;
|
|
3385
|
+
attachSchema(payload.issues, start, inst);
|
|
3386
|
+
return payload;
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
return parse3(payload, ctx);
|
|
3391
|
+
};
|
|
3392
|
+
}
|
|
3393
|
+
var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
|
|
3394
|
+
var mapSize = (input2) => input2 instanceof Map ? input2.size : -1;
|
|
3395
|
+
var setSize = (input2) => input2 instanceof Set ? input2.size : -1;
|
|
3358
3396
|
function handleArrayResult(result, final, index) {
|
|
3359
3397
|
if (result.issues.length) {
|
|
3360
3398
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -3398,6 +3436,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def2) => {
|
|
|
3398
3436
|
}
|
|
3399
3437
|
return payload;
|
|
3400
3438
|
};
|
|
3439
|
+
capSize(inst, arraySize);
|
|
3401
3440
|
});
|
|
3402
3441
|
function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
3403
3442
|
const isPresent = key in input2;
|
|
@@ -3456,7 +3495,7 @@ function handleCatchall(proms, input2, payload, ctx, def2, inst, abortEarly) {
|
|
|
3456
3495
|
const unrecognized = [];
|
|
3457
3496
|
const keySet = def2.keySet;
|
|
3458
3497
|
const _catchall = def2.catchall._zod;
|
|
3459
|
-
const
|
|
3498
|
+
const t3 = _catchall.def.type;
|
|
3460
3499
|
const optin = _catchall.optin;
|
|
3461
3500
|
const optout = _catchall.optout;
|
|
3462
3501
|
let seen = 0;
|
|
@@ -3469,11 +3508,11 @@ function handleCatchall(proms, input2, payload, ctx, def2, inst, abortEarly) {
|
|
|
3469
3508
|
if (keySet.has(key))
|
|
3470
3509
|
continue;
|
|
3471
3510
|
if (key === "__proto__") {
|
|
3472
|
-
if (
|
|
3511
|
+
if (t3 === "never")
|
|
3473
3512
|
unrecognized.push(key);
|
|
3474
3513
|
continue;
|
|
3475
3514
|
}
|
|
3476
|
-
if (
|
|
3515
|
+
if (t3 === "never") {
|
|
3477
3516
|
unrecognized.push(key);
|
|
3478
3517
|
continue;
|
|
3479
3518
|
}
|
|
@@ -4354,6 +4393,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def2) => {
|
|
|
4354
4393
|
return Promise.all(proms).then(() => payload);
|
|
4355
4394
|
return payload;
|
|
4356
4395
|
};
|
|
4396
|
+
capSize(inst, mapSize);
|
|
4357
4397
|
});
|
|
4358
4398
|
function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
|
|
4359
4399
|
if (keyResult.issues.length) {
|
|
@@ -4420,6 +4460,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def2) => {
|
|
|
4420
4460
|
return Promise.all(proms).then(() => payload);
|
|
4421
4461
|
return payload;
|
|
4422
4462
|
};
|
|
4463
|
+
capSize(inst, setSize);
|
|
4423
4464
|
});
|
|
4424
4465
|
function handleSetResult(result, final) {
|
|
4425
4466
|
if (result.issues.length) {
|
|
@@ -5016,7 +5057,7 @@ function handleRefineResult(result, payload, input2, inst) {
|
|
|
5016
5057
|
}
|
|
5017
5058
|
}
|
|
5018
5059
|
|
|
5019
|
-
// node_modules
|
|
5060
|
+
// node_modules/zod/v4/core/memoizer.js
|
|
5020
5061
|
var $ZodCyclicError = class extends Error {
|
|
5021
5062
|
constructor() {
|
|
5022
5063
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -5293,7 +5334,7 @@ function isBackEdge(ctx, value) {
|
|
|
5293
5334
|
return backEdges !== void 0 && isRef(value) && backEdges.has(value);
|
|
5294
5335
|
}
|
|
5295
5336
|
|
|
5296
|
-
// node_modules
|
|
5337
|
+
// node_modules/zod/v4/locales/index.js
|
|
5297
5338
|
var locales_exports = {};
|
|
5298
5339
|
__export(locales_exports, {
|
|
5299
5340
|
ar: () => ar_default,
|
|
@@ -5361,7 +5402,7 @@ __export(locales_exports, {
|
|
|
5361
5402
|
zhTW: () => zh_TW_default
|
|
5362
5403
|
});
|
|
5363
5404
|
|
|
5364
|
-
// node_modules
|
|
5405
|
+
// node_modules/zod/v4/locales/ar.js
|
|
5365
5406
|
var error = () => {
|
|
5366
5407
|
const Sizable = {
|
|
5367
5408
|
string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
@@ -5473,7 +5514,7 @@ function ar_default() {
|
|
|
5473
5514
|
};
|
|
5474
5515
|
}
|
|
5475
5516
|
|
|
5476
|
-
// node_modules
|
|
5517
|
+
// node_modules/zod/v4/locales/az.js
|
|
5477
5518
|
var error2 = () => {
|
|
5478
5519
|
const Sizable = {
|
|
5479
5520
|
string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
|
|
@@ -5584,7 +5625,7 @@ function az_default() {
|
|
|
5584
5625
|
};
|
|
5585
5626
|
}
|
|
5586
5627
|
|
|
5587
|
-
// node_modules
|
|
5628
|
+
// node_modules/zod/v4/locales/be.js
|
|
5588
5629
|
function getBelarusianPlural(count, one, few, many) {
|
|
5589
5630
|
const absCount = Math.abs(count);
|
|
5590
5631
|
const lastDigit = absCount % 10;
|
|
@@ -5753,7 +5794,7 @@ function be_default() {
|
|
|
5753
5794
|
};
|
|
5754
5795
|
}
|
|
5755
5796
|
|
|
5756
|
-
// node_modules
|
|
5797
|
+
// node_modules/zod/v4/locales/bg.js
|
|
5757
5798
|
var error4 = () => {
|
|
5758
5799
|
const Sizable = {
|
|
5759
5800
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
@@ -5879,7 +5920,7 @@ function bg_default() {
|
|
|
5879
5920
|
};
|
|
5880
5921
|
}
|
|
5881
5922
|
|
|
5882
|
-
// node_modules
|
|
5923
|
+
// node_modules/zod/v4/locales/bn.js
|
|
5883
5924
|
var error5 = () => {
|
|
5884
5925
|
const Sizable = {
|
|
5885
5926
|
string: { unit: "\u0985\u0995\u09CD\u09B7\u09B0", verb: "\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7" },
|
|
@@ -5993,7 +6034,7 @@ function bn_default() {
|
|
|
5993
6034
|
};
|
|
5994
6035
|
}
|
|
5995
6036
|
|
|
5996
|
-
// node_modules
|
|
6037
|
+
// node_modules/zod/v4/locales/ca.js
|
|
5997
6038
|
var error6 = () => {
|
|
5998
6039
|
const Sizable = {
|
|
5999
6040
|
string: { unit: "car\xE0cters", verb: "contenir" },
|
|
@@ -6107,7 +6148,7 @@ function ca_default() {
|
|
|
6107
6148
|
};
|
|
6108
6149
|
}
|
|
6109
6150
|
|
|
6110
|
-
// node_modules
|
|
6151
|
+
// node_modules/zod/v4/locales/ckb.js
|
|
6111
6152
|
var error7 = () => {
|
|
6112
6153
|
const Sizable = {
|
|
6113
6154
|
string: { unit: "\u067E\u06CC\u062A", verb: "\u0628\u06CE\u062A" },
|
|
@@ -6240,7 +6281,7 @@ function ckb_default() {
|
|
|
6240
6281
|
};
|
|
6241
6282
|
}
|
|
6242
6283
|
|
|
6243
|
-
// node_modules
|
|
6284
|
+
// node_modules/zod/v4/locales/cs.js
|
|
6244
6285
|
var error8 = () => {
|
|
6245
6286
|
const Sizable = {
|
|
6246
6287
|
string: { unit: "znak\u016F", verb: "m\xEDt" },
|
|
@@ -6357,7 +6398,7 @@ function cs_default() {
|
|
|
6357
6398
|
};
|
|
6358
6399
|
}
|
|
6359
6400
|
|
|
6360
|
-
// node_modules
|
|
6401
|
+
// node_modules/zod/v4/locales/da.js
|
|
6361
6402
|
var error9 = () => {
|
|
6362
6403
|
const Sizable = {
|
|
6363
6404
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -6478,7 +6519,7 @@ function da_default() {
|
|
|
6478
6519
|
};
|
|
6479
6520
|
}
|
|
6480
6521
|
|
|
6481
|
-
// node_modules
|
|
6522
|
+
// node_modules/zod/v4/locales/de.js
|
|
6482
6523
|
var error10 = () => {
|
|
6483
6524
|
const Sizable = {
|
|
6484
6525
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -6592,7 +6633,7 @@ function de_default() {
|
|
|
6592
6633
|
};
|
|
6593
6634
|
}
|
|
6594
6635
|
|
|
6595
|
-
// node_modules
|
|
6636
|
+
// node_modules/zod/v4/locales/el.js
|
|
6596
6637
|
var error11 = () => {
|
|
6597
6638
|
const Sizable = {
|
|
6598
6639
|
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
@@ -6705,7 +6746,7 @@ function el_default() {
|
|
|
6705
6746
|
};
|
|
6706
6747
|
}
|
|
6707
6748
|
|
|
6708
|
-
// node_modules
|
|
6749
|
+
// node_modules/zod/v4/locales/en.js
|
|
6709
6750
|
var error12 = () => {
|
|
6710
6751
|
const Sizable = {
|
|
6711
6752
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -6830,7 +6871,7 @@ function en_default() {
|
|
|
6830
6871
|
};
|
|
6831
6872
|
}
|
|
6832
6873
|
|
|
6833
|
-
// node_modules
|
|
6874
|
+
// node_modules/zod/v4/locales/eo.js
|
|
6834
6875
|
var error13 = () => {
|
|
6835
6876
|
const Sizable = {
|
|
6836
6877
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -6945,7 +6986,7 @@ function eo_default() {
|
|
|
6945
6986
|
};
|
|
6946
6987
|
}
|
|
6947
6988
|
|
|
6948
|
-
// node_modules
|
|
6989
|
+
// node_modules/zod/v4/locales/es.js
|
|
6949
6990
|
var error14 = () => {
|
|
6950
6991
|
const Sizable = {
|
|
6951
6992
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -7082,7 +7123,7 @@ function es_default() {
|
|
|
7082
7123
|
};
|
|
7083
7124
|
}
|
|
7084
7125
|
|
|
7085
|
-
// node_modules
|
|
7126
|
+
// node_modules/zod/v4/locales/fa.js
|
|
7086
7127
|
var error15 = () => {
|
|
7087
7128
|
const Sizable = {
|
|
7088
7129
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -7202,7 +7243,7 @@ function fa_default() {
|
|
|
7202
7243
|
};
|
|
7203
7244
|
}
|
|
7204
7245
|
|
|
7205
|
-
// node_modules
|
|
7246
|
+
// node_modules/zod/v4/locales/fi.js
|
|
7206
7247
|
var error16 = () => {
|
|
7207
7248
|
const Sizable = {
|
|
7208
7249
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
@@ -7320,7 +7361,7 @@ function fi_default() {
|
|
|
7320
7361
|
};
|
|
7321
7362
|
}
|
|
7322
7363
|
|
|
7323
|
-
// node_modules
|
|
7364
|
+
// node_modules/zod/v4/locales/fr.js
|
|
7324
7365
|
var error17 = () => {
|
|
7325
7366
|
const Sizable = {
|
|
7326
7367
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -7450,7 +7491,7 @@ function fr_default() {
|
|
|
7450
7491
|
};
|
|
7451
7492
|
}
|
|
7452
7493
|
|
|
7453
|
-
// node_modules
|
|
7494
|
+
// node_modules/zod/v4/locales/fr-CA.js
|
|
7454
7495
|
var error18 = () => {
|
|
7455
7496
|
const Sizable = {
|
|
7456
7497
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -7563,7 +7604,7 @@ function fr_CA_default() {
|
|
|
7563
7604
|
};
|
|
7564
7605
|
}
|
|
7565
7606
|
|
|
7566
|
-
// node_modules
|
|
7607
|
+
// node_modules/zod/v4/locales/gu.js
|
|
7567
7608
|
var error19 = () => {
|
|
7568
7609
|
const Sizable = {
|
|
7569
7610
|
string: { unit: "\u0A85\u0A95\u0ACD\u0AB7\u0AB0", verb: "\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F" },
|
|
@@ -7677,7 +7718,7 @@ function gu_default() {
|
|
|
7677
7718
|
};
|
|
7678
7719
|
}
|
|
7679
7720
|
|
|
7680
|
-
// node_modules
|
|
7721
|
+
// node_modules/zod/v4/locales/he.js
|
|
7681
7722
|
var error20 = () => {
|
|
7682
7723
|
const TypeNames = {
|
|
7683
7724
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
@@ -7707,16 +7748,16 @@ var error20 = () => {
|
|
|
7707
7748
|
number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }
|
|
7708
7749
|
// no unit
|
|
7709
7750
|
};
|
|
7710
|
-
const typeEntry = (
|
|
7711
|
-
const typeLabel = (
|
|
7712
|
-
const e = typeEntry(
|
|
7751
|
+
const typeEntry = (t3) => t3 ? TypeNames[t3] : void 0;
|
|
7752
|
+
const typeLabel = (t3) => {
|
|
7753
|
+
const e = typeEntry(t3);
|
|
7713
7754
|
if (e)
|
|
7714
7755
|
return e.label;
|
|
7715
|
-
return
|
|
7756
|
+
return t3 ?? TypeNames.unknown.label;
|
|
7716
7757
|
};
|
|
7717
|
-
const withDefinite = (
|
|
7718
|
-
const verbFor = (
|
|
7719
|
-
const e = typeEntry(
|
|
7758
|
+
const withDefinite = (t3) => `\u05D4${typeLabel(t3)}`;
|
|
7759
|
+
const verbFor = (t3) => {
|
|
7760
|
+
const e = typeEntry(t3);
|
|
7720
7761
|
const gender = e?.gender ?? "m";
|
|
7721
7762
|
return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA";
|
|
7722
7763
|
};
|
|
@@ -7879,7 +7920,7 @@ function he_default() {
|
|
|
7879
7920
|
};
|
|
7880
7921
|
}
|
|
7881
7922
|
|
|
7882
|
-
// node_modules
|
|
7923
|
+
// node_modules/zod/v4/locales/hi.js
|
|
7883
7924
|
var error21 = () => {
|
|
7884
7925
|
const Sizable = {
|
|
7885
7926
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F" },
|
|
@@ -7991,7 +8032,7 @@ function hi_default() {
|
|
|
7991
8032
|
};
|
|
7992
8033
|
}
|
|
7993
8034
|
|
|
7994
|
-
// node_modules
|
|
8035
|
+
// node_modules/zod/v4/locales/hr.js
|
|
7995
8036
|
var error22 = () => {
|
|
7996
8037
|
const Sizable = {
|
|
7997
8038
|
string: { unit: "znakova", verb: "imati" },
|
|
@@ -8118,7 +8159,7 @@ function hr_default() {
|
|
|
8118
8159
|
};
|
|
8119
8160
|
}
|
|
8120
8161
|
|
|
8121
|
-
// node_modules
|
|
8162
|
+
// node_modules/zod/v4/locales/hu.js
|
|
8122
8163
|
var error23 = () => {
|
|
8123
8164
|
const Sizable = {
|
|
8124
8165
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -8232,7 +8273,7 @@ function hu_default() {
|
|
|
8232
8273
|
};
|
|
8233
8274
|
}
|
|
8234
8275
|
|
|
8235
|
-
// node_modules
|
|
8276
|
+
// node_modules/zod/v4/locales/hy.js
|
|
8236
8277
|
function getArmenianPlural(count, one, many) {
|
|
8237
8278
|
return Math.abs(count) === 1 ? one : many;
|
|
8238
8279
|
}
|
|
@@ -8391,7 +8432,7 @@ function hy_default() {
|
|
|
8391
8432
|
};
|
|
8392
8433
|
}
|
|
8393
8434
|
|
|
8394
|
-
// node_modules
|
|
8435
|
+
// node_modules/zod/v4/locales/id.js
|
|
8395
8436
|
var error25 = () => {
|
|
8396
8437
|
const Sizable = {
|
|
8397
8438
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -8503,7 +8544,7 @@ function id_default() {
|
|
|
8503
8544
|
};
|
|
8504
8545
|
}
|
|
8505
8546
|
|
|
8506
|
-
// node_modules
|
|
8547
|
+
// node_modules/zod/v4/locales/is.js
|
|
8507
8548
|
var error26 = () => {
|
|
8508
8549
|
const Sizable = {
|
|
8509
8550
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
@@ -8618,7 +8659,7 @@ function is_default() {
|
|
|
8618
8659
|
};
|
|
8619
8660
|
}
|
|
8620
8661
|
|
|
8621
|
-
// node_modules
|
|
8662
|
+
// node_modules/zod/v4/locales/it.js
|
|
8622
8663
|
var error27 = () => {
|
|
8623
8664
|
const Sizable = {
|
|
8624
8665
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -8732,7 +8773,7 @@ function it_default() {
|
|
|
8732
8773
|
};
|
|
8733
8774
|
}
|
|
8734
8775
|
|
|
8735
|
-
// node_modules
|
|
8776
|
+
// node_modules/zod/v4/locales/ja.js
|
|
8736
8777
|
var error28 = () => {
|
|
8737
8778
|
const Sizable = {
|
|
8738
8779
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
@@ -8845,7 +8886,7 @@ function ja_default() {
|
|
|
8845
8886
|
};
|
|
8846
8887
|
}
|
|
8847
8888
|
|
|
8848
|
-
// node_modules
|
|
8889
|
+
// node_modules/zod/v4/locales/ka.js
|
|
8849
8890
|
var error29 = () => {
|
|
8850
8891
|
const Sizable = {
|
|
8851
8892
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -8963,7 +9004,7 @@ function ka_default() {
|
|
|
8963
9004
|
};
|
|
8964
9005
|
}
|
|
8965
9006
|
|
|
8966
|
-
// node_modules
|
|
9007
|
+
// node_modules/zod/v4/locales/km.js
|
|
8967
9008
|
var error30 = () => {
|
|
8968
9009
|
const Sizable = {
|
|
8969
9010
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -9079,12 +9120,12 @@ function km_default() {
|
|
|
9079
9120
|
};
|
|
9080
9121
|
}
|
|
9081
9122
|
|
|
9082
|
-
// node_modules
|
|
9123
|
+
// node_modules/zod/v4/locales/kh.js
|
|
9083
9124
|
function kh_default() {
|
|
9084
9125
|
return km_default();
|
|
9085
9126
|
}
|
|
9086
9127
|
|
|
9087
|
-
// node_modules
|
|
9128
|
+
// node_modules/zod/v4/locales/kn.js
|
|
9088
9129
|
var error31 = () => {
|
|
9089
9130
|
const Sizable = {
|
|
9090
9131
|
string: { unit: "\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1", verb: "\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1" },
|
|
@@ -9200,7 +9241,7 @@ function kn_default() {
|
|
|
9200
9241
|
};
|
|
9201
9242
|
}
|
|
9202
9243
|
|
|
9203
|
-
// node_modules
|
|
9244
|
+
// node_modules/zod/v4/locales/ko.js
|
|
9204
9245
|
var error32 = () => {
|
|
9205
9246
|
const Sizable = {
|
|
9206
9247
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
@@ -9317,7 +9358,7 @@ function ko_default() {
|
|
|
9317
9358
|
};
|
|
9318
9359
|
}
|
|
9319
9360
|
|
|
9320
|
-
// node_modules
|
|
9361
|
+
// node_modules/zod/v4/locales/lt.js
|
|
9321
9362
|
var capitalizeFirstCharacter = (text2) => {
|
|
9322
9363
|
return text2.charAt(0).toUpperCase() + text2.slice(1);
|
|
9323
9364
|
};
|
|
@@ -9525,7 +9566,7 @@ function lt_default() {
|
|
|
9525
9566
|
};
|
|
9526
9567
|
}
|
|
9527
9568
|
|
|
9528
|
-
// node_modules
|
|
9569
|
+
// node_modules/zod/v4/locales/mk.js
|
|
9529
9570
|
var error34 = () => {
|
|
9530
9571
|
const Sizable = {
|
|
9531
9572
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -9640,7 +9681,7 @@ function mk_default() {
|
|
|
9640
9681
|
};
|
|
9641
9682
|
}
|
|
9642
9683
|
|
|
9643
|
-
// node_modules
|
|
9684
|
+
// node_modules/zod/v4/locales/ms.js
|
|
9644
9685
|
var error35 = () => {
|
|
9645
9686
|
const Sizable = {
|
|
9646
9687
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -9753,7 +9794,7 @@ function ms_default() {
|
|
|
9753
9794
|
};
|
|
9754
9795
|
}
|
|
9755
9796
|
|
|
9756
|
-
// node_modules
|
|
9797
|
+
// node_modules/zod/v4/locales/ne.js
|
|
9757
9798
|
var error36 = () => {
|
|
9758
9799
|
const Sizable = {
|
|
9759
9800
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B" },
|
|
@@ -9865,7 +9906,7 @@ function ne_default() {
|
|
|
9865
9906
|
};
|
|
9866
9907
|
}
|
|
9867
9908
|
|
|
9868
|
-
// node_modules
|
|
9909
|
+
// node_modules/zod/v4/locales/nl.js
|
|
9869
9910
|
var error37 = () => {
|
|
9870
9911
|
const Sizable = {
|
|
9871
9912
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -9981,7 +10022,7 @@ function nl_default() {
|
|
|
9981
10022
|
};
|
|
9982
10023
|
}
|
|
9983
10024
|
|
|
9984
|
-
// node_modules
|
|
10025
|
+
// node_modules/zod/v4/locales/nn.js
|
|
9985
10026
|
var error38 = () => {
|
|
9986
10027
|
const Sizable = {
|
|
9987
10028
|
string: { unit: "teikn", verb: "\xE5 ha" },
|
|
@@ -10095,7 +10136,7 @@ function nn_default() {
|
|
|
10095
10136
|
};
|
|
10096
10137
|
}
|
|
10097
10138
|
|
|
10098
|
-
// node_modules
|
|
10139
|
+
// node_modules/zod/v4/locales/no.js
|
|
10099
10140
|
var error39 = () => {
|
|
10100
10141
|
const Sizable = {
|
|
10101
10142
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
@@ -10209,7 +10250,7 @@ function no_default() {
|
|
|
10209
10250
|
};
|
|
10210
10251
|
}
|
|
10211
10252
|
|
|
10212
|
-
// node_modules
|
|
10253
|
+
// node_modules/zod/v4/locales/ota.js
|
|
10213
10254
|
var error40 = () => {
|
|
10214
10255
|
const Sizable = {
|
|
10215
10256
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
@@ -10324,7 +10365,7 @@ function ota_default() {
|
|
|
10324
10365
|
};
|
|
10325
10366
|
}
|
|
10326
10367
|
|
|
10327
|
-
// node_modules
|
|
10368
|
+
// node_modules/zod/v4/locales/ps.js
|
|
10328
10369
|
var error41 = () => {
|
|
10329
10370
|
const Sizable = {
|
|
10330
10371
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -10444,7 +10485,7 @@ function ps_default() {
|
|
|
10444
10485
|
};
|
|
10445
10486
|
}
|
|
10446
10487
|
|
|
10447
|
-
// node_modules
|
|
10488
|
+
// node_modules/zod/v4/locales/pl.js
|
|
10448
10489
|
var error42 = () => {
|
|
10449
10490
|
const Sizable = {
|
|
10450
10491
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
@@ -10559,7 +10600,7 @@ function pl_default() {
|
|
|
10559
10600
|
};
|
|
10560
10601
|
}
|
|
10561
10602
|
|
|
10562
|
-
// node_modules
|
|
10603
|
+
// node_modules/zod/v4/locales/pt.js
|
|
10563
10604
|
var error43 = () => {
|
|
10564
10605
|
const Sizable = {
|
|
10565
10606
|
string: { unit: "caracteres" },
|
|
@@ -10703,7 +10744,7 @@ function pt_default() {
|
|
|
10703
10744
|
};
|
|
10704
10745
|
}
|
|
10705
10746
|
|
|
10706
|
-
// node_modules
|
|
10747
|
+
// node_modules/zod/v4/locales/pt-BR.js
|
|
10707
10748
|
var error44 = () => {
|
|
10708
10749
|
const Sizable = {
|
|
10709
10750
|
string: { unit: "caracteres" },
|
|
@@ -10848,7 +10889,7 @@ function pt_BR_default() {
|
|
|
10848
10889
|
};
|
|
10849
10890
|
}
|
|
10850
10891
|
|
|
10851
|
-
// node_modules
|
|
10892
|
+
// node_modules/zod/v4/locales/ro.js
|
|
10852
10893
|
var error45 = () => {
|
|
10853
10894
|
const Sizable = {
|
|
10854
10895
|
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
@@ -10971,7 +11012,7 @@ function ro_default() {
|
|
|
10971
11012
|
};
|
|
10972
11013
|
}
|
|
10973
11014
|
|
|
10974
|
-
// node_modules
|
|
11015
|
+
// node_modules/zod/v4/locales/ru.js
|
|
10975
11016
|
function getRussianPlural(count, one, few, many) {
|
|
10976
11017
|
const absCount = Math.abs(count);
|
|
10977
11018
|
const lastDigit = absCount % 10;
|
|
@@ -11140,7 +11181,7 @@ function ru_default() {
|
|
|
11140
11181
|
};
|
|
11141
11182
|
}
|
|
11142
11183
|
|
|
11143
|
-
// node_modules
|
|
11184
|
+
// node_modules/zod/v4/locales/sk.js
|
|
11144
11185
|
var error47 = () => {
|
|
11145
11186
|
const Sizable = {
|
|
11146
11187
|
string: { unit: "znakov", verb: "ma\u0165" },
|
|
@@ -11257,7 +11298,7 @@ function sk_default() {
|
|
|
11257
11298
|
};
|
|
11258
11299
|
}
|
|
11259
11300
|
|
|
11260
|
-
// node_modules
|
|
11301
|
+
// node_modules/zod/v4/locales/sl.js
|
|
11261
11302
|
var error48 = () => {
|
|
11262
11303
|
const Sizable = {
|
|
11263
11304
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -11372,7 +11413,7 @@ function sl_default() {
|
|
|
11372
11413
|
};
|
|
11373
11414
|
}
|
|
11374
11415
|
|
|
11375
|
-
// node_modules
|
|
11416
|
+
// node_modules/zod/v4/locales/sv.js
|
|
11376
11417
|
var error49 = () => {
|
|
11377
11418
|
const Sizable = {
|
|
11378
11419
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -11488,7 +11529,7 @@ function sv_default() {
|
|
|
11488
11529
|
};
|
|
11489
11530
|
}
|
|
11490
11531
|
|
|
11491
|
-
// node_modules
|
|
11532
|
+
// node_modules/zod/v4/locales/ta.js
|
|
11492
11533
|
var error50 = () => {
|
|
11493
11534
|
const Sizable = {
|
|
11494
11535
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -11604,7 +11645,7 @@ function ta_default() {
|
|
|
11604
11645
|
};
|
|
11605
11646
|
}
|
|
11606
11647
|
|
|
11607
|
-
// node_modules
|
|
11648
|
+
// node_modules/zod/v4/locales/tg.js
|
|
11608
11649
|
var error51 = () => {
|
|
11609
11650
|
const Sizable = {
|
|
11610
11651
|
string: { unit: "\u0430\u043B\u043E\u043C\u0430\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
|
|
@@ -11721,7 +11762,7 @@ function tg_default() {
|
|
|
11721
11762
|
};
|
|
11722
11763
|
}
|
|
11723
11764
|
|
|
11724
|
-
// node_modules
|
|
11765
|
+
// node_modules/zod/v4/locales/th.js
|
|
11725
11766
|
var error52 = () => {
|
|
11726
11767
|
const Sizable = {
|
|
11727
11768
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -11837,7 +11878,7 @@ function th_default() {
|
|
|
11837
11878
|
};
|
|
11838
11879
|
}
|
|
11839
11880
|
|
|
11840
|
-
// node_modules
|
|
11881
|
+
// node_modules/zod/v4/locales/tk.js
|
|
11841
11882
|
var error53 = () => {
|
|
11842
11883
|
const Sizable = {
|
|
11843
11884
|
string: { unit: "simwol", verb: "bolmaly" },
|
|
@@ -11945,7 +11986,7 @@ function tk_default() {
|
|
|
11945
11986
|
};
|
|
11946
11987
|
}
|
|
11947
11988
|
|
|
11948
|
-
// node_modules
|
|
11989
|
+
// node_modules/zod/v4/locales/tr.js
|
|
11949
11990
|
var error54 = () => {
|
|
11950
11991
|
const Sizable = {
|
|
11951
11992
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
@@ -12056,7 +12097,7 @@ function tr_default() {
|
|
|
12056
12097
|
};
|
|
12057
12098
|
}
|
|
12058
12099
|
|
|
12059
|
-
// node_modules
|
|
12100
|
+
// node_modules/zod/v4/locales/uk.js
|
|
12060
12101
|
var error55 = () => {
|
|
12061
12102
|
const Sizable = {
|
|
12062
12103
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -12170,12 +12211,12 @@ function uk_default() {
|
|
|
12170
12211
|
};
|
|
12171
12212
|
}
|
|
12172
12213
|
|
|
12173
|
-
// node_modules
|
|
12214
|
+
// node_modules/zod/v4/locales/ua.js
|
|
12174
12215
|
function ua_default() {
|
|
12175
12216
|
return uk_default();
|
|
12176
12217
|
}
|
|
12177
12218
|
|
|
12178
|
-
// node_modules
|
|
12219
|
+
// node_modules/zod/v4/locales/ur.js
|
|
12179
12220
|
var error56 = () => {
|
|
12180
12221
|
const Sizable = {
|
|
12181
12222
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -12291,7 +12332,7 @@ function ur_default() {
|
|
|
12291
12332
|
};
|
|
12292
12333
|
}
|
|
12293
12334
|
|
|
12294
|
-
// node_modules
|
|
12335
|
+
// node_modules/zod/v4/locales/uz.js
|
|
12295
12336
|
var error57 = () => {
|
|
12296
12337
|
const Sizable = {
|
|
12297
12338
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
@@ -12405,7 +12446,7 @@ function uz_default() {
|
|
|
12405
12446
|
};
|
|
12406
12447
|
}
|
|
12407
12448
|
|
|
12408
|
-
// node_modules
|
|
12449
|
+
// node_modules/zod/v4/locales/vi.js
|
|
12409
12450
|
var error58 = () => {
|
|
12410
12451
|
const Sizable = {
|
|
12411
12452
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
@@ -12519,7 +12560,7 @@ function vi_default() {
|
|
|
12519
12560
|
};
|
|
12520
12561
|
}
|
|
12521
12562
|
|
|
12522
|
-
// node_modules
|
|
12563
|
+
// node_modules/zod/v4/locales/zh-CN.js
|
|
12523
12564
|
var error59 = () => {
|
|
12524
12565
|
const Sizable = {
|
|
12525
12566
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
@@ -12634,7 +12675,7 @@ function zh_CN_default() {
|
|
|
12634
12675
|
};
|
|
12635
12676
|
}
|
|
12636
12677
|
|
|
12637
|
-
// node_modules
|
|
12678
|
+
// node_modules/zod/v4/locales/zh-TW.js
|
|
12638
12679
|
var error60 = () => {
|
|
12639
12680
|
const Sizable = {
|
|
12640
12681
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
@@ -12747,7 +12788,7 @@ function zh_TW_default() {
|
|
|
12747
12788
|
};
|
|
12748
12789
|
}
|
|
12749
12790
|
|
|
12750
|
-
// node_modules
|
|
12791
|
+
// node_modules/zod/v4/locales/yo.js
|
|
12751
12792
|
var error61 = () => {
|
|
12752
12793
|
const Sizable = {
|
|
12753
12794
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
@@ -12860,7 +12901,7 @@ function yo_default() {
|
|
|
12860
12901
|
};
|
|
12861
12902
|
}
|
|
12862
12903
|
|
|
12863
|
-
// node_modules
|
|
12904
|
+
// node_modules/zod/v4/core/registries.js
|
|
12864
12905
|
var _a2;
|
|
12865
12906
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
12866
12907
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
@@ -12910,7 +12951,7 @@ function registry() {
|
|
|
12910
12951
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
12911
12952
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
12912
12953
|
|
|
12913
|
-
// node_modules
|
|
12954
|
+
// node_modules/zod/v4/core/compile.js
|
|
12914
12955
|
var INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
|
|
12915
12956
|
var FALLBACK_FLAG = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
|
|
12916
12957
|
var ZodCompileAsyncError = class extends Error {
|
|
@@ -13950,9 +13991,15 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
13950
13991
|
doc.write(`}`);
|
|
13951
13992
|
return outputVar;
|
|
13952
13993
|
}
|
|
13994
|
+
function generateSizeGate(doc, schema, size) {
|
|
13995
|
+
for (const [max, check2] of sizeCaps(schema._zod.def.checks)) {
|
|
13996
|
+
doc.write(`if (${size} > ${numericOperand(max, check2._zod.def.check)}) return INVALID;`);
|
|
13997
|
+
}
|
|
13998
|
+
}
|
|
13953
13999
|
function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
13954
14000
|
const def2 = schema._zod.def;
|
|
13955
14001
|
doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
|
|
14002
|
+
generateSizeGate(doc, schema, `${accessor}.length`);
|
|
13956
14003
|
const outputVar = buildsValue ? newVar(ctx) : null;
|
|
13957
14004
|
const iVar = newVar(ctx);
|
|
13958
14005
|
const elemVar = newVar(ctx);
|
|
@@ -14352,6 +14399,7 @@ function literalPropertyKey(ctx, key) {
|
|
|
14352
14399
|
function generateMapCheck(doc, ctx, schema, accessor) {
|
|
14353
14400
|
const def2 = schema._zod.def;
|
|
14354
14401
|
doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
|
|
14402
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
14355
14403
|
const outputVar = newVar(ctx);
|
|
14356
14404
|
const kVar = newVar(ctx);
|
|
14357
14405
|
const valVar = newVar(ctx);
|
|
@@ -14368,6 +14416,7 @@ function generateMapCheck(doc, ctx, schema, accessor) {
|
|
|
14368
14416
|
function generateSetCheck(doc, ctx, schema, accessor) {
|
|
14369
14417
|
const def2 = schema._zod.def;
|
|
14370
14418
|
doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
|
|
14419
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
14371
14420
|
const outputVar = newVar(ctx);
|
|
14372
14421
|
const valVar = newVar(ctx);
|
|
14373
14422
|
doc.write(`const ${outputVar} = new Set();`);
|
|
@@ -14512,7 +14561,7 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
|
|
|
14512
14561
|
return accessor;
|
|
14513
14562
|
}
|
|
14514
14563
|
|
|
14515
|
-
// node_modules
|
|
14564
|
+
// node_modules/zod/v4/core/api.js
|
|
14516
14565
|
function snapshotChecks(def2) {
|
|
14517
14566
|
if (def2.checks)
|
|
14518
14567
|
def2.checks = [...def2.checks];
|
|
@@ -15571,7 +15620,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
15571
15620
|
return inst;
|
|
15572
15621
|
}
|
|
15573
15622
|
|
|
15574
|
-
// node_modules
|
|
15623
|
+
// node_modules/zod/v4/core/to-json-schema.js
|
|
15575
15624
|
function assignProps(target, ...sources) {
|
|
15576
15625
|
for (const source of sources) {
|
|
15577
15626
|
for (const key of Reflect.ownKeys(source)) {
|
|
@@ -16101,7 +16150,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
16101
16150
|
return finalize(ctx, schema);
|
|
16102
16151
|
};
|
|
16103
16152
|
|
|
16104
|
-
// node_modules
|
|
16153
|
+
// node_modules/zod/v4/core/json-schema-processors.js
|
|
16105
16154
|
var narrowMin = (agg, key, value) => {
|
|
16106
16155
|
if (agg[key] === void 0 || value > agg[key])
|
|
16107
16156
|
agg[key] = value;
|
|
@@ -16589,7 +16638,7 @@ function stringifyKeyNames(bySchema, json2, visited) {
|
|
|
16589
16638
|
json2 = { ...json2, [keyword]: mapped };
|
|
16590
16639
|
}
|
|
16591
16640
|
const types = Array.isArray(json2.type) ? json2.type : [json2.type];
|
|
16592
|
-
const numericType = !types.includes("string") && types.some((
|
|
16641
|
+
const numericType = !types.includes("string") && types.some((t3) => t3 === "number" || t3 === "integer");
|
|
16593
16642
|
const values = json2.enum ?? (json2.const !== void 0 ? [json2.const] : void 0);
|
|
16594
16643
|
if (!numericType && !values?.some((v) => typeof v === "number"))
|
|
16595
16644
|
return json2;
|
|
@@ -16849,7 +16898,7 @@ function toJSONSchema(input2, params) {
|
|
|
16849
16898
|
return finalize(ctx, input2);
|
|
16850
16899
|
}
|
|
16851
16900
|
|
|
16852
|
-
// node_modules
|
|
16901
|
+
// node_modules/zod/v4/core/json-schema-generator.js
|
|
16853
16902
|
var JSONSchemaGenerator = class {
|
|
16854
16903
|
/** @deprecated Access via ctx instead */
|
|
16855
16904
|
get metadataRegistry() {
|
|
@@ -16927,10 +16976,10 @@ var JSONSchemaGenerator = class {
|
|
|
16927
16976
|
}
|
|
16928
16977
|
};
|
|
16929
16978
|
|
|
16930
|
-
// node_modules
|
|
16979
|
+
// node_modules/zod/v4/core/json-schema.js
|
|
16931
16980
|
var json_schema_exports = {};
|
|
16932
16981
|
|
|
16933
|
-
// node_modules
|
|
16982
|
+
// node_modules/zod/v4/classic/schemas.js
|
|
16934
16983
|
var schemas_exports2 = {};
|
|
16935
16984
|
__export(schemas_exports2, {
|
|
16936
16985
|
ZodAny: () => ZodAny,
|
|
@@ -17111,7 +17160,7 @@ __export(schemas_exports2, {
|
|
|
17111
17160
|
xor: () => xor
|
|
17112
17161
|
});
|
|
17113
17162
|
|
|
17114
|
-
// node_modules
|
|
17163
|
+
// node_modules/zod/v4/classic/checks.js
|
|
17115
17164
|
var checks_exports2 = {};
|
|
17116
17165
|
__export(checks_exports2, {
|
|
17117
17166
|
endsWith: () => _endsWith,
|
|
@@ -17146,7 +17195,7 @@ __export(checks_exports2, {
|
|
|
17146
17195
|
uppercase: () => _uppercase
|
|
17147
17196
|
});
|
|
17148
17197
|
|
|
17149
|
-
// node_modules
|
|
17198
|
+
// node_modules/zod/v4/classic/errors.js
|
|
17150
17199
|
var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
17151
17200
|
function _lazyMethod(proto, key, make) {
|
|
17152
17201
|
Object.defineProperty(proto, key, {
|
|
@@ -17192,7 +17241,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, void 0
|
|
|
17192
17241
|
Parent: Error
|
|
17193
17242
|
});
|
|
17194
17243
|
|
|
17195
|
-
// node_modules
|
|
17244
|
+
// node_modules/zod/v4/classic/parse.js
|
|
17196
17245
|
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
|
|
17197
17246
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
17198
17247
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -17206,7 +17255,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
17206
17255
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
17207
17256
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
17208
17257
|
|
|
17209
|
-
// node_modules
|
|
17258
|
+
// node_modules/zod/v4/classic/schemas.js
|
|
17210
17259
|
function _ensureDefaultLocale() {
|
|
17211
17260
|
if (!globalConfig.localeError)
|
|
17212
17261
|
config(en_default());
|
|
@@ -18671,7 +18720,7 @@ function preprocess(fn, schema) {
|
|
|
18671
18720
|
});
|
|
18672
18721
|
}
|
|
18673
18722
|
|
|
18674
|
-
// node_modules
|
|
18723
|
+
// node_modules/zod/v4/classic/compat.js
|
|
18675
18724
|
var ZodIssueCode = {
|
|
18676
18725
|
invalid_type: "invalid_type",
|
|
18677
18726
|
too_big: "too_big",
|
|
@@ -18697,7 +18746,7 @@ var ZodFirstPartyTypeKind;
|
|
|
18697
18746
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
18698
18747
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
18699
18748
|
|
|
18700
|
-
// node_modules
|
|
18749
|
+
// node_modules/zod/v4/classic/iso.js
|
|
18701
18750
|
var iso_exports = {};
|
|
18702
18751
|
__export(iso_exports, {
|
|
18703
18752
|
ZodISODate: () => ZodISODate,
|
|
@@ -18722,7 +18771,7 @@ function duration2(params) {
|
|
|
18722
18771
|
return _isoDuration(ZodISODuration, params);
|
|
18723
18772
|
}
|
|
18724
18773
|
|
|
18725
|
-
// node_modules
|
|
18774
|
+
// node_modules/zod/v4/classic/from-json-schema.js
|
|
18726
18775
|
var z = {
|
|
18727
18776
|
...schemas_exports2,
|
|
18728
18777
|
...checks_exports2,
|
|
@@ -19092,8 +19141,8 @@ function convertBaseSchema(schema, ctx) {
|
|
|
19092
19141
|
}
|
|
19093
19142
|
const type = schema.type;
|
|
19094
19143
|
if (Array.isArray(type)) {
|
|
19095
|
-
const typeSchemas = type.map((
|
|
19096
|
-
const typeSchema = { ...schema, type:
|
|
19144
|
+
const typeSchemas = type.map((t3) => {
|
|
19145
|
+
const typeSchema = { ...schema, type: t3 };
|
|
19097
19146
|
return convertBaseSchema(typeSchema, ctx);
|
|
19098
19147
|
});
|
|
19099
19148
|
if (typeSchemas.length === 0) {
|
|
@@ -19455,7 +19504,7 @@ function fromJSONSchema(schema, params) {
|
|
|
19455
19504
|
return convertSchema(normalized, ctx);
|
|
19456
19505
|
}
|
|
19457
19506
|
|
|
19458
|
-
// node_modules
|
|
19507
|
+
// node_modules/zod/v4/core/visit.js
|
|
19459
19508
|
var RESOLVING = /* @__PURE__ */ Symbol("z.visit/resolving");
|
|
19460
19509
|
function visit(schema, fnOrHandlers) {
|
|
19461
19510
|
const fn = typeof fnOrHandlers === "function" ? fnOrHandlers : (node2, rewritten) => {
|
|
@@ -19610,7 +19659,7 @@ function visit(schema, fnOrHandlers) {
|
|
|
19610
19659
|
return run(schema);
|
|
19611
19660
|
}
|
|
19612
19661
|
|
|
19613
|
-
// node_modules
|
|
19662
|
+
// node_modules/zod/v4/classic/deep-partial.js
|
|
19614
19663
|
function deepPartial(schema) {
|
|
19615
19664
|
return visit(schema, {
|
|
19616
19665
|
object: (s) => s.partial(),
|
|
@@ -19622,7 +19671,7 @@ function deepPartial(schema) {
|
|
|
19622
19671
|
});
|
|
19623
19672
|
}
|
|
19624
19673
|
|
|
19625
|
-
// node_modules
|
|
19674
|
+
// node_modules/zod/v4/classic/in-out.js
|
|
19626
19675
|
function withChecks(side, checks) {
|
|
19627
19676
|
if (!checks?.length)
|
|
19628
19677
|
return side;
|
|
@@ -19652,7 +19701,7 @@ function output(schema) {
|
|
|
19652
19701
|
});
|
|
19653
19702
|
}
|
|
19654
19703
|
|
|
19655
|
-
// node_modules
|
|
19704
|
+
// node_modules/zod/v4/classic/coerce.js
|
|
19656
19705
|
var coerce_exports = {};
|
|
19657
19706
|
__export(coerce_exports, {
|
|
19658
19707
|
bigint: () => bigint3,
|
|
@@ -19677,7 +19726,7 @@ function date4(params) {
|
|
|
19677
19726
|
return _coercedDate(ZodDate, params);
|
|
19678
19727
|
}
|
|
19679
19728
|
|
|
19680
|
-
// node_modules
|
|
19729
|
+
// node_modules/@paperclipai/shared/dist/constants.js
|
|
19681
19730
|
var COMPANY_STATUSES = ["active", "paused", "archived"];
|
|
19682
19731
|
var DEPLOYMENT_MODES = ["local_trusted", "authenticated"];
|
|
19683
19732
|
var DEPLOYMENT_EXPOSURES = ["private", "public"];
|
|
@@ -20526,11 +20575,11 @@ var PLUGIN_STATE_SCOPE_KINDS = [
|
|
|
20526
20575
|
"run"
|
|
20527
20576
|
];
|
|
20528
20577
|
|
|
20529
|
-
// node_modules
|
|
20578
|
+
// node_modules/@paperclipai/shared/dist/adapter-type.js
|
|
20530
20579
|
var agentAdapterTypeSchema = external_exports.string().trim().min(1).default("process").describe(`Known built-in adapters: ${AGENT_ADAPTER_TYPES.join(", ")}. External adapters may register additional non-empty string types at runtime.`);
|
|
20531
20580
|
var optionalAgentAdapterTypeSchema = external_exports.string().trim().min(1).optional();
|
|
20532
20581
|
|
|
20533
|
-
// node_modules
|
|
20582
|
+
// node_modules/@paperclipai/shared/dist/runner-goal.js
|
|
20534
20583
|
var RUNNER_GOAL_MAX_OBJECTIVE_CHARS = 4e3;
|
|
20535
20584
|
var runnerGoalAvailabilitySchema = external_exports.enum([
|
|
20536
20585
|
"available",
|
|
@@ -20598,7 +20647,7 @@ var runnerGoalActionRequestSchema = external_exports.object({
|
|
|
20598
20647
|
}
|
|
20599
20648
|
});
|
|
20600
20649
|
|
|
20601
|
-
// node_modules
|
|
20650
|
+
// node_modules/@paperclipai/shared/dist/connection-intent-guidance.js
|
|
20602
20651
|
var CONNECTION_INTENT_AGENT_GUIDANCE = [
|
|
20603
20652
|
"Connection tools:",
|
|
20604
20653
|
"- When the user asks to connect a service, call `connections_search` before any service tool, even if already installed. Also search when a task needs a service and usable access is uncertain. Search by its name or capability and follow the returned `instruction`.",
|
|
@@ -20607,10 +20656,10 @@ var CONNECTION_INTENT_AGENT_GUIDANCE = [
|
|
|
20607
20656
|
"- Do not use connection tools for arbitrary MCP URLs or unrelated work."
|
|
20608
20657
|
].join("\n");
|
|
20609
20658
|
|
|
20610
|
-
// node_modules
|
|
20659
|
+
// node_modules/@paperclipai/shared/dist/types/native-finalization.js
|
|
20611
20660
|
var NATIVE_FINALIZATION_SCHEMA = "paperclip.native-finalization.v1";
|
|
20612
20661
|
|
|
20613
|
-
// node_modules
|
|
20662
|
+
// node_modules/@paperclipai/shared/dist/validators/native-finalization.js
|
|
20614
20663
|
var nativeFinalizationResultV1Schema = external_exports.object({
|
|
20615
20664
|
schema: external_exports.literal(NATIVE_FINALIZATION_SCHEMA),
|
|
20616
20665
|
runtimeMode: external_exports.literal("native"),
|
|
@@ -20641,7 +20690,7 @@ var nativeReportedWorkDispositionSchema = external_exports.enum([
|
|
|
20641
20690
|
"yielded"
|
|
20642
20691
|
]);
|
|
20643
20692
|
|
|
20644
|
-
// node_modules
|
|
20693
|
+
// node_modules/@paperclipai/shared/dist/validators/decision.js
|
|
20645
20694
|
var decisionEffectStalenessSchema = external_exports.enum(["strict", "lenient"]);
|
|
20646
20695
|
var decisionOptionStyleSchema = external_exports.enum(["default", "primary", "destructive"]);
|
|
20647
20696
|
var decisionEffectBaseShape = {
|
|
@@ -20770,7 +20819,7 @@ var decisionSpecSchema = external_exports.object({
|
|
|
20770
20819
|
inputs: decisionInputsSchema.nullable().optional()
|
|
20771
20820
|
});
|
|
20772
20821
|
|
|
20773
|
-
// node_modules
|
|
20822
|
+
// node_modules/@paperclipai/shared/dist/validators/connection-intent.js
|
|
20774
20823
|
var connectionsSearchInputSchema = external_exports.object({
|
|
20775
20824
|
query: external_exports.string().trim().max(4e3).default(""),
|
|
20776
20825
|
retryProviderChoice: external_exports.boolean().optional().describe("Only when the user explicitly asks to reconsider a previous provider choice or decline")
|
|
@@ -20787,7 +20836,7 @@ var declineConnectionIntentSchema = external_exports.object({
|
|
|
20787
20836
|
reason: external_exports.string().trim().max(4e3).optional()
|
|
20788
20837
|
}).strict();
|
|
20789
20838
|
|
|
20790
|
-
// node_modules
|
|
20839
|
+
// node_modules/@paperclipai/shared/dist/validators/workspace-file-resource.js
|
|
20791
20840
|
var workspaceFileListSearchMaxBytes = 128;
|
|
20792
20841
|
function utf8ByteLength(value) {
|
|
20793
20842
|
return new TextEncoder().encode(value).length;
|
|
@@ -20892,7 +20941,7 @@ var workspaceFileContentSchema = external_exports.object({
|
|
|
20892
20941
|
})
|
|
20893
20942
|
});
|
|
20894
20943
|
|
|
20895
|
-
// node_modules
|
|
20944
|
+
// node_modules/@paperclipai/shared/dist/validators/partial.js
|
|
20896
20945
|
function fieldWithoutDefault(field2) {
|
|
20897
20946
|
if (field2 instanceof external_exports.ZodDefault) {
|
|
20898
20947
|
return fieldWithoutDefault(field2.unwrap());
|
|
@@ -20915,7 +20964,7 @@ function objectWithoutDefaults(schema) {
|
|
|
20915
20964
|
return external_exports.object(shapeWithoutDefaults(schema.shape));
|
|
20916
20965
|
}
|
|
20917
20966
|
|
|
20918
|
-
// node_modules
|
|
20967
|
+
// node_modules/@paperclipai/shared/dist/validators/work-product.js
|
|
20919
20968
|
function attachmentContentPath(attachmentId) {
|
|
20920
20969
|
return `/api/attachments/${attachmentId}/content`;
|
|
20921
20970
|
}
|
|
@@ -20999,7 +21048,7 @@ var createIssueWorkProductSchema = external_exports.object({
|
|
|
20999
21048
|
});
|
|
21000
21049
|
var updateIssueWorkProductSchema = objectWithoutDefaults(createIssueWorkProductSchema).partial();
|
|
21001
21050
|
|
|
21002
|
-
// node_modules
|
|
21051
|
+
// node_modules/@paperclipai/shared/dist/markdown-work-products.js
|
|
21003
21052
|
var MARKDOWN_ATTACHMENT_CONTENT_TYPES = [
|
|
21004
21053
|
"text/markdown",
|
|
21005
21054
|
"text/x-markdown",
|
|
@@ -21009,7 +21058,7 @@ var MARKDOWN_ATTACHMENT_CONTENT_TYPES = [
|
|
|
21009
21058
|
var MARKDOWN_ATTACHMENT_CONTENT_TYPE_SET = new Set(MARKDOWN_ATTACHMENT_CONTENT_TYPES);
|
|
21010
21059
|
var MARKDOWN_REVIEW_DOCUMENT_MAX_BYTES = 512 * 1024;
|
|
21011
21060
|
|
|
21012
|
-
// node_modules
|
|
21061
|
+
// node_modules/@paperclipai/shared/dist/types/attention.js
|
|
21013
21062
|
var ATTENTION_SOURCE_KINDS = [
|
|
21014
21063
|
"approval",
|
|
21015
21064
|
"decision",
|
|
@@ -21025,7 +21074,7 @@ var ATTENTION_SOURCE_KINDS = [
|
|
|
21025
21074
|
"agent_error_alert"
|
|
21026
21075
|
];
|
|
21027
21076
|
|
|
21028
|
-
// node_modules
|
|
21077
|
+
// node_modules/@paperclipai/shared/dist/validators/decision-queue.js
|
|
21029
21078
|
var decisionAttentionSourceKindSchema = external_exports.enum(ATTENTION_SOURCE_KINDS);
|
|
21030
21079
|
var decisionQueueKeySchema = external_exports.string().trim().min(1).max(80).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "Queue key must be URL-safe lowercase kebab-case");
|
|
21031
21080
|
var createDecisionQueueSchema = external_exports.object({
|
|
@@ -21080,7 +21129,7 @@ var createDecisionArchiveProposalSchema = external_exports.object({
|
|
|
21080
21129
|
});
|
|
21081
21130
|
});
|
|
21082
21131
|
|
|
21083
|
-
// node_modules
|
|
21132
|
+
// node_modules/@paperclipai/shared/dist/frontmatter.js
|
|
21084
21133
|
var SKILL_FRONTMATTER_SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
21085
21134
|
var skillMetadataValueSchema = external_exports.lazy(() => external_exports.union([
|
|
21086
21135
|
external_exports.string(),
|
|
@@ -21097,13 +21146,13 @@ var skillFrontmatterSchema = external_exports.object({
|
|
|
21097
21146
|
metadata: external_exports.record(external_exports.string(), skillMetadataValueSchema).optional()
|
|
21098
21147
|
}).passthrough();
|
|
21099
21148
|
|
|
21100
|
-
// node_modules
|
|
21149
|
+
// node_modules/@paperclipai/shared/dist/trust-policy.js
|
|
21101
21150
|
var TRUST_PRESETS = ["standard", "low_trust_review"];
|
|
21102
21151
|
var LOW_TRUST_REVIEW_PRESET = "low_trust_review";
|
|
21103
21152
|
var LOW_TRUST_REVIEW_PRESET_VERSION = 1;
|
|
21104
21153
|
var LOW_TRUST_REVIEW_RAW_OUTPUT_DISPOSITION = "quarantine";
|
|
21105
21154
|
|
|
21106
|
-
// node_modules
|
|
21155
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/agentmail.json
|
|
21107
21156
|
var agentmail_default = {
|
|
21108
21157
|
schemaVersion: 1,
|
|
21109
21158
|
slug: "agentmail",
|
|
@@ -21154,7 +21203,7 @@ var agentmail_default = {
|
|
|
21154
21203
|
]
|
|
21155
21204
|
};
|
|
21156
21205
|
|
|
21157
|
-
// node_modules
|
|
21206
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/zapier.json
|
|
21158
21207
|
var zapier_default = {
|
|
21159
21208
|
schemaVersion: 1,
|
|
21160
21209
|
slug: "zapier",
|
|
@@ -21188,7 +21237,7 @@ var zapier_default = {
|
|
|
21188
21237
|
docsUrl: "https://docs.zapier.com/mcp/quickstart"
|
|
21189
21238
|
};
|
|
21190
21239
|
|
|
21191
|
-
// node_modules
|
|
21240
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/arcade.json
|
|
21192
21241
|
var arcade_default = {
|
|
21193
21242
|
schemaVersion: 1,
|
|
21194
21243
|
slug: "arcade",
|
|
@@ -21226,7 +21275,7 @@ var arcade_default = {
|
|
|
21226
21275
|
docsUrl: "https://docs.arcade.dev/en/operate/governance/mcp-gateways"
|
|
21227
21276
|
};
|
|
21228
21277
|
|
|
21229
|
-
// node_modules
|
|
21278
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/executor.json
|
|
21230
21279
|
var executor_default = {
|
|
21231
21280
|
schemaVersion: 1,
|
|
21232
21281
|
slug: "executor",
|
|
@@ -21264,7 +21313,7 @@ var executor_default = {
|
|
|
21264
21313
|
docsUrl: "https://executor.sh/docs/mcp-proxy"
|
|
21265
21314
|
};
|
|
21266
21315
|
|
|
21267
|
-
// node_modules
|
|
21316
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/railway.json
|
|
21268
21317
|
var railway_default = {
|
|
21269
21318
|
schemaVersion: 1,
|
|
21270
21319
|
slug: "railway",
|
|
@@ -21327,7 +21376,7 @@ var railway_default = {
|
|
|
21327
21376
|
redirectConstraints: "https-or-loopback-http"
|
|
21328
21377
|
};
|
|
21329
21378
|
|
|
21330
|
-
// node_modules
|
|
21379
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/github.json
|
|
21331
21380
|
var github_default = {
|
|
21332
21381
|
schemaVersion: 1,
|
|
21333
21382
|
slug: "github",
|
|
@@ -21414,7 +21463,7 @@ var github_default = {
|
|
|
21414
21463
|
]
|
|
21415
21464
|
};
|
|
21416
21465
|
|
|
21417
|
-
// node_modules
|
|
21466
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/github-code-review-bot.json
|
|
21418
21467
|
var github_code_review_bot_default = {
|
|
21419
21468
|
schemaVersion: 1,
|
|
21420
21469
|
slug: "github-code-review-bot",
|
|
@@ -21473,7 +21522,7 @@ var github_code_review_bot_default = {
|
|
|
21473
21522
|
]
|
|
21474
21523
|
};
|
|
21475
21524
|
|
|
21476
|
-
// node_modules
|
|
21525
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/slack.json
|
|
21477
21526
|
var slack_default = {
|
|
21478
21527
|
schemaVersion: 1,
|
|
21479
21528
|
slug: "slack",
|
|
@@ -21588,7 +21637,7 @@ var slack_default = {
|
|
|
21588
21637
|
]
|
|
21589
21638
|
};
|
|
21590
21639
|
|
|
21591
|
-
// node_modules
|
|
21640
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/microsoft-teams.json
|
|
21592
21641
|
var microsoft_teams_default = {
|
|
21593
21642
|
schemaVersion: 1,
|
|
21594
21643
|
slug: "microsoft-teams",
|
|
@@ -21657,7 +21706,7 @@ var microsoft_teams_default = {
|
|
|
21657
21706
|
]
|
|
21658
21707
|
};
|
|
21659
21708
|
|
|
21660
|
-
// node_modules
|
|
21709
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/imessage-photon.json
|
|
21661
21710
|
var imessage_photon_default = {
|
|
21662
21711
|
schemaVersion: 1,
|
|
21663
21712
|
slug: "imessage-photon",
|
|
@@ -21709,7 +21758,7 @@ var imessage_photon_default = {
|
|
|
21709
21758
|
]
|
|
21710
21759
|
};
|
|
21711
21760
|
|
|
21712
|
-
// node_modules
|
|
21761
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/telegram.json
|
|
21713
21762
|
var telegram_default = {
|
|
21714
21763
|
schemaVersion: 1,
|
|
21715
21764
|
slug: "telegram",
|
|
@@ -21764,7 +21813,7 @@ var telegram_default = {
|
|
|
21764
21813
|
]
|
|
21765
21814
|
};
|
|
21766
21815
|
|
|
21767
|
-
// node_modules
|
|
21816
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/discord.json
|
|
21768
21817
|
var discord_default = {
|
|
21769
21818
|
schemaVersion: 1,
|
|
21770
21819
|
slug: "discord",
|
|
@@ -21832,7 +21881,7 @@ var discord_default = {
|
|
|
21832
21881
|
]
|
|
21833
21882
|
};
|
|
21834
21883
|
|
|
21835
|
-
// node_modules
|
|
21884
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/notion.json
|
|
21836
21885
|
var notion_default = {
|
|
21837
21886
|
schemaVersion: 1,
|
|
21838
21887
|
slug: "notion",
|
|
@@ -21894,7 +21943,7 @@ var notion_default = {
|
|
|
21894
21943
|
docsUrl: "https://developers.notion.com/guides/mcp/build-mcp-client"
|
|
21895
21944
|
};
|
|
21896
21945
|
|
|
21897
|
-
// node_modules
|
|
21946
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/posthog.json
|
|
21898
21947
|
var posthog_default = {
|
|
21899
21948
|
schemaVersion: 1,
|
|
21900
21949
|
slug: "posthog",
|
|
@@ -22175,7 +22224,7 @@ var posthog_default = {
|
|
|
22175
22224
|
redirectConstraints: "https-or-loopback-http"
|
|
22176
22225
|
};
|
|
22177
22226
|
|
|
22178
|
-
// node_modules
|
|
22227
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/linear.json
|
|
22179
22228
|
var linear_default = {
|
|
22180
22229
|
schemaVersion: 1,
|
|
22181
22230
|
slug: "linear",
|
|
@@ -22240,7 +22289,7 @@ var linear_default = {
|
|
|
22240
22289
|
]
|
|
22241
22290
|
};
|
|
22242
22291
|
|
|
22243
|
-
// node_modules
|
|
22292
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/context7.json
|
|
22244
22293
|
var context7_default = {
|
|
22245
22294
|
schemaVersion: 1,
|
|
22246
22295
|
slug: "context7",
|
|
@@ -22275,7 +22324,7 @@ var context7_default = {
|
|
|
22275
22324
|
]
|
|
22276
22325
|
};
|
|
22277
22326
|
|
|
22278
|
-
// node_modules
|
|
22327
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/shopify.json
|
|
22279
22328
|
var shopify_default = {
|
|
22280
22329
|
schemaVersion: 1,
|
|
22281
22330
|
slug: "shopify",
|
|
@@ -22394,7 +22443,7 @@ var shopify_default = {
|
|
|
22394
22443
|
}
|
|
22395
22444
|
};
|
|
22396
22445
|
|
|
22397
|
-
// node_modules
|
|
22446
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/composio.json
|
|
22398
22447
|
var composio_default = {
|
|
22399
22448
|
schemaVersion: 1,
|
|
22400
22449
|
slug: "composio",
|
|
@@ -22435,7 +22484,7 @@ var composio_default = {
|
|
|
22435
22484
|
docsUrl: "https://docs.composio.dev/docs/composio-connect"
|
|
22436
22485
|
};
|
|
22437
22486
|
|
|
22438
|
-
// node_modules
|
|
22487
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/oauth-generic.json
|
|
22439
22488
|
var oauth_generic_default = {
|
|
22440
22489
|
schemaVersion: 1,
|
|
22441
22490
|
slug: "oauth-generic",
|
|
@@ -22484,7 +22533,7 @@ var oauth_generic_default = {
|
|
|
22484
22533
|
]
|
|
22485
22534
|
};
|
|
22486
22535
|
|
|
22487
|
-
// node_modules
|
|
22536
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/api-key-generic.json
|
|
22488
22537
|
var api_key_generic_default = {
|
|
22489
22538
|
schemaVersion: 1,
|
|
22490
22539
|
slug: "api-key-generic",
|
|
@@ -22530,7 +22579,7 @@ var api_key_generic_default = {
|
|
|
22530
22579
|
]
|
|
22531
22580
|
};
|
|
22532
22581
|
|
|
22533
|
-
// node_modules
|
|
22582
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/sentry.json
|
|
22534
22583
|
var sentry_default = {
|
|
22535
22584
|
schemaVersion: 1,
|
|
22536
22585
|
slug: "sentry",
|
|
@@ -22581,7 +22630,7 @@ var sentry_default = {
|
|
|
22581
22630
|
redirectConstraints: "https-or-loopback-http"
|
|
22582
22631
|
};
|
|
22583
22632
|
|
|
22584
|
-
// node_modules
|
|
22633
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/vercel.json
|
|
22585
22634
|
var vercel_default = {
|
|
22586
22635
|
schemaVersion: 1,
|
|
22587
22636
|
slug: "vercel",
|
|
@@ -22629,7 +22678,7 @@ var vercel_default = {
|
|
|
22629
22678
|
}
|
|
22630
22679
|
};
|
|
22631
22680
|
|
|
22632
|
-
// node_modules
|
|
22681
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/anthropic.json
|
|
22633
22682
|
var anthropic_default = {
|
|
22634
22683
|
schemaVersion: 1,
|
|
22635
22684
|
slug: "anthropic",
|
|
@@ -22706,7 +22755,7 @@ var anthropic_default = {
|
|
|
22706
22755
|
]
|
|
22707
22756
|
};
|
|
22708
22757
|
|
|
22709
|
-
// node_modules
|
|
22758
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/browser-use-cloud.json
|
|
22710
22759
|
var browser_use_cloud_default = {
|
|
22711
22760
|
schemaVersion: 1,
|
|
22712
22761
|
slug: "browser-use-cloud",
|
|
@@ -22761,7 +22810,7 @@ var browser_use_cloud_default = {
|
|
|
22761
22810
|
docsUrl: "https://docs.browser-use.com/cloud/api-v4-overview"
|
|
22762
22811
|
};
|
|
22763
22812
|
|
|
22764
|
-
// node_modules
|
|
22813
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/cognee.json
|
|
22765
22814
|
var cognee_default = {
|
|
22766
22815
|
schemaVersion: 1,
|
|
22767
22816
|
slug: "cognee",
|
|
@@ -22834,7 +22883,7 @@ var cognee_default = {
|
|
|
22834
22883
|
]
|
|
22835
22884
|
};
|
|
22836
22885
|
|
|
22837
|
-
// node_modules
|
|
22886
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/jira.json
|
|
22838
22887
|
var jira_default = {
|
|
22839
22888
|
schemaVersion: 1,
|
|
22840
22889
|
slug: "jira",
|
|
@@ -22901,7 +22950,7 @@ var jira_default = {
|
|
|
22901
22950
|
]
|
|
22902
22951
|
};
|
|
22903
22952
|
|
|
22904
|
-
// node_modules
|
|
22953
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/airtable.json
|
|
22905
22954
|
var airtable_default = {
|
|
22906
22955
|
schemaVersion: 1,
|
|
22907
22956
|
slug: "airtable",
|
|
@@ -22953,7 +23002,7 @@ var airtable_default = {
|
|
|
22953
23002
|
]
|
|
22954
23003
|
};
|
|
22955
23004
|
|
|
22956
|
-
// node_modules
|
|
23005
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/beehiiv.json
|
|
22957
23006
|
var beehiiv_default = {
|
|
22958
23007
|
schemaVersion: 1,
|
|
22959
23008
|
slug: "beehiiv",
|
|
@@ -23000,7 +23049,7 @@ var beehiiv_default = {
|
|
|
23000
23049
|
]
|
|
23001
23050
|
};
|
|
23002
23051
|
|
|
23003
|
-
// node_modules
|
|
23052
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/bitly.json
|
|
23004
23053
|
var bitly_default = {
|
|
23005
23054
|
schemaVersion: 1,
|
|
23006
23055
|
slug: "bitly",
|
|
@@ -23081,7 +23130,7 @@ var bitly_default = {
|
|
|
23081
23130
|
]
|
|
23082
23131
|
};
|
|
23083
23132
|
|
|
23084
|
-
// node_modules
|
|
23133
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/candid.json
|
|
23085
23134
|
var candid_default = {
|
|
23086
23135
|
schemaVersion: 1,
|
|
23087
23136
|
slug: "candid",
|
|
@@ -23129,7 +23178,7 @@ var candid_default = {
|
|
|
23129
23178
|
]
|
|
23130
23179
|
};
|
|
23131
23180
|
|
|
23132
|
-
// node_modules
|
|
23181
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/cloudflare.json
|
|
23133
23182
|
var cloudflare_default = {
|
|
23134
23183
|
schemaVersion: 1,
|
|
23135
23184
|
slug: "cloudflare",
|
|
@@ -23214,7 +23263,7 @@ var cloudflare_default = {
|
|
|
23214
23263
|
]
|
|
23215
23264
|
};
|
|
23216
23265
|
|
|
23217
|
-
// node_modules
|
|
23266
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/cloudinary.json
|
|
23218
23267
|
var cloudinary_default = {
|
|
23219
23268
|
schemaVersion: 1,
|
|
23220
23269
|
slug: "cloudinary",
|
|
@@ -23267,7 +23316,7 @@ var cloudinary_default = {
|
|
|
23267
23316
|
]
|
|
23268
23317
|
};
|
|
23269
23318
|
|
|
23270
|
-
// node_modules
|
|
23319
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/coda.json
|
|
23271
23320
|
var coda_default = {
|
|
23272
23321
|
schemaVersion: 1,
|
|
23273
23322
|
slug: "coda",
|
|
@@ -23353,7 +23402,7 @@ var coda_default = {
|
|
|
23353
23402
|
]
|
|
23354
23403
|
};
|
|
23355
23404
|
|
|
23356
|
-
// node_modules
|
|
23405
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/hugging-face.json
|
|
23357
23406
|
var hugging_face_default = {
|
|
23358
23407
|
schemaVersion: 1,
|
|
23359
23408
|
slug: "hugging-face",
|
|
@@ -23402,7 +23451,7 @@ var hugging_face_default = {
|
|
|
23402
23451
|
]
|
|
23403
23452
|
};
|
|
23404
23453
|
|
|
23405
|
-
// node_modules
|
|
23454
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/kernel.json
|
|
23406
23455
|
var kernel_default = {
|
|
23407
23456
|
schemaVersion: 1,
|
|
23408
23457
|
slug: "kernel",
|
|
@@ -23486,7 +23535,7 @@ var kernel_default = {
|
|
|
23486
23535
|
]
|
|
23487
23536
|
};
|
|
23488
23537
|
|
|
23489
|
-
// node_modules
|
|
23538
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/local-falcon.json
|
|
23490
23539
|
var local_falcon_default = {
|
|
23491
23540
|
schemaVersion: 1,
|
|
23492
23541
|
slug: "local-falcon",
|
|
@@ -23533,7 +23582,7 @@ var local_falcon_default = {
|
|
|
23533
23582
|
]
|
|
23534
23583
|
};
|
|
23535
23584
|
|
|
23536
|
-
// node_modules
|
|
23585
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/make.json
|
|
23537
23586
|
var make_default = {
|
|
23538
23587
|
schemaVersion: 1,
|
|
23539
23588
|
slug: "make",
|
|
@@ -23577,7 +23626,7 @@ var make_default = {
|
|
|
23577
23626
|
]
|
|
23578
23627
|
};
|
|
23579
23628
|
|
|
23580
|
-
// node_modules
|
|
23629
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/manufact.json
|
|
23581
23630
|
var manufact_default = {
|
|
23582
23631
|
schemaVersion: 1,
|
|
23583
23632
|
slug: "manufact",
|
|
@@ -23627,7 +23676,7 @@ var manufact_default = {
|
|
|
23627
23676
|
]
|
|
23628
23677
|
};
|
|
23629
23678
|
|
|
23630
|
-
// node_modules
|
|
23679
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/miro.json
|
|
23631
23680
|
var miro_default = {
|
|
23632
23681
|
schemaVersion: 1,
|
|
23633
23682
|
slug: "miro",
|
|
@@ -23676,7 +23725,7 @@ var miro_default = {
|
|
|
23676
23725
|
]
|
|
23677
23726
|
};
|
|
23678
23727
|
|
|
23679
|
-
// node_modules
|
|
23728
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/netlify.json
|
|
23680
23729
|
var netlify_default = {
|
|
23681
23730
|
schemaVersion: 1,
|
|
23682
23731
|
slug: "netlify",
|
|
@@ -23725,7 +23774,7 @@ var netlify_default = {
|
|
|
23725
23774
|
]
|
|
23726
23775
|
};
|
|
23727
23776
|
|
|
23728
|
-
// node_modules
|
|
23777
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/oreilly.json
|
|
23729
23778
|
var oreilly_default = {
|
|
23730
23779
|
schemaVersion: 1,
|
|
23731
23780
|
slug: "oreilly",
|
|
@@ -23810,7 +23859,7 @@ var oreilly_default = {
|
|
|
23810
23859
|
]
|
|
23811
23860
|
};
|
|
23812
23861
|
|
|
23813
|
-
// node_modules
|
|
23862
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/planetscale.json
|
|
23814
23863
|
var planetscale_default = {
|
|
23815
23864
|
schemaVersion: 1,
|
|
23816
23865
|
slug: "planetscale",
|
|
@@ -23913,7 +23962,7 @@ var planetscale_default = {
|
|
|
23913
23962
|
]
|
|
23914
23963
|
};
|
|
23915
23964
|
|
|
23916
|
-
// node_modules
|
|
23965
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/resend.json
|
|
23917
23966
|
var resend_default = {
|
|
23918
23967
|
schemaVersion: 1,
|
|
23919
23968
|
slug: "resend",
|
|
@@ -23960,7 +24009,7 @@ var resend_default = {
|
|
|
23960
24009
|
]
|
|
23961
24010
|
};
|
|
23962
24011
|
|
|
23963
|
-
// node_modules
|
|
24012
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/ticktick.json
|
|
23964
24013
|
var ticktick_default = {
|
|
23965
24014
|
schemaVersion: 1,
|
|
23966
24015
|
slug: "ticktick",
|
|
@@ -24007,7 +24056,7 @@ var ticktick_default = {
|
|
|
24007
24056
|
]
|
|
24008
24057
|
};
|
|
24009
24058
|
|
|
24010
|
-
// node_modules
|
|
24059
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/todoist.json
|
|
24011
24060
|
var todoist_default = {
|
|
24012
24061
|
schemaVersion: 1,
|
|
24013
24062
|
slug: "todoist",
|
|
@@ -24053,7 +24102,7 @@ var todoist_default = {
|
|
|
24053
24102
|
]
|
|
24054
24103
|
};
|
|
24055
24104
|
|
|
24056
|
-
// node_modules
|
|
24105
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/webflow.json
|
|
24057
24106
|
var webflow_default = {
|
|
24058
24107
|
schemaVersion: 1,
|
|
24059
24108
|
slug: "webflow",
|
|
@@ -24096,7 +24145,7 @@ var webflow_default = {
|
|
|
24096
24145
|
]
|
|
24097
24146
|
};
|
|
24098
24147
|
|
|
24099
|
-
// node_modules
|
|
24148
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/wix.json
|
|
24100
24149
|
var wix_default = {
|
|
24101
24150
|
schemaVersion: 1,
|
|
24102
24151
|
slug: "wix",
|
|
@@ -24143,7 +24192,7 @@ var wix_default = {
|
|
|
24143
24192
|
]
|
|
24144
24193
|
};
|
|
24145
24194
|
|
|
24146
|
-
// node_modules
|
|
24195
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/brex.json
|
|
24147
24196
|
var brex_default = {
|
|
24148
24197
|
schemaVersion: 1,
|
|
24149
24198
|
slug: "brex",
|
|
@@ -24210,7 +24259,7 @@ var brex_default = {
|
|
|
24210
24259
|
]
|
|
24211
24260
|
};
|
|
24212
24261
|
|
|
24213
|
-
// node_modules
|
|
24262
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/clickhouse.json
|
|
24214
24263
|
var clickhouse_default = {
|
|
24215
24264
|
schemaVersion: 1,
|
|
24216
24265
|
slug: "clickhouse",
|
|
@@ -24278,7 +24327,7 @@ var clickhouse_default = {
|
|
|
24278
24327
|
]
|
|
24279
24328
|
};
|
|
24280
24329
|
|
|
24281
|
-
// node_modules
|
|
24330
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/egnyte.json
|
|
24282
24331
|
var egnyte_default = {
|
|
24283
24332
|
schemaVersion: 1,
|
|
24284
24333
|
slug: "egnyte",
|
|
@@ -24321,7 +24370,7 @@ var egnyte_default = {
|
|
|
24321
24370
|
]
|
|
24322
24371
|
};
|
|
24323
24372
|
|
|
24324
|
-
// node_modules
|
|
24373
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/embat.json
|
|
24325
24374
|
var embat_default = {
|
|
24326
24375
|
schemaVersion: 1,
|
|
24327
24376
|
slug: "embat",
|
|
@@ -24370,7 +24419,7 @@ var embat_default = {
|
|
|
24370
24419
|
]
|
|
24371
24420
|
};
|
|
24372
24421
|
|
|
24373
|
-
// node_modules
|
|
24422
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/mixpanel.json
|
|
24374
24423
|
var mixpanel_default = {
|
|
24375
24424
|
schemaVersion: 1,
|
|
24376
24425
|
slug: "mixpanel",
|
|
@@ -24441,7 +24490,7 @@ var mixpanel_default = {
|
|
|
24441
24490
|
]
|
|
24442
24491
|
};
|
|
24443
24492
|
|
|
24444
|
-
// node_modules
|
|
24493
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/postman.json
|
|
24445
24494
|
var postman_default = {
|
|
24446
24495
|
schemaVersion: 1,
|
|
24447
24496
|
slug: "postman",
|
|
@@ -24670,7 +24719,7 @@ var postman_default = {
|
|
|
24670
24719
|
]
|
|
24671
24720
|
};
|
|
24672
24721
|
|
|
24673
|
-
// node_modules
|
|
24722
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/razorpay.json
|
|
24674
24723
|
var razorpay_default = {
|
|
24675
24724
|
schemaVersion: 1,
|
|
24676
24725
|
slug: "razorpay",
|
|
@@ -24754,7 +24803,7 @@ var razorpay_default = {
|
|
|
24754
24803
|
]
|
|
24755
24804
|
};
|
|
24756
24805
|
|
|
24757
|
-
// node_modules
|
|
24806
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/sanity.json
|
|
24758
24807
|
var sanity_default = {
|
|
24759
24808
|
schemaVersion: 1,
|
|
24760
24809
|
slug: "sanity",
|
|
@@ -24839,7 +24888,7 @@ var sanity_default = {
|
|
|
24839
24888
|
]
|
|
24840
24889
|
};
|
|
24841
24890
|
|
|
24842
|
-
// node_modules
|
|
24891
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/stripe.json
|
|
24843
24892
|
var stripe_default = {
|
|
24844
24893
|
schemaVersion: 1,
|
|
24845
24894
|
slug: "stripe",
|
|
@@ -24925,7 +24974,7 @@ var stripe_default = {
|
|
|
24925
24974
|
]
|
|
24926
24975
|
};
|
|
24927
24976
|
|
|
24928
|
-
// node_modules
|
|
24977
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/supabase.json
|
|
24929
24978
|
var supabase_default = {
|
|
24930
24979
|
schemaVersion: 1,
|
|
24931
24980
|
slug: "supabase",
|
|
@@ -25109,7 +25158,7 @@ var supabase_default = {
|
|
|
25109
25158
|
]
|
|
25110
25159
|
};
|
|
25111
25160
|
|
|
25112
|
-
// node_modules
|
|
25161
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/ticket-tailor.json
|
|
25113
25162
|
var ticket_tailor_default = {
|
|
25114
25163
|
schemaVersion: 1,
|
|
25115
25164
|
slug: "ticket-tailor",
|
|
@@ -25153,7 +25202,7 @@ var ticket_tailor_default = {
|
|
|
25153
25202
|
]
|
|
25154
25203
|
};
|
|
25155
25204
|
|
|
25156
|
-
// node_modules
|
|
25205
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/asana.json
|
|
25157
25206
|
var asana_default = {
|
|
25158
25207
|
schemaVersion: 1,
|
|
25159
25208
|
slug: "asana",
|
|
@@ -25198,7 +25247,7 @@ var asana_default = {
|
|
|
25198
25247
|
]
|
|
25199
25248
|
};
|
|
25200
25249
|
|
|
25201
|
-
// node_modules
|
|
25250
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/box.json
|
|
25202
25251
|
var box_default = {
|
|
25203
25252
|
schemaVersion: 1,
|
|
25204
25253
|
slug: "box",
|
|
@@ -25242,7 +25291,7 @@ var box_default = {
|
|
|
25242
25291
|
]
|
|
25243
25292
|
};
|
|
25244
25293
|
|
|
25245
|
-
// node_modules
|
|
25294
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/mem0.json
|
|
25246
25295
|
var mem0_default = {
|
|
25247
25296
|
schemaVersion: 1,
|
|
25248
25297
|
slug: "mem0",
|
|
@@ -25301,7 +25350,7 @@ var mem0_default = {
|
|
|
25301
25350
|
]
|
|
25302
25351
|
};
|
|
25303
25352
|
|
|
25304
|
-
// node_modules
|
|
25353
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/pagerduty.json
|
|
25305
25354
|
var pagerduty_default = {
|
|
25306
25355
|
schemaVersion: 1,
|
|
25307
25356
|
slug: "pagerduty",
|
|
@@ -25398,7 +25447,7 @@ var pagerduty_default = {
|
|
|
25398
25447
|
]
|
|
25399
25448
|
};
|
|
25400
25449
|
|
|
25401
|
-
// node_modules
|
|
25450
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/similarweb.json
|
|
25402
25451
|
var similarweb_default = {
|
|
25403
25452
|
schemaVersion: 1,
|
|
25404
25453
|
slug: "similarweb",
|
|
@@ -25458,7 +25507,7 @@ var similarweb_default = {
|
|
|
25458
25507
|
]
|
|
25459
25508
|
};
|
|
25460
25509
|
|
|
25461
|
-
// node_modules
|
|
25510
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/xero.json
|
|
25462
25511
|
var xero_default = {
|
|
25463
25512
|
schemaVersion: 1,
|
|
25464
25513
|
slug: "xero",
|
|
@@ -25513,7 +25562,7 @@ var xero_default = {
|
|
|
25513
25562
|
]
|
|
25514
25563
|
};
|
|
25515
25564
|
|
|
25516
|
-
// node_modules
|
|
25565
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/youcom.json
|
|
25517
25566
|
var youcom_default = {
|
|
25518
25567
|
schemaVersion: 1,
|
|
25519
25568
|
slug: "youcom",
|
|
@@ -25620,7 +25669,7 @@ var youcom_default = {
|
|
|
25620
25669
|
]
|
|
25621
25670
|
};
|
|
25622
25671
|
|
|
25623
|
-
// node_modules
|
|
25672
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/fireflies.json
|
|
25624
25673
|
var fireflies_default = {
|
|
25625
25674
|
schemaVersion: 1,
|
|
25626
25675
|
slug: "fireflies",
|
|
@@ -25705,7 +25754,7 @@ var fireflies_default = {
|
|
|
25705
25754
|
]
|
|
25706
25755
|
};
|
|
25707
25756
|
|
|
25708
|
-
// node_modules
|
|
25757
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/zep.json
|
|
25709
25758
|
var zep_default = {
|
|
25710
25759
|
schemaVersion: 1,
|
|
25711
25760
|
slug: "zep",
|
|
@@ -25756,7 +25805,7 @@ var zep_default = {
|
|
|
25756
25805
|
]
|
|
25757
25806
|
};
|
|
25758
25807
|
|
|
25759
|
-
// node_modules
|
|
25808
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/supermemory.json
|
|
25760
25809
|
var supermemory_default = {
|
|
25761
25810
|
schemaVersion: 1,
|
|
25762
25811
|
slug: "supermemory",
|
|
@@ -25808,7 +25857,7 @@ var supermemory_default = {
|
|
|
25808
25857
|
]
|
|
25809
25858
|
};
|
|
25810
25859
|
|
|
25811
|
-
// node_modules
|
|
25860
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/honcho.json
|
|
25812
25861
|
var honcho_default = {
|
|
25813
25862
|
schemaVersion: 1,
|
|
25814
25863
|
slug: "honcho",
|
|
@@ -25867,7 +25916,7 @@ var honcho_default = {
|
|
|
25867
25916
|
]
|
|
25868
25917
|
};
|
|
25869
25918
|
|
|
25870
|
-
// node_modules
|
|
25919
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/gmail.json
|
|
25871
25920
|
var gmail_default = {
|
|
25872
25921
|
schemaVersion: 1,
|
|
25873
25922
|
slug: "gmail",
|
|
@@ -26051,7 +26100,7 @@ var gmail_default = {
|
|
|
26051
26100
|
]
|
|
26052
26101
|
};
|
|
26053
26102
|
|
|
26054
|
-
// node_modules
|
|
26103
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/google-drive.json
|
|
26055
26104
|
var google_drive_default = {
|
|
26056
26105
|
schemaVersion: 1,
|
|
26057
26106
|
slug: "google-drive",
|
|
@@ -26236,7 +26285,7 @@ var google_drive_default = {
|
|
|
26236
26285
|
]
|
|
26237
26286
|
};
|
|
26238
26287
|
|
|
26239
|
-
// node_modules
|
|
26288
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/google-docs.json
|
|
26240
26289
|
var google_docs_default = {
|
|
26241
26290
|
schemaVersion: 1,
|
|
26242
26291
|
slug: "google-docs",
|
|
@@ -26419,7 +26468,7 @@ var google_docs_default = {
|
|
|
26419
26468
|
]
|
|
26420
26469
|
};
|
|
26421
26470
|
|
|
26422
|
-
// node_modules
|
|
26471
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/google-sheets.json
|
|
26423
26472
|
var google_sheets_default = {
|
|
26424
26473
|
schemaVersion: 1,
|
|
26425
26474
|
slug: "google-sheets",
|
|
@@ -26626,7 +26675,7 @@ var google_sheets_default = {
|
|
|
26626
26675
|
]
|
|
26627
26676
|
};
|
|
26628
26677
|
|
|
26629
|
-
// node_modules
|
|
26678
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/google-slides.json
|
|
26630
26679
|
var google_slides_default = {
|
|
26631
26680
|
schemaVersion: 1,
|
|
26632
26681
|
slug: "google-slides",
|
|
@@ -26809,7 +26858,7 @@ var google_slides_default = {
|
|
|
26809
26858
|
]
|
|
26810
26859
|
};
|
|
26811
26860
|
|
|
26812
|
-
// node_modules
|
|
26861
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/google-calendar.json
|
|
26813
26862
|
var google_calendar_default = {
|
|
26814
26863
|
schemaVersion: 1,
|
|
26815
26864
|
slug: "google-calendar",
|
|
@@ -26997,7 +27046,7 @@ var google_calendar_default = {
|
|
|
26997
27046
|
]
|
|
26998
27047
|
};
|
|
26999
27048
|
|
|
27000
|
-
// node_modules
|
|
27049
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/google-chat.json
|
|
27001
27050
|
var google_chat_default = {
|
|
27002
27051
|
schemaVersion: 1,
|
|
27003
27052
|
slug: "google-chat",
|
|
@@ -27188,7 +27237,7 @@ var google_chat_default = {
|
|
|
27188
27237
|
]
|
|
27189
27238
|
};
|
|
27190
27239
|
|
|
27191
|
-
// node_modules
|
|
27240
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/google-people.json
|
|
27192
27241
|
var google_people_default = {
|
|
27193
27242
|
schemaVersion: 1,
|
|
27194
27243
|
slug: "google-people",
|
|
@@ -27300,7 +27349,7 @@ var google_people_default = {
|
|
|
27300
27349
|
]
|
|
27301
27350
|
};
|
|
27302
27351
|
|
|
27303
|
-
// node_modules
|
|
27352
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/google-workspace-search.json
|
|
27304
27353
|
var google_workspace_search_default = {
|
|
27305
27354
|
schemaVersion: 1,
|
|
27306
27355
|
slug: "google-workspace-search",
|
|
@@ -27415,7 +27464,7 @@ var google_workspace_search_default = {
|
|
|
27415
27464
|
]
|
|
27416
27465
|
};
|
|
27417
27466
|
|
|
27418
|
-
// node_modules
|
|
27467
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/openai.json
|
|
27419
27468
|
var openai_default = {
|
|
27420
27469
|
schemaVersion: 1,
|
|
27421
27470
|
slug: "openai",
|
|
@@ -27491,7 +27540,7 @@ var openai_default = {
|
|
|
27491
27540
|
]
|
|
27492
27541
|
};
|
|
27493
27542
|
|
|
27494
|
-
// node_modules
|
|
27543
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/openrouter.json
|
|
27495
27544
|
var openrouter_default = {
|
|
27496
27545
|
schemaVersion: 1,
|
|
27497
27546
|
slug: "openrouter",
|
|
@@ -27546,7 +27595,7 @@ var openrouter_default = {
|
|
|
27546
27595
|
]
|
|
27547
27596
|
};
|
|
27548
27597
|
|
|
27549
|
-
// node_modules
|
|
27598
|
+
// node_modules/@paperclipai/shared/dist/app-definitions/xai.json
|
|
27550
27599
|
var xai_default = {
|
|
27551
27600
|
schemaVersion: 1,
|
|
27552
27601
|
slug: "xai",
|
|
@@ -27622,10 +27671,10 @@ var xai_default = {
|
|
|
27622
27671
|
]
|
|
27623
27672
|
};
|
|
27624
27673
|
|
|
27625
|
-
// node_modules
|
|
27674
|
+
// node_modules/@paperclipai/shared/dist/app-definitions.generated.js
|
|
27626
27675
|
var APP_DEFINITIONS = [agentmail_default, zapier_default, arcade_default, executor_default, railway_default, github_default, github_code_review_bot_default, slack_default, microsoft_teams_default, imessage_photon_default, telegram_default, discord_default, notion_default, posthog_default, linear_default, context7_default, shopify_default, composio_default, oauth_generic_default, api_key_generic_default, sentry_default, vercel_default, anthropic_default, browser_use_cloud_default, cognee_default, jira_default, airtable_default, beehiiv_default, bitly_default, candid_default, cloudflare_default, cloudinary_default, coda_default, hugging_face_default, kernel_default, local_falcon_default, make_default, manufact_default, miro_default, netlify_default, oreilly_default, planetscale_default, resend_default, ticktick_default, todoist_default, webflow_default, wix_default, brex_default, clickhouse_default, egnyte_default, embat_default, mixpanel_default, postman_default, razorpay_default, sanity_default, stripe_default, supabase_default, ticket_tailor_default, asana_default, box_default, mem0_default, pagerduty_default, similarweb_default, xero_default, youcom_default, fireflies_default, zep_default, supermemory_default, honcho_default, gmail_default, google_drive_default, google_docs_default, google_sheets_default, google_slides_default, google_calendar_default, google_chat_default, google_people_default, google_workspace_search_default, openai_default, openrouter_default, xai_default];
|
|
27627
27676
|
|
|
27628
|
-
// node_modules
|
|
27677
|
+
// node_modules/@paperclipai/shared/dist/self-serve-mcp-research.json
|
|
27629
27678
|
var self_serve_mcp_research_default = {
|
|
27630
27679
|
schemaVersion: 1,
|
|
27631
27680
|
verifiedAt: "2026-08-26",
|
|
@@ -27685,12 +27734,12 @@ var self_serve_mcp_research_default = {
|
|
|
27685
27734
|
]
|
|
27686
27735
|
};
|
|
27687
27736
|
|
|
27688
|
-
// node_modules
|
|
27737
|
+
// node_modules/@paperclipai/shared/dist/self-serve-mcp-research.js
|
|
27689
27738
|
var SELF_SERVE_MCP_RESEARCH = self_serve_mcp_research_default;
|
|
27690
27739
|
var SELF_SERVE_MCP_CANDIDATES = SELF_SERVE_MCP_RESEARCH.entries.filter((entry) => entry.status === "self_serve");
|
|
27691
27740
|
var BLOCKED_MCP_PROVIDERS = SELF_SERVE_MCP_RESEARCH.entries.filter((entry) => entry.status === "blocked");
|
|
27692
27741
|
|
|
27693
|
-
// node_modules
|
|
27742
|
+
// node_modules/@paperclipai/shared/dist/app-definitions.js
|
|
27694
27743
|
var CONNECTABLE_APP_SLUGS = /* @__PURE__ */ new Set([
|
|
27695
27744
|
"anthropic",
|
|
27696
27745
|
"openai",
|
|
@@ -27752,7 +27801,7 @@ var APP_STORE_HIDDEN_SLUGS = /* @__PURE__ */ new Set([
|
|
|
27752
27801
|
]);
|
|
27753
27802
|
var APP_STORE_DEFINITIONS = CONNECTABLE_APP_DEFINITIONS.filter((app) => !APP_STORE_HIDDEN_SLUGS.has(app.slug));
|
|
27754
27803
|
|
|
27755
|
-
// node_modules
|
|
27804
|
+
// node_modules/@paperclipai/shared/dist/google-workspace-connectors.js
|
|
27756
27805
|
var auth = (scope) => `https://www.googleapis.com/auth/${scope}`;
|
|
27757
27806
|
var GOOGLE_WORKSPACE_CONNECTOR_PROFILES = {
|
|
27758
27807
|
"gmail.read": def("gmail", "https://gmailmcp.googleapis.com/mcp/v1", [auth("gmail.readonly")]),
|
|
@@ -27776,7 +27825,7 @@ function def(appSlug, serverUrl, scopes, writeTools = []) {
|
|
|
27776
27825
|
return { appSlug, serverUrl, scopes, writeTools };
|
|
27777
27826
|
}
|
|
27778
27827
|
|
|
27779
|
-
// node_modules
|
|
27828
|
+
// node_modules/@paperclipai/shared/dist/agent-url-key.js
|
|
27780
27829
|
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
27781
27830
|
function isUuidLike(value) {
|
|
27782
27831
|
if (typeof value !== "string")
|
|
@@ -27784,13 +27833,13 @@ function isUuidLike(value) {
|
|
|
27784
27833
|
return UUID_RE.test(value.trim());
|
|
27785
27834
|
}
|
|
27786
27835
|
|
|
27787
|
-
// node_modules
|
|
27836
|
+
// node_modules/@paperclipai/shared/dist/types/search.js
|
|
27788
27837
|
var COMPANY_SEARCH_SCOPES = ["all", "issues", "comments", "documents", "artifacts", "agents", "projects"];
|
|
27789
27838
|
var COMPANY_SEARCH_SORTS = ["relevance", "updated", "created", "priority"];
|
|
27790
27839
|
var COMPANY_SEARCH_EXTRACT_SCOPES = ["all", "issues", "comments", "documents"];
|
|
27791
27840
|
var COMPANY_SEARCH_EXTRACT_KINDS = ["literal", "url"];
|
|
27792
27841
|
|
|
27793
|
-
// node_modules
|
|
27842
|
+
// node_modules/@paperclipai/shared/dist/validators/search.js
|
|
27794
27843
|
var COMPANY_SEARCH_MAX_QUERY_LENGTH = 200;
|
|
27795
27844
|
var COMPANY_SEARCH_DEFAULT_LIMIT = 20;
|
|
27796
27845
|
var COMPANY_SEARCH_MAX_LIMIT = 50;
|
|
@@ -27977,7 +28026,7 @@ var companySearchExtractQuerySchema = external_exports.object({
|
|
|
27977
28026
|
}
|
|
27978
28027
|
});
|
|
27979
28028
|
|
|
27980
|
-
// node_modules
|
|
28029
|
+
// node_modules/@paperclipai/shared/dist/validators/status-card.js
|
|
27981
28030
|
function isValidTimeZone(timezone) {
|
|
27982
28031
|
try {
|
|
27983
28032
|
new Intl.DateTimeFormat("en", { timeZone: timezone }).format();
|
|
@@ -28133,7 +28182,7 @@ var writeStatusCardSummarySchema = external_exports.object({
|
|
|
28133
28182
|
model: external_exports.string().trim().min(1).max(200).optional().nullable()
|
|
28134
28183
|
});
|
|
28135
28184
|
|
|
28136
|
-
// node_modules
|
|
28185
|
+
// node_modules/@paperclipai/shared/dist/ai-connections.js
|
|
28137
28186
|
var connectionPurposeTransportSchema = external_exports.discriminatedUnion("connectionPurpose", [
|
|
28138
28187
|
external_exports.object({
|
|
28139
28188
|
connectionPurpose: external_exports.literal("tool"),
|
|
@@ -28246,7 +28295,7 @@ var localAiConnectionSchema = aiConnectionLoginIntentSchema.extend({
|
|
|
28246
28295
|
});
|
|
28247
28296
|
var localAiLoginStartSchema = aiConnectionLoginIntentSchema.extend({ restart: external_exports.boolean().optional() });
|
|
28248
28297
|
|
|
28249
|
-
// node_modules
|
|
28298
|
+
// node_modules/@paperclipai/shared/dist/remote-mcp-connectors.js
|
|
28250
28299
|
var REMOTE_MCP_CONNECTOR_METHODS = {
|
|
28251
28300
|
zapier: "generated-url",
|
|
28252
28301
|
arcade: "mcp",
|
|
@@ -28260,7 +28309,7 @@ function isRemoteMcpConnectorMethod(provider, method) {
|
|
|
28260
28309
|
return isRemoteMcpConnectorId(provider) && method === REMOTE_MCP_CONNECTOR_METHODS[provider];
|
|
28261
28310
|
}
|
|
28262
28311
|
|
|
28263
|
-
// node_modules
|
|
28312
|
+
// node_modules/@paperclipai/shared/dist/mcp-remote-headers.js
|
|
28264
28313
|
var HTTP_TOKEN_PATTERN = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
28265
28314
|
var MAX_HEADER_NAME_LENGTH = 128;
|
|
28266
28315
|
var MAX_HEADER_VALUE_LENGTH = 8192;
|
|
@@ -28332,13 +28381,13 @@ function mcpRemoteHeaderNameFromConfigPath(configPath) {
|
|
|
28332
28381
|
return name.length > 0 ? name : null;
|
|
28333
28382
|
}
|
|
28334
28383
|
|
|
28335
|
-
// node_modules
|
|
28384
|
+
// node_modules/@paperclipai/shared/dist/validators/text.js
|
|
28336
28385
|
function normalizeEscapedLineBreaks(value) {
|
|
28337
28386
|
return value.replace(/\\r\\n/g, "\n").replace(/\\n/g, "\n").replace(/\\r/g, "\n");
|
|
28338
28387
|
}
|
|
28339
28388
|
var multilineTextSchema = external_exports.string().transform(normalizeEscapedLineBreaks);
|
|
28340
28389
|
|
|
28341
|
-
// node_modules
|
|
28390
|
+
// node_modules/@paperclipai/shared/dist/validators/trust-policy.js
|
|
28342
28391
|
var trustPresetSchema = external_exports.enum(TRUST_PRESETS);
|
|
28343
28392
|
var lowTrustOutputPromotionTargetSchema = external_exports.object({
|
|
28344
28393
|
type: external_exports.literal("issue"),
|
|
@@ -28396,7 +28445,7 @@ var sourceTrustMetadataSchema = external_exports.object({
|
|
|
28396
28445
|
promotedAt: external_exports.string().datetime({ offset: true }).nullable().optional()
|
|
28397
28446
|
}).strict();
|
|
28398
28447
|
|
|
28399
|
-
// node_modules
|
|
28448
|
+
// node_modules/@paperclipai/shared/dist/validators/issue.js
|
|
28400
28449
|
var issueBlockedInboxStateSchema = external_exports.enum([
|
|
28401
28450
|
"needs_attention",
|
|
28402
28451
|
"awaiting_decision",
|
|
@@ -29898,7 +29947,7 @@ var upsertIssueDocumentSchema = external_exports.object({
|
|
|
29898
29947
|
});
|
|
29899
29948
|
var restoreIssueDocumentRevisionSchema = external_exports.object({});
|
|
29900
29949
|
|
|
29901
|
-
// node_modules
|
|
29950
|
+
// node_modules/@paperclipai/shared/dist/validators/secret.js
|
|
29902
29951
|
var secretKeySchema = external_exports.string().trim().min(1).max(120).regex(/^[a-zA-Z0-9_.-]+$/);
|
|
29903
29952
|
var secretVersionSelectorSchema = external_exports.union([external_exports.literal("latest"), external_exports.number().int().positive()]);
|
|
29904
29953
|
var creatableSecretStatusSchema = external_exports.enum(["active", "disabled", "archived"]);
|
|
@@ -30231,7 +30280,7 @@ var remoteSecretImportSchema = external_exports.object({
|
|
|
30231
30280
|
secrets: external_exports.array(remoteSecretImportSelectionSchema).min(1).max(100)
|
|
30232
30281
|
});
|
|
30233
30282
|
|
|
30234
|
-
// node_modules
|
|
30283
|
+
// node_modules/@paperclipai/shared/dist/routine-variables.js
|
|
30235
30284
|
var HUMAN_TIMESTAMP_FORMATTER = new Intl.DateTimeFormat("en-US", {
|
|
30236
30285
|
year: "numeric",
|
|
30237
30286
|
month: "long",
|
|
@@ -30269,7 +30318,7 @@ function isValidRoutineDateString(value) {
|
|
|
30269
30318
|
return day >= 1 && day <= daysInMonth;
|
|
30270
30319
|
}
|
|
30271
30320
|
|
|
30272
|
-
// node_modules
|
|
30321
|
+
// node_modules/@paperclipai/shared/dist/validators/routine.js
|
|
30273
30322
|
var routineVariableValueSchema = external_exports.union([external_exports.string(), external_exports.number().finite(), external_exports.boolean()]);
|
|
30274
30323
|
var routineVariableSchema = external_exports.object({
|
|
30275
30324
|
name: external_exports.string().trim().regex(/^[A-Za-z][A-Za-z0-9_]*$/),
|
|
@@ -30414,7 +30463,7 @@ var runRoutineSchema = external_exports.object({
|
|
|
30414
30463
|
});
|
|
30415
30464
|
var rotateRoutineTriggerSecretSchema = external_exports.object({});
|
|
30416
30465
|
|
|
30417
|
-
// node_modules
|
|
30466
|
+
// node_modules/@paperclipai/shared/dist/validators/external-object.js
|
|
30418
30467
|
var externalObjectStatusCategorySchema = external_exports.enum(EXTERNAL_OBJECT_STATUS_CATEGORIES);
|
|
30419
30468
|
var externalObjectStatusToneSchema = external_exports.enum(EXTERNAL_OBJECT_STATUS_TONES);
|
|
30420
30469
|
var externalObjectLivenessStateSchema = external_exports.enum(EXTERNAL_OBJECT_LIVENESS_STATES);
|
|
@@ -30434,7 +30483,7 @@ var externalObjectMentionSourceSchema = external_exports.object({
|
|
|
30434
30483
|
propertyKey: external_exports.string().trim().min(1).optional().nullable()
|
|
30435
30484
|
}).strict();
|
|
30436
30485
|
|
|
30437
|
-
// node_modules
|
|
30486
|
+
// node_modules/@paperclipai/shared/dist/validators/plugin.js
|
|
30438
30487
|
var jsonSchemaSchema = external_exports.record(external_exports.string(), external_exports.unknown()).refine((val) => {
|
|
30439
30488
|
if (Object.keys(val).length === 0)
|
|
30440
30489
|
return true;
|
|
@@ -31129,7 +31178,7 @@ var pluginManifestV1Schema = external_exports.object({
|
|
|
31129
31178
|
}
|
|
31130
31179
|
}
|
|
31131
31180
|
if (manifest2.tools) {
|
|
31132
|
-
const toolNames = manifest2.tools.map((
|
|
31181
|
+
const toolNames = manifest2.tools.map((t3) => t3.name);
|
|
31133
31182
|
const duplicates = toolNames.filter((name, i) => toolNames.indexOf(name) !== i);
|
|
31134
31183
|
if (duplicates.length > 0) {
|
|
31135
31184
|
ctx.addIssue({
|
|
@@ -31286,7 +31335,7 @@ var listPluginStateSchema = external_exports.object({
|
|
|
31286
31335
|
namespace: external_exports.string().min(1).optional()
|
|
31287
31336
|
});
|
|
31288
31337
|
|
|
31289
|
-
// node_modules
|
|
31338
|
+
// node_modules/@paperclipai/shared/dist/validators/tool-access.js
|
|
31290
31339
|
var toolApplicationTypeSchema = external_exports.enum(TOOL_APPLICATION_TYPES);
|
|
31291
31340
|
var toolApplicationStatusSchema = external_exports.enum(TOOL_APPLICATION_STATUSES);
|
|
31292
31341
|
var toolConnectionTransportSchema = external_exports.enum(["mcp_remote", "rest_api", "local_stdio", "chat_sdk"]);
|
|
@@ -32057,7 +32106,7 @@ var toolPolicyTestRequestSchema = external_exports.object({
|
|
|
32057
32106
|
writeAuditEvent: external_exports.boolean().optional()
|
|
32058
32107
|
});
|
|
32059
32108
|
|
|
32060
|
-
// node_modules
|
|
32109
|
+
// node_modules/@paperclipai/shared/dist/validators/app-definition.js
|
|
32061
32110
|
var appBrandAssetUrlSchema = external_exports.string().refine((value) => {
|
|
32062
32111
|
if (/^\/brands\/apps\/[a-z0-9][a-z0-9._-]*\.(?:svg|png)$/i.test(value))
|
|
32063
32112
|
return true;
|
|
@@ -32121,7 +32170,7 @@ var appDefinitionsSchema = external_exports.array(appDefinitionSchema).superRefi
|
|
|
32121
32170
|
});
|
|
32122
32171
|
});
|
|
32123
32172
|
|
|
32124
|
-
// node_modules
|
|
32173
|
+
// node_modules/@paperclipai/shared/dist/types/chat-channels.js
|
|
32125
32174
|
var CHAT_PROVIDERS = [
|
|
32126
32175
|
"slack",
|
|
32127
32176
|
"github",
|
|
@@ -32213,7 +32262,7 @@ var CHAT_RESOURCE_AVAILABILITIES = [
|
|
|
32213
32262
|
"removed"
|
|
32214
32263
|
];
|
|
32215
32264
|
|
|
32216
|
-
// node_modules
|
|
32265
|
+
// node_modules/@paperclipai/shared/dist/types/chat-github.js
|
|
32217
32266
|
var GITHUB_REVIEW_EVENTS = [
|
|
32218
32267
|
"opened",
|
|
32219
32268
|
"synchronize",
|
|
@@ -32223,7 +32272,7 @@ var GITHUB_REVIEW_EVENTS = [
|
|
|
32223
32272
|
"comment"
|
|
32224
32273
|
];
|
|
32225
32274
|
|
|
32226
|
-
// node_modules
|
|
32275
|
+
// node_modules/@paperclipai/shared/dist/validators/chat-github.js
|
|
32227
32276
|
var githubIdSchema = external_exports.string().regex(/^[1-9][0-9]{0,19}$/);
|
|
32228
32277
|
var githubCommitSchema = external_exports.string().regex(/^[a-f0-9]{40}$/i).transform((value) => value.toLowerCase());
|
|
32229
32278
|
var shortList = external_exports.array(external_exports.string().trim().min(1).max(256)).max(100);
|
|
@@ -32341,7 +32390,7 @@ var githubReviewAssessmentSchema = external_exports.object({
|
|
|
32341
32390
|
});
|
|
32342
32391
|
});
|
|
32343
32392
|
|
|
32344
|
-
// node_modules
|
|
32393
|
+
// node_modules/@paperclipai/shared/dist/validators/chat-channels.js
|
|
32345
32394
|
var chatProviderSchema = external_exports.enum(CHAT_PROVIDERS);
|
|
32346
32395
|
var chatEndpointStatusSchema = external_exports.enum(CHAT_ENDPOINT_STATUSES);
|
|
32347
32396
|
var chatConcurrencyPolicySchema = external_exports.enum(CHAT_CONCURRENCY_POLICIES);
|
|
@@ -32467,7 +32516,7 @@ var confirmChatIdentityLinkSchema = external_exports.object({
|
|
|
32467
32516
|
var replayChatDeliverySchema = external_exports.object({}).strict();
|
|
32468
32517
|
var chatPublicEndpointIdSchema = external_exports.string().regex(/^[a-zA-Z0-9_-]{32,128}$/);
|
|
32469
32518
|
|
|
32470
|
-
// node_modules
|
|
32519
|
+
// node_modules/@paperclipai/shared/dist/validators/summary-slot.js
|
|
32471
32520
|
var optionalScopeIdSchema = external_exports.string().guid().optional().nullable();
|
|
32472
32521
|
var summarySlotScopeKindSchema = external_exports.enum(SUMMARY_SLOT_SCOPE_KINDS);
|
|
32473
32522
|
var summarySlotKeySchema = external_exports.enum(SUMMARY_SLOT_KEYS);
|
|
@@ -32509,7 +32558,7 @@ var writeSummarySlotSchema = external_exports.object({
|
|
|
32509
32558
|
model: external_exports.string().trim().min(1).max(200).optional().nullable()
|
|
32510
32559
|
}).strict();
|
|
32511
32560
|
|
|
32512
|
-
// node_modules
|
|
32561
|
+
// node_modules/@paperclipai/shared/dist/network-bind.js
|
|
32513
32562
|
function normalizeHost(host) {
|
|
32514
32563
|
const trimmed = host?.trim();
|
|
32515
32564
|
return trimmed ? trimmed : void 0;
|
|
@@ -32552,13 +32601,13 @@ function validateConfiguredBindMode(input2) {
|
|
|
32552
32601
|
return errors;
|
|
32553
32602
|
}
|
|
32554
32603
|
|
|
32555
|
-
// node_modules
|
|
32604
|
+
// node_modules/@paperclipai/shared/dist/types/smoke-lab.js
|
|
32556
32605
|
var SMOKE_RUN_TRIGGERS = ["manual", "routine", "ci"];
|
|
32557
32606
|
var SMOKE_RUN_STATUSES = ["running", "passed", "failed", "cancelled"];
|
|
32558
32607
|
var SMOKE_RUN_STEP_PATHS = ["P1", "P2", "P3", "P4", "P5", "P6", "P7"];
|
|
32559
32608
|
var SMOKE_RUN_STEP_STATUSES = ["pass", "fail", "skipped"];
|
|
32560
32609
|
|
|
32561
|
-
// node_modules
|
|
32610
|
+
// node_modules/@paperclipai/shared/dist/types/instance.js
|
|
32562
32611
|
var DAILY_RETENTION_PRESETS = [3, 7, 14];
|
|
32563
32612
|
var WEEKLY_RETENTION_PRESETS = [1, 2, 4];
|
|
32564
32613
|
var MONTHLY_RETENTION_PRESETS = [1, 3, 6];
|
|
@@ -32568,7 +32617,7 @@ var DEFAULT_BACKUP_RETENTION = {
|
|
|
32568
32617
|
monthlyMonths: 1
|
|
32569
32618
|
};
|
|
32570
32619
|
|
|
32571
|
-
// node_modules
|
|
32620
|
+
// node_modules/@paperclipai/shared/dist/types/agent.js
|
|
32572
32621
|
var ADAPTER_AUTH_SESSION_STATUSES = [
|
|
32573
32622
|
"starting",
|
|
32574
32623
|
"waiting_for_user",
|
|
@@ -32588,10 +32637,10 @@ var ADAPTER_AUTH_PANEL_MODES = [
|
|
|
32588
32637
|
];
|
|
32589
32638
|
var SETUP_TOKEN_TRANSPORT_ADVISORY_CODE = "insecure_transport";
|
|
32590
32639
|
|
|
32591
|
-
// node_modules
|
|
32640
|
+
// node_modules/@paperclipai/shared/dist/types/resource-memberships.js
|
|
32592
32641
|
var RESOURCE_MEMBERSHIP_STATES = ["joined", "left"];
|
|
32593
32642
|
|
|
32594
|
-
// node_modules
|
|
32643
|
+
// node_modules/@paperclipai/shared/dist/adapter-auth-session.js
|
|
32595
32644
|
var ADAPTER_AUTH_SESSION_ACTIVE_STATUSES = [
|
|
32596
32645
|
"starting",
|
|
32597
32646
|
"waiting_for_user",
|
|
@@ -32599,7 +32648,7 @@ var ADAPTER_AUTH_SESSION_ACTIVE_STATUSES = [
|
|
|
32599
32648
|
];
|
|
32600
32649
|
var ACTIVE_STATUS_SET = new Set(ADAPTER_AUTH_SESSION_ACTIVE_STATUSES);
|
|
32601
32650
|
|
|
32602
|
-
// node_modules
|
|
32651
|
+
// node_modules/@paperclipai/shared/dist/validators/adapter-auth-session.js
|
|
32603
32652
|
var isoDateTime = external_exports.union([external_exports.date(), external_exports.string().datetime()]);
|
|
32604
32653
|
var adapterAuthSessionStatusSchema = external_exports.enum(ADAPTER_AUTH_SESSION_STATUSES);
|
|
32605
32654
|
var adapterAuthSessionFailureSchema = external_exports.object({
|
|
@@ -32628,7 +32677,7 @@ var startAdapterAuthSessionRequestSchema = external_exports.object({
|
|
|
32628
32677
|
ttlSeconds: external_exports.number().int().min(60).max(24 * 60 * 60).optional()
|
|
32629
32678
|
}).strict();
|
|
32630
32679
|
|
|
32631
|
-
// node_modules
|
|
32680
|
+
// node_modules/@paperclipai/shared/dist/validators/claude-setup-token-session.js
|
|
32632
32681
|
var isoDateTime2 = external_exports.union([external_exports.date(), external_exports.string().datetime()]);
|
|
32633
32682
|
var setupTokenTransportAdvisorySchema = external_exports.object({
|
|
32634
32683
|
code: external_exports.literal(SETUP_TOKEN_TRANSPORT_ADVISORY_CODE)
|
|
@@ -32680,7 +32729,7 @@ var claudeOAuthTokenStatusResponseSchema = external_exports.object({
|
|
|
32680
32729
|
latestVersion: external_exports.number().int().min(1)
|
|
32681
32730
|
}).strict();
|
|
32682
32731
|
|
|
32683
|
-
// node_modules
|
|
32732
|
+
// node_modules/@paperclipai/shared/dist/validators/sidebar-preferences.js
|
|
32684
32733
|
var sidebarOrderedIdSchema = external_exports.string().guid();
|
|
32685
32734
|
var sidebarOrderPreferenceSchema = external_exports.object({
|
|
32686
32735
|
orderedIds: external_exports.array(sidebarOrderedIdSchema),
|
|
@@ -32690,7 +32739,7 @@ var upsertSidebarOrderPreferenceSchema = external_exports.object({
|
|
|
32690
32739
|
orderedIds: external_exports.array(sidebarOrderedIdSchema)
|
|
32691
32740
|
});
|
|
32692
32741
|
|
|
32693
|
-
// node_modules
|
|
32742
|
+
// node_modules/@paperclipai/shared/dist/validators/resource-memberships.js
|
|
32694
32743
|
var resourceMembershipStateSchema = external_exports.enum(RESOURCE_MEMBERSHIP_STATES);
|
|
32695
32744
|
var updateResourceMembershipSchema = external_exports.object({
|
|
32696
32745
|
state: resourceMembershipStateSchema.optional(),
|
|
@@ -32705,7 +32754,7 @@ var updateDocumentResourceMembershipSchema = external_exports.object({
|
|
|
32705
32754
|
starred: external_exports.boolean()
|
|
32706
32755
|
}).strict();
|
|
32707
32756
|
|
|
32708
|
-
// node_modules
|
|
32757
|
+
// node_modules/@paperclipai/shared/dist/validators/inbox-agent-policy.js
|
|
32709
32758
|
var inboxAgentPolicyModeSchema = external_exports.enum(["open", "allowlist", "disabled"]);
|
|
32710
32759
|
var updateInboxAgentPolicySchema = external_exports.object({
|
|
32711
32760
|
mode: inboxAgentPolicyModeSchema,
|
|
@@ -32720,7 +32769,7 @@ var updateInboxAgentPolicySchema = external_exports.object({
|
|
|
32720
32769
|
}
|
|
32721
32770
|
});
|
|
32722
32771
|
|
|
32723
|
-
// node_modules
|
|
32772
|
+
// node_modules/@paperclipai/shared/dist/validators/execution-workspace.js
|
|
32724
32773
|
var executionWorkspaceStatusSchema = external_exports.enum([
|
|
32725
32774
|
"active",
|
|
32726
32775
|
"idle",
|
|
@@ -32880,14 +32929,14 @@ var reconcileExecutionWorkspaceBranchSchema = external_exports.discriminatedUnio
|
|
|
32880
32929
|
}).strict()
|
|
32881
32930
|
]);
|
|
32882
32931
|
|
|
32883
|
-
// node_modules
|
|
32932
|
+
// node_modules/@paperclipai/shared/dist/types/feedback.js
|
|
32884
32933
|
var FEEDBACK_TARGET_TYPES = ["issue_comment", "issue_document_revision"];
|
|
32885
32934
|
var FEEDBACK_VOTE_VALUES = ["up", "down"];
|
|
32886
32935
|
var FEEDBACK_DATA_SHARING_PREFERENCES = ["allowed", "not_allowed", "prompt"];
|
|
32887
32936
|
var DEFAULT_FEEDBACK_DATA_SHARING_PREFERENCE = "prompt";
|
|
32888
32937
|
var FEEDBACK_TRACE_STATUSES = ["local_only", "pending", "sent", "failed"];
|
|
32889
32938
|
|
|
32890
|
-
// node_modules
|
|
32939
|
+
// node_modules/@paperclipai/shared/dist/validators/feedback.js
|
|
32891
32940
|
var feedbackTargetTypeSchema = external_exports.enum(FEEDBACK_TARGET_TYPES);
|
|
32892
32941
|
var feedbackTraceStatusSchema = external_exports.enum(FEEDBACK_TRACE_STATUSES);
|
|
32893
32942
|
var feedbackVoteValueSchema = external_exports.enum(FEEDBACK_VOTE_VALUES);
|
|
@@ -32900,7 +32949,7 @@ var upsertIssueFeedbackVoteSchema = external_exports.object({
|
|
|
32900
32949
|
allowSharing: external_exports.boolean().optional()
|
|
32901
32950
|
});
|
|
32902
32951
|
|
|
32903
|
-
// node_modules
|
|
32952
|
+
// node_modules/@paperclipai/shared/dist/validators/instance.js
|
|
32904
32953
|
function presetSchema(presets, label2) {
|
|
32905
32954
|
return external_exports.number().refine((v) => presets.includes(v), { message: `${label2} must be one of: ${presets.join(", ")}` });
|
|
32906
32955
|
}
|
|
@@ -32995,7 +33044,7 @@ var instanceSettingsSchema = external_exports.object({
|
|
|
32995
33044
|
updatedAt: external_exports.union([external_exports.date(), external_exports.string().datetime()])
|
|
32996
33045
|
}).strict();
|
|
32997
33046
|
|
|
32998
|
-
// node_modules
|
|
33047
|
+
// node_modules/@paperclipai/shared/dist/validators/budget.js
|
|
32999
33048
|
var upsertBudgetPolicySchema = external_exports.object({
|
|
33000
33049
|
scopeType: external_exports.enum(BUDGET_SCOPE_TYPES),
|
|
33001
33050
|
scopeId: external_exports.string().guid(),
|
|
@@ -33021,7 +33070,7 @@ var resolveBudgetIncidentSchema = external_exports.object({
|
|
|
33021
33070
|
}
|
|
33022
33071
|
});
|
|
33023
33072
|
|
|
33024
|
-
// node_modules
|
|
33073
|
+
// node_modules/@paperclipai/shared/dist/validators/smoke-lab.js
|
|
33025
33074
|
var smokeRunTriggerSchema = external_exports.enum(SMOKE_RUN_TRIGGERS);
|
|
33026
33075
|
var smokeRunStatusSchema = external_exports.enum(SMOKE_RUN_STATUSES);
|
|
33027
33076
|
var smokeRunStepPathSchema = external_exports.enum(SMOKE_RUN_STEP_PATHS);
|
|
@@ -33043,7 +33092,7 @@ var recordSmokeRunStepSchema = external_exports.object({
|
|
|
33043
33092
|
durationMs: external_exports.number().int().min(0).max(24 * 60 * 60 * 1e3).nullable().optional()
|
|
33044
33093
|
}).strict();
|
|
33045
33094
|
|
|
33046
|
-
// node_modules
|
|
33095
|
+
// node_modules/@paperclipai/shared/dist/validators/company.js
|
|
33047
33096
|
var logoAssetIdSchema = external_exports.string().guid().nullable().optional();
|
|
33048
33097
|
var feedbackDataSharingTermsVersionSchema = external_exports.string().min(1).nullable().optional();
|
|
33049
33098
|
var interactionResolverKindGovernanceSchema = external_exports.object({
|
|
@@ -33080,7 +33129,7 @@ var updateCompanyBrandingSchema = external_exports.object({
|
|
|
33080
33129
|
logoAssetId: logoAssetIdSchema
|
|
33081
33130
|
}).strict().refine((value) => value.name !== void 0 || value.description !== void 0 || value.logoAssetId !== void 0, "At least one branding field must be provided");
|
|
33082
33131
|
|
|
33083
|
-
// node_modules
|
|
33132
|
+
// node_modules/@paperclipai/shared/dist/validators/environment.js
|
|
33084
33133
|
var environmentDriverSchema = external_exports.enum(ENVIRONMENT_DRIVERS);
|
|
33085
33134
|
var environmentStatusSchema = external_exports.enum(ENVIRONMENT_STATUSES);
|
|
33086
33135
|
var environmentLeaseStatusSchema = external_exports.enum(ENVIRONMENT_LEASE_STATUSES);
|
|
@@ -33113,7 +33162,7 @@ var probeEnvironmentConfigSchema = external_exports.object({
|
|
|
33113
33162
|
metadata: external_exports.record(external_exports.string(), external_exports.unknown()).optional().nullable()
|
|
33114
33163
|
}).strict();
|
|
33115
33164
|
|
|
33116
|
-
// node_modules
|
|
33165
|
+
// node_modules/@paperclipai/shared/dist/validators/environment-custom-images.js
|
|
33117
33166
|
var isoDateTime3 = external_exports.union([external_exports.date(), external_exports.string().datetime()]);
|
|
33118
33167
|
var providerKeySchema = external_exports.string().min(1).max(200);
|
|
33119
33168
|
var optionalRecordSchema = external_exports.record(external_exports.string(), external_exports.unknown()).optional().nullable();
|
|
@@ -33192,7 +33241,7 @@ var environmentCustomImageTerminalSessionTokenSchema = external_exports.object({
|
|
|
33192
33241
|
websocketPath: external_exports.string().min(1)
|
|
33193
33242
|
}).strict();
|
|
33194
33243
|
|
|
33195
|
-
// node_modules
|
|
33244
|
+
// node_modules/@paperclipai/shared/dist/validators/company-skill.js
|
|
33196
33245
|
var companySkillSourceTypeSchema = external_exports.enum(["local_path", "github", "url", "catalog", "skills_sh"]);
|
|
33197
33246
|
var companySkillTrustLevelSchema = external_exports.enum(["markdown_only", "assets", "scripts_executables"]);
|
|
33198
33247
|
var companySkillCompatibilitySchema = external_exports.enum(["compatible", "unknown", "invalid"]);
|
|
@@ -33717,7 +33766,7 @@ var companySkillInstallCatalogResultSchema = external_exports.object({
|
|
|
33717
33766
|
warnings: external_exports.array(external_exports.string())
|
|
33718
33767
|
});
|
|
33719
33768
|
|
|
33720
|
-
// node_modules
|
|
33769
|
+
// node_modules/@paperclipai/shared/dist/validators/folder.js
|
|
33721
33770
|
var folderKindSchema = external_exports.enum(["routine", "skill"]);
|
|
33722
33771
|
var folderSlugSchema = external_exports.string().trim().min(1).max(120).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "Folder slug must contain only lowercase letters, numbers, and single hyphens");
|
|
33723
33772
|
var folderSchema = external_exports.object({
|
|
@@ -33773,7 +33822,7 @@ var moveFolderItemSchema = external_exports.object({
|
|
|
33773
33822
|
folderId: external_exports.string().guid().optional().nullable()
|
|
33774
33823
|
});
|
|
33775
33824
|
|
|
33776
|
-
// node_modules
|
|
33825
|
+
// node_modules/@paperclipai/shared/dist/agent-appearance.js
|
|
33777
33826
|
var AGENT_PALETTE_IDS = ["bubblegum-sky", "pink-lemonade", "orchid-peach", "coral-mint", "lime-lagoon", "arctic-blue", "solar-flare", "violet-ember", "deep-tide", "coral-current", "golden-hour", "tangerine-cobalt", "electric-grove", "flamingo-jade", "cherry-pop", "turquoise-cherry", "ultraviolet-tide"];
|
|
33778
33827
|
var agentAppearanceSchema = external_exports.object({
|
|
33779
33828
|
schemaVersion: external_exports.literal(1),
|
|
@@ -33781,7 +33830,7 @@ var agentAppearanceSchema = external_exports.object({
|
|
|
33781
33830
|
paletteId: external_exports.enum(AGENT_PALETTE_IDS)
|
|
33782
33831
|
}).strict();
|
|
33783
33832
|
|
|
33784
|
-
// node_modules
|
|
33833
|
+
// node_modules/@paperclipai/shared/dist/validators/company-portability.js
|
|
33785
33834
|
var portabilityIncludeSchema = external_exports.object({
|
|
33786
33835
|
company: external_exports.boolean().optional(),
|
|
33787
33836
|
agents: external_exports.boolean().optional(),
|
|
@@ -34070,7 +34119,7 @@ var companyPortabilityImportSchema = companyPortabilityPreviewSchema.extend({
|
|
|
34070
34119
|
pauseAutomations: external_exports.boolean().optional()
|
|
34071
34120
|
});
|
|
34072
34121
|
|
|
34073
|
-
// node_modules
|
|
34122
|
+
// node_modules/@paperclipai/shared/dist/validators/teams-catalog.js
|
|
34074
34123
|
var catalogTeamKindSchema = external_exports.enum(["bundled", "optional"]);
|
|
34075
34124
|
var catalogTeamTrustLevelSchema = external_exports.enum([
|
|
34076
34125
|
"markdown_only",
|
|
@@ -34216,7 +34265,7 @@ var catalogTeamSkillPreparationSchema = external_exports.object({
|
|
|
34216
34265
|
reason: external_exports.string().min(1).nullable()
|
|
34217
34266
|
});
|
|
34218
34267
|
|
|
34219
|
-
// node_modules
|
|
34268
|
+
// node_modules/@paperclipai/shared/dist/validators/adapter-skills.js
|
|
34220
34269
|
var agentSkillStateSchema = external_exports.enum([
|
|
34221
34270
|
"available",
|
|
34222
34271
|
"configured",
|
|
@@ -34278,7 +34327,7 @@ var agentSkillSyncSchema = external_exports.object({
|
|
|
34278
34327
|
desiredSkills: external_exports.array(agentDesiredSkillSelectionSchema)
|
|
34279
34328
|
});
|
|
34280
34329
|
|
|
34281
|
-
// node_modules
|
|
34330
|
+
// node_modules/@paperclipai/shared/dist/validators/agent.js
|
|
34282
34331
|
var agentPermissionsSchema = external_exports.object({
|
|
34283
34332
|
// No schema default: the server derives the default (enabled unless the
|
|
34284
34333
|
// permissions record marks the agent low-trust) when the field is omitted.
|
|
@@ -34493,7 +34542,7 @@ var resolveAgentInstructionCandidateSchema = external_exports.object({
|
|
|
34493
34542
|
content: external_exports.string().max(1024 * 1024)
|
|
34494
34543
|
}).strict();
|
|
34495
34544
|
|
|
34496
|
-
// node_modules
|
|
34545
|
+
// node_modules/@paperclipai/shared/dist/validators/project.js
|
|
34497
34546
|
var executionWorkspaceStrategySchema2 = external_exports.object({
|
|
34498
34547
|
type: external_exports.enum(["project_primary", "git_worktree", "adapter_managed", "cloud_sandbox"]).optional(),
|
|
34499
34548
|
baseRef: external_exports.string().optional().nullable(),
|
|
@@ -34596,7 +34645,7 @@ var createProjectSchema = external_exports.object({
|
|
|
34596
34645
|
});
|
|
34597
34646
|
var updateProjectSchema = objectWithoutDefaults(external_exports.object(projectFields)).partial();
|
|
34598
34647
|
|
|
34599
|
-
// node_modules
|
|
34648
|
+
// node_modules/@paperclipai/shared/dist/validators/document-annotation.js
|
|
34600
34649
|
var documentAnnotationThreadStatusSchema = external_exports.enum(DOCUMENT_ANNOTATION_THREAD_STATUSES);
|
|
34601
34650
|
var documentAnnotationAnchorStateSchema = external_exports.enum(DOCUMENT_ANNOTATION_ANCHOR_STATES);
|
|
34602
34651
|
var documentAnnotationAnchorConfidenceSchema = external_exports.enum(DOCUMENT_ANNOTATION_ANCHOR_CONFIDENCES);
|
|
@@ -34647,7 +34696,7 @@ var updateDocumentAnnotationThreadSchema = external_exports.object({
|
|
|
34647
34696
|
message: "At least one field must be provided"
|
|
34648
34697
|
});
|
|
34649
34698
|
|
|
34650
|
-
// node_modules
|
|
34699
|
+
// node_modules/@paperclipai/shared/dist/validators/issue-tree-control.js
|
|
34651
34700
|
var issueTreeControlModeSchema = external_exports.enum(ISSUE_TREE_CONTROL_MODES);
|
|
34652
34701
|
var issueTreeHoldReleasePolicySchema = external_exports.object({
|
|
34653
34702
|
strategy: external_exports.enum(ISSUE_TREE_HOLD_RELEASE_POLICY_STRATEGIES).default("manual"),
|
|
@@ -34669,7 +34718,7 @@ var releaseIssueTreeHoldSchema = external_exports.object({
|
|
|
34669
34718
|
metadata: external_exports.record(external_exports.string(), external_exports.unknown()).optional().nullable()
|
|
34670
34719
|
}).strict();
|
|
34671
34720
|
|
|
34672
|
-
// node_modules
|
|
34721
|
+
// node_modules/@paperclipai/shared/dist/validators/artifact.js
|
|
34673
34722
|
var COMPANY_ARTIFACTS_DEFAULT_LIMIT = 30;
|
|
34674
34723
|
var COMPANY_ARTIFACTS_MAX_LIMIT = 100;
|
|
34675
34724
|
var COMPANY_ARTIFACTS_MAX_QUERY_LENGTH = 160;
|
|
@@ -34734,7 +34783,7 @@ var companyArtifactsResponseSchema = external_exports.object({
|
|
|
34734
34783
|
nextCursor: external_exports.string().nullable()
|
|
34735
34784
|
});
|
|
34736
34785
|
|
|
34737
|
-
// node_modules
|
|
34786
|
+
// node_modules/@paperclipai/shared/dist/validators/goal.js
|
|
34738
34787
|
var createGoalSchema = external_exports.object({
|
|
34739
34788
|
title: external_exports.string().min(1),
|
|
34740
34789
|
description: external_exports.string().optional().nullable(),
|
|
@@ -34745,7 +34794,7 @@ var createGoalSchema = external_exports.object({
|
|
|
34745
34794
|
});
|
|
34746
34795
|
var updateGoalSchema = objectWithoutDefaults(createGoalSchema).partial();
|
|
34747
34796
|
|
|
34748
|
-
// node_modules
|
|
34797
|
+
// node_modules/@paperclipai/shared/dist/validators/onboarding-seed.js
|
|
34749
34798
|
var MISSION_MAX_LENGTH = 2e3;
|
|
34750
34799
|
var AGENT_NAME_MAX_LENGTH = 80;
|
|
34751
34800
|
var AGENT_ROLE_MAX_LENGTH = 120;
|
|
@@ -34764,7 +34813,7 @@ var applyOnboardingSeedSchema = external_exports.object({
|
|
|
34764
34813
|
}).optional()
|
|
34765
34814
|
});
|
|
34766
34815
|
|
|
34767
|
-
// node_modules
|
|
34816
|
+
// node_modules/@paperclipai/shared/dist/validators/approval.js
|
|
34768
34817
|
var createApprovalSchema = external_exports.object({
|
|
34769
34818
|
type: external_exports.enum(APPROVAL_TYPES),
|
|
34770
34819
|
requestedByAgentId: external_exports.string().guid().optional().nullable(),
|
|
@@ -34784,7 +34833,7 @@ var addApprovalCommentSchema = external_exports.object({
|
|
|
34784
34833
|
body: multilineTextSchema.pipe(external_exports.string().min(1))
|
|
34785
34834
|
});
|
|
34786
34835
|
|
|
34787
|
-
// node_modules
|
|
34836
|
+
// node_modules/@paperclipai/shared/dist/validators/cost.js
|
|
34788
34837
|
var createCostEventSchema = external_exports.object({
|
|
34789
34838
|
agentId: external_exports.string().guid(),
|
|
34790
34839
|
issueId: external_exports.string().guid().optional().nullable(),
|
|
@@ -34810,7 +34859,7 @@ var updateBudgetSchema = external_exports.object({
|
|
|
34810
34859
|
budgetMonthlyCents: external_exports.number().int().nonnegative()
|
|
34811
34860
|
});
|
|
34812
34861
|
|
|
34813
|
-
// node_modules
|
|
34862
|
+
// node_modules/@paperclipai/shared/dist/validators/finance.js
|
|
34814
34863
|
var createFinanceEventSchema = external_exports.object({
|
|
34815
34864
|
agentId: external_exports.string().guid().optional().nullable(),
|
|
34816
34865
|
issueId: external_exports.string().guid().optional().nullable(),
|
|
@@ -34841,7 +34890,7 @@ var createFinanceEventSchema = external_exports.object({
|
|
|
34841
34890
|
currency: value.currency.toUpperCase()
|
|
34842
34891
|
}));
|
|
34843
34892
|
|
|
34844
|
-
// node_modules
|
|
34893
|
+
// node_modules/@paperclipai/shared/dist/validators/asset.js
|
|
34845
34894
|
var ASSET_NAMESPACE_MAX_LENGTH = 120;
|
|
34846
34895
|
var ASSET_NAMESPACE_PATTERN = /^[a-zA-Z0-9/_.:@|-]+$/;
|
|
34847
34896
|
var ASSET_NAMESPACE_RULE = `"namespace" must be 1-${ASSET_NAMESPACE_MAX_LENGTH} characters of letters, numbers, or / _ - . : @ |, and cannot contain "." or ".." path segments`;
|
|
@@ -34855,7 +34904,7 @@ var createAssetImageMetadataSchema = external_exports.object({
|
|
|
34855
34904
|
namespace: external_exports.string().trim().min(1).max(ASSET_NAMESPACE_MAX_LENGTH).regex(ASSET_NAMESPACE_PATTERN, ASSET_NAMESPACE_RULE).refine(hasNoDotSegments, { message: ASSET_NAMESPACE_RULE }).optional()
|
|
34856
34905
|
});
|
|
34857
34906
|
|
|
34858
|
-
// node_modules
|
|
34907
|
+
// node_modules/@paperclipai/shared/dist/validators/pipeline.js
|
|
34859
34908
|
var routineVariableLikeNameSchema = external_exports.string().trim().regex(/^[A-Za-z][A-Za-z0-9_]*$/);
|
|
34860
34909
|
var pipelineStageKindSchema = external_exports.enum(["working", "review", "done", "cancelled"]);
|
|
34861
34910
|
var legacyPipelineStageKindSchema = external_exports.enum(["open", "working", "review", "done", "cancelled"]);
|
|
@@ -34987,7 +35036,7 @@ var pipelineAutomationRetryRequestSchema = external_exports.object({
|
|
|
34987
35036
|
})
|
|
34988
35037
|
});
|
|
34989
35038
|
|
|
34990
|
-
// node_modules
|
|
35039
|
+
// node_modules/@paperclipai/shared/dist/validators/access.js
|
|
34991
35040
|
var createCompanyInviteSchema = external_exports.object({
|
|
34992
35041
|
allowedJoinTypes: external_exports.enum(INVITE_JOIN_TYPES).default("both"),
|
|
34993
35042
|
humanRole: external_exports.enum(HUMAN_COMPANY_MEMBERSHIP_ROLES).optional().nullable(),
|
|
@@ -35119,7 +35168,7 @@ var updateCurrentUserProfileSchema = external_exports.object({
|
|
|
35119
35168
|
image: external_exports.union([profileImageSchema, external_exports.literal(""), external_exports.null()]).optional().transform((value) => value === "" ? null : value)
|
|
35120
35169
|
});
|
|
35121
35170
|
|
|
35122
|
-
// node_modules
|
|
35171
|
+
// node_modules/@paperclipai/shared/dist/validators/skill-policy.js
|
|
35123
35172
|
var SKILL_POLICY_ACTIONS = [
|
|
35124
35173
|
"skills.create",
|
|
35125
35174
|
"skills.import",
|
|
@@ -35221,7 +35270,7 @@ var evaluateSkillPolicySchema = external_exports.object({
|
|
|
35221
35270
|
principal: external_exports.object({ agentId: external_exports.string().guid() }).strict().optional()
|
|
35222
35271
|
}).strict();
|
|
35223
35272
|
|
|
35224
|
-
// node_modules
|
|
35273
|
+
// node_modules/@paperclipai/shared/dist/validators/provider-trace.js
|
|
35225
35274
|
var providerTraceDirectionSchema = external_exports.enum([
|
|
35226
35275
|
"client_to_provider",
|
|
35227
35276
|
"provider_to_client",
|
|
@@ -35319,7 +35368,7 @@ var runPresentationDecisionSchema = external_exports.object({
|
|
|
35319
35368
|
reasonCodes: external_exports.array(external_exports.string())
|
|
35320
35369
|
}).strict();
|
|
35321
35370
|
|
|
35322
|
-
// node_modules
|
|
35371
|
+
// node_modules/@paperclipai/shared/dist/validators/email.js
|
|
35323
35372
|
var address = external_exports.string().trim().email().max(320);
|
|
35324
35373
|
var addresses = external_exports.array(address).max(50);
|
|
35325
35374
|
var emailEndpointSetupSchema = external_exports.object({
|
|
@@ -35370,7 +35419,7 @@ var emailConnectionSchema = external_exports.object({
|
|
|
35370
35419
|
idempotencyKey: external_exports.string().uuid()
|
|
35371
35420
|
}).strict();
|
|
35372
35421
|
|
|
35373
|
-
// node_modules
|
|
35422
|
+
// node_modules/@paperclipai/shared/dist/github-skill-repository.js
|
|
35374
35423
|
function parseGitHubSkillRepositoryUrl(value) {
|
|
35375
35424
|
try {
|
|
35376
35425
|
if (value.includes("\\"))
|
|
@@ -35395,7 +35444,7 @@ function parseGitHubSkillRepositoryUrl(value) {
|
|
|
35395
35444
|
}
|
|
35396
35445
|
}
|
|
35397
35446
|
|
|
35398
|
-
// node_modules
|
|
35447
|
+
// node_modules/@paperclipai/shared/dist/validators/skill-source.js
|
|
35399
35448
|
var repositoryUrl = external_exports.string().trim().max(2048).refine((value) => parseGitHubSkillRepositoryUrl(value) !== null, "Enter an HTTPS GitHub repository or branch URL.");
|
|
35400
35449
|
var repoPath = external_exports.string().max(4096).refine((value) => !value.startsWith("/") && !value.includes("\\") && !value.includes("\0") && !value.split("/").some((part) => part === ".." || part === "."), "Invalid repository path");
|
|
35401
35450
|
var skillSourceDiscoverySchema = external_exports.object({
|
|
@@ -35420,7 +35469,7 @@ var skillSourceSelectionSchema = external_exports.object({
|
|
|
35420
35469
|
connectionId: external_exports.string().uuid().nullable().optional()
|
|
35421
35470
|
});
|
|
35422
35471
|
|
|
35423
|
-
// node_modules
|
|
35472
|
+
// node_modules/@paperclipai/shared/dist/api.js
|
|
35424
35473
|
var API_PREFIX = "/api";
|
|
35425
35474
|
var API = {
|
|
35426
35475
|
health: `${API_PREFIX}/health`,
|
|
@@ -35490,7 +35539,7 @@ var API = {
|
|
|
35490
35539
|
admin: `${API_PREFIX}/admin`
|
|
35491
35540
|
};
|
|
35492
35541
|
|
|
35493
|
-
// node_modules
|
|
35542
|
+
// node_modules/@paperclipai/shared/dist/config-schema.js
|
|
35494
35543
|
var configMetaSchema = external_exports.object({
|
|
35495
35544
|
version: external_exports.literal(1),
|
|
35496
35545
|
updatedAt: external_exports.string(),
|
|
@@ -35650,7 +35699,7 @@ var paperclipConfigSchema = external_exports.object({
|
|
|
35650
35699
|
}
|
|
35651
35700
|
});
|
|
35652
35701
|
|
|
35653
|
-
// node_modules
|
|
35702
|
+
// node_modules/@paperclipai/shared/dist/validators/adapter-registry.js
|
|
35654
35703
|
var adapterRegistryEntrySchema = external_exports.object({
|
|
35655
35704
|
adapterType: external_exports.string().min(1),
|
|
35656
35705
|
enabled: external_exports.boolean().default(true),
|
|
@@ -35662,7 +35711,7 @@ var adapterRegistryEntrySchema = external_exports.object({
|
|
|
35662
35711
|
}).strict();
|
|
35663
35712
|
var adapterRegistrySchema = external_exports.array(adapterRegistryEntrySchema);
|
|
35664
35713
|
|
|
35665
|
-
// node_modules
|
|
35714
|
+
// node_modules/@paperclipai/shared/dist/feature-catalog.js
|
|
35666
35715
|
var FEATURE_TIERS = ["preference", "managed", "floor"];
|
|
35667
35716
|
var INSTANCE_FEATURE_CATALOG = {
|
|
35668
35717
|
enableEnvironments: {
|
|
@@ -35934,7 +35983,7 @@ var featureCatalogArtifactSchema = external_exports.object({
|
|
|
35934
35983
|
features: external_exports.record(external_exports.string().min(1), external_exports.object({ tier: external_exports.enum(FEATURE_TIERS) }).strict())
|
|
35935
35984
|
}).strict();
|
|
35936
35985
|
|
|
35937
|
-
// node_modules
|
|
35986
|
+
// node_modules/@paperclipai/shared/dist/settings-visibility.js
|
|
35938
35987
|
var HIDEABLE_INSTANCE_PAGES = [
|
|
35939
35988
|
"instance.profile",
|
|
35940
35989
|
"instance.environments",
|
|
@@ -35974,14 +36023,14 @@ var HIDEABLE_SETTING_KEYS = [
|
|
|
35974
36023
|
...INSTANCE_FEATURE_KEYS.map(experimentalSettingKey)
|
|
35975
36024
|
];
|
|
35976
36025
|
|
|
35977
|
-
// node_modules
|
|
36026
|
+
// node_modules/@paperclipai/shared/dist/setting-defaults.js
|
|
35978
36027
|
var DEFAULTABLE_GENERAL_SETTINGS = [
|
|
35979
36028
|
"feedbackDataSharingPreference"
|
|
35980
36029
|
];
|
|
35981
36030
|
var defaultableFieldsSchema = instanceGeneralSettingsSchema.pick(Object.fromEntries(DEFAULTABLE_GENERAL_SETTINGS.map((key) => [key, true]))).partial();
|
|
35982
36031
|
var schemaDefaults = instanceGeneralSettingsSchema.parse({});
|
|
35983
36032
|
|
|
35984
|
-
// node_modules
|
|
36033
|
+
// node_modules/@paperclipai/shared/dist/validators/runtime-exposure.js
|
|
35985
36034
|
var runtimeExposureProviderSchema = external_exports.literal("tailscale_https");
|
|
35986
36035
|
var runtimeExposureFailurePolicySchema = external_exports.literal("fail_closed");
|
|
35987
36036
|
var runtimeExposureConfigSchema = external_exports.object({
|
|
@@ -36018,21 +36067,21 @@ var runtimeExposureStatusSchema = external_exports.object({
|
|
|
36018
36067
|
updatedAt: external_exports.string().nullable()
|
|
36019
36068
|
}).strict();
|
|
36020
36069
|
|
|
36021
|
-
// node_modules
|
|
36070
|
+
// node_modules/@paperclipai/shared/dist/runtime-exposure/ports.js
|
|
36022
36071
|
var RUNTIME_EXPOSURE_APP_PORT_MIN = 42e3;
|
|
36023
36072
|
var RUNTIME_EXPOSURE_APP_PORT_MAX = 42999;
|
|
36024
36073
|
var RUNTIME_EXPOSURE_HMR_PORT_OFFSET = 1e4;
|
|
36025
36074
|
var RUNTIME_EXPOSURE_HMR_PORT_MIN = RUNTIME_EXPOSURE_APP_PORT_MIN + RUNTIME_EXPOSURE_HMR_PORT_OFFSET;
|
|
36026
36075
|
var RUNTIME_EXPOSURE_HMR_PORT_MAX = RUNTIME_EXPOSURE_APP_PORT_MAX + RUNTIME_EXPOSURE_HMR_PORT_OFFSET;
|
|
36027
36076
|
|
|
36028
|
-
// node_modules
|
|
36077
|
+
// node_modules/@paperclipai/shared/dist/railway-connection.js
|
|
36029
36078
|
var configureRailwaySshSchema = external_exports.discriminatedUnion("action", [
|
|
36030
36079
|
external_exports.object({ action: external_exports.literal("prepare"), grantId: external_exports.string().uuid() }).strict(),
|
|
36031
36080
|
external_exports.object({ action: external_exports.literal("enable"), grantId: external_exports.string().uuid(), knownHosts: external_exports.string().min(1).max(8192) }).strict(),
|
|
36032
36081
|
external_exports.object({ action: external_exports.literal("remove"), grantId: external_exports.string().uuid() }).strict()
|
|
36033
36082
|
]);
|
|
36034
36083
|
|
|
36035
|
-
// node_modules
|
|
36084
|
+
// node_modules/@paperclipai/shared/dist/announcements.js
|
|
36036
36085
|
var ANNOUNCEMENT_MANIFEST_MAX_BYTES = 64 * 1024;
|
|
36037
36086
|
var ANNOUNCEMENT_IMAGE_MAX_BYTES = 2 * 1024 * 1024;
|
|
36038
36087
|
var ANNOUNCEMENT_ANIMATION_MAX_BYTES = 128 * 1024;
|
|
@@ -36089,7 +36138,7 @@ var announcementManifestSchema = external_exports.object({
|
|
|
36089
36138
|
}).strict();
|
|
36090
36139
|
var dismissAnnouncementSchema = external_exports.object({ companyId: external_exports.string().uuid() }).strict();
|
|
36091
36140
|
|
|
36092
|
-
// node_modules
|
|
36141
|
+
// node_modules/@paperclipai/shared/dist/slack-tools.js
|
|
36093
36142
|
var slackSearchConfigSchema = external_exports.object({
|
|
36094
36143
|
clientId: external_exports.string().regex(/^\d+\.\d+$/),
|
|
36095
36144
|
clientSecret: external_exports.string().min(10).max(512)
|
|
@@ -36215,7 +36264,7 @@ var slackToolCallSchema = external_exports.object({
|
|
|
36215
36264
|
arguments: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
36216
36265
|
}).strict();
|
|
36217
36266
|
|
|
36218
|
-
// node_modules
|
|
36267
|
+
// node_modules/@paperclipai/shared/dist/composio-search-catalog.json
|
|
36219
36268
|
var composio_search_catalog_default = {
|
|
36220
36269
|
source: "https://docs.composio.dev/toolkits",
|
|
36221
36270
|
verifiedAt: "2026-09-30",
|
|
@@ -37806,11 +37855,11 @@ var composio_search_catalog_default = {
|
|
|
37806
37855
|
]
|
|
37807
37856
|
};
|
|
37808
37857
|
|
|
37809
|
-
// node_modules
|
|
37858
|
+
// node_modules/@paperclipai/shared/dist/connection-search.js
|
|
37810
37859
|
var STOP_WORDS = new Set("a an and are as at be by can connect connection connections do find for from get help i in is it me my need not of on or our please real service services so some that the their them there this to tool tools use want we with would you your".split(" "));
|
|
37811
37860
|
var GENERIC_NAMES = /* @__PURE__ */ new Set([...STOP_WORDS, "contacts", "email"]);
|
|
37812
37861
|
|
|
37813
|
-
// node_modules
|
|
37862
|
+
// node_modules/@paperclipai/shared/dist/connection-routing.js
|
|
37814
37863
|
var REVIEWED_AGGREGATOR_SUPPORT = [
|
|
37815
37864
|
{
|
|
37816
37865
|
slug: "hubspot",
|
|
@@ -37989,7 +38038,7 @@ for (const [toolkit, name] of composio_search_catalog_default.toolkits) {
|
|
|
37989
38038
|
}
|
|
37990
38039
|
}
|
|
37991
38040
|
|
|
37992
|
-
// node_modules
|
|
38041
|
+
// node_modules/@paperclipai/shared/dist/browser-use.js
|
|
37993
38042
|
var BROWSER_USE_IDLE_MS = 10 * 60 * 1e3;
|
|
37994
38043
|
var browserUseViewportPresetSchema = external_exports.enum([
|
|
37995
38044
|
"fit",
|
|
@@ -38068,7 +38117,7 @@ var BROWSER_USE_TOOLS = [
|
|
|
38068
38117
|
tool2("browser_profiles", "List existing profiles explicitly allowed for this credential. Omit profileId for a fresh browser.", {}, [], true)
|
|
38069
38118
|
];
|
|
38070
38119
|
|
|
38071
|
-
// node_modules
|
|
38120
|
+
// node_modules/@paperclipai/plugin-sdk/dist/environment-creation-cleanup.js
|
|
38072
38121
|
var SCHEMA = "paperclip/environment-creation-cleanup/v1";
|
|
38073
38122
|
var PluginEnvironmentCreationCleanupError = class extends AggregateError {
|
|
38074
38123
|
cleanup;
|
|
@@ -38118,14 +38167,14 @@ function readEnvironmentCreationCleanupError(error62) {
|
|
|
38118
38167
|
};
|
|
38119
38168
|
}
|
|
38120
38169
|
|
|
38121
|
-
// node_modules
|
|
38170
|
+
// node_modules/@paperclipai/plugin-sdk/dist/worker-rpc-host.js
|
|
38122
38171
|
import fs from "node:fs";
|
|
38123
38172
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
38124
38173
|
import path from "node:path";
|
|
38125
38174
|
import { createInterface } from "node:readline";
|
|
38126
38175
|
import { fileURLToPath } from "node:url";
|
|
38127
38176
|
|
|
38128
|
-
// node_modules
|
|
38177
|
+
// node_modules/@paperclipai/plugin-sdk/dist/protocol.js
|
|
38129
38178
|
var JSONRPC_VERSION = "2.0";
|
|
38130
38179
|
var JSONRPC_ERROR_CODES = {
|
|
38131
38180
|
/** Invalid JSON was received by the server. */
|
|
@@ -38272,7 +38321,7 @@ var JsonRpcCallError = class extends Error {
|
|
|
38272
38321
|
}
|
|
38273
38322
|
};
|
|
38274
38323
|
|
|
38275
|
-
// node_modules
|
|
38324
|
+
// node_modules/@paperclipai/plugin-sdk/dist/worker-rpc-host.js
|
|
38276
38325
|
var DEFAULT_RPC_TIMEOUT_MS = 3e4;
|
|
38277
38326
|
function realpathOrResolvedPath(filePath) {
|
|
38278
38327
|
const resolvedPath = path.resolve(filePath);
|
|
@@ -39883,7 +39932,7 @@ function startWorkerRpcHost(options) {
|
|
|
39883
39932
|
|
|
39884
39933
|
// src/manifest.ts
|
|
39885
39934
|
var PLUGIN_ID = "alephoo.autopilot-ops";
|
|
39886
|
-
var PLUGIN_VERSION = "0.1.
|
|
39935
|
+
var PLUGIN_VERSION = "0.1.6";
|
|
39887
39936
|
var DB_NAMESPACE_SLUG = "autopilot_ops";
|
|
39888
39937
|
var PAGE_ROUTE = "autopilot";
|
|
39889
39938
|
var TOOL_NAMES = {
|
|
@@ -39892,10 +39941,14 @@ var TOOL_NAMES = {
|
|
|
39892
39941
|
abrirCaso: "ops_abrir_caso",
|
|
39893
39942
|
transicionar: "ops_transicionar",
|
|
39894
39943
|
registrarAccion: "ops_registrar_accion",
|
|
39895
|
-
consultarIndicador: "ops_consultar_indicador"
|
|
39944
|
+
consultarIndicador: "ops_consultar_indicador",
|
|
39945
|
+
publicarTablero: "ops_publicar_tablero",
|
|
39946
|
+
listarTableros: "ops_listar_tableros"
|
|
39896
39947
|
};
|
|
39897
39948
|
var DATA_KEYS = {
|
|
39898
39949
|
tablero: "tablero",
|
|
39950
|
+
serie: "serie",
|
|
39951
|
+
historialPoliticas: "historial-politicas",
|
|
39899
39952
|
casos: "casos",
|
|
39900
39953
|
caso: "caso",
|
|
39901
39954
|
politicas: "politicas",
|
|
@@ -39904,6 +39957,7 @@ var DATA_KEYS = {
|
|
|
39904
39957
|
var ACTION_KEYS = {
|
|
39905
39958
|
aprobar: "aprobar",
|
|
39906
39959
|
rechazar: "rechazar",
|
|
39960
|
+
marcarCargado: "marcar-cargado",
|
|
39907
39961
|
cambiarPolitica: "cambiar-politica",
|
|
39908
39962
|
abrirCaso: "abrir-caso"
|
|
39909
39963
|
};
|
|
@@ -39912,7 +39966,7 @@ var manifest = {
|
|
|
39912
39966
|
apiVersion: 1,
|
|
39913
39967
|
version: PLUGIN_VERSION,
|
|
39914
39968
|
displayName: "Autopilot Care",
|
|
39915
|
-
description: "Operaci\xF3n aut\xF3noma gobernada para instituciones de salud: workflows determin\xEDsticos por puesto, validaciones, registro de negocio con evidencia, pol\xEDticas (observa / propone / ejecuta / corte) y
|
|
39969
|
+
description: "Operaci\xF3n aut\xF3noma gobernada para instituciones de salud: workflows determin\xEDsticos por puesto, validaciones, registro de negocio con evidencia, pol\xEDticas (observa / propone / ejecuta / aut\xF3nomo / corte), carga manual del equipo del hospital con comprobaci\xF3n del agente, recupero de turnos liberados desde la lista de espera, tableros de gesti\xF3n publicados por agentes y panel del director.",
|
|
39916
39970
|
author: "Alephoo",
|
|
39917
39971
|
categories: ["automation", "ui"],
|
|
39918
39972
|
capabilities: [
|
|
@@ -39962,7 +40016,7 @@ var manifest = {
|
|
|
39962
40016
|
{
|
|
39963
40017
|
name: TOOL_NAMES.abrirCaso,
|
|
39964
40018
|
displayName: "Abrir caso",
|
|
39965
|
-
description:
|
|
40019
|
+
description: 'Abre un caso nuevo en un workflow, en su estado inicial. Workflows: `actualizacion_arancel`, `tarea_operativa`, `recupero_turno` (datos: fecha AAAA-MM-DD, hora HH:MM, profesional, especialidad del turno libre; referencia "AAAA-MM-DD HH:MM \xB7 Profesional"). `referencia` identifica el objeto real (convenio, cuenta, turno) y evita duplicados: si ya existe un caso abierto con la misma referencia, se devuelve ese. Pasar `idempotencyKey` para reintentos seguros.',
|
|
39966
40020
|
parametersSchema: {
|
|
39967
40021
|
type: "object",
|
|
39968
40022
|
properties: {
|
|
@@ -39970,7 +40024,8 @@ var manifest = {
|
|
|
39970
40024
|
referencia: { type: "string" },
|
|
39971
40025
|
titulo: { type: "string" },
|
|
39972
40026
|
datos: { type: "object" },
|
|
39973
|
-
idempotencyKey: { type: "string" }
|
|
40027
|
+
idempotencyKey: { type: "string" },
|
|
40028
|
+
issueId: { type: "string", description: "Tarea de Paperclip que origina el caso (opcional; UUID)." }
|
|
39974
40029
|
},
|
|
39975
40030
|
required: ["workflow", "titulo"]
|
|
39976
40031
|
}
|
|
@@ -39978,7 +40033,7 @@ var manifest = {
|
|
|
39978
40033
|
{
|
|
39979
40034
|
name: TOOL_NAMES.transicionar,
|
|
39980
40035
|
displayName: "Transicionar caso",
|
|
39981
|
-
description: "Aplica una transici\xF3n del workflow al caso (p. ej. `proponer`, `aplicar`, `verificar`). El plugin valida contra la tabla de transiciones, la pol\xEDtica vigente (observa / propone / ejecuta / corte) y las reglas de negocio; si algo falla, el caso no cambia y se devuelve el motivo. Las transiciones humanas (aprobar, rechazar) no est\xE1n disponibles para agentes.",
|
|
40036
|
+
description: "Aplica una transici\xF3n del workflow al caso (p. ej. `proponer`, `aplicar`, `verificar`). El plugin valida contra la tabla de transiciones, la pol\xEDtica vigente (observa / propone / ejecuta / corte) y las reglas de negocio; si algo falla, el caso no cambia y se devuelve el motivo. Las transiciones humanas (aprobar, rechazar, corregir) no est\xE1n disponibles para agentes. Cuando una persona del hospital carga a mano lo aprobado, el caso queda en `aplicado`: el agente lo comprueba releyendo el sistema y llamando `verificar` con `datos.valor_leido`. En `recupero_turno`: `proponer` con solicitud_id, solicitud_estado, solicitud_especialidad, cola (la lista de espera pendiente de esa especialidad tal como se vio: [{solicitud_id, prioridad, alta}]; el plugin la ordena y exige justificaci\xF3n para no elegir la primera) y fuente; `asignar` con accion_id; `verificar` con leido_fecha, leido_hora, leido_profesional y leido_solicitud_id; `sin_candidato` y `descartar` con motivo.",
|
|
39982
40037
|
parametersSchema: {
|
|
39983
40038
|
type: "object",
|
|
39984
40039
|
properties: {
|
|
@@ -40022,6 +40077,31 @@ var manifest = {
|
|
|
40022
40077
|
},
|
|
40023
40078
|
required: ["indicador"]
|
|
40024
40079
|
}
|
|
40080
|
+
},
|
|
40081
|
+
{
|
|
40082
|
+
name: TOOL_NAMES.publicarTablero,
|
|
40083
|
+
displayName: "Publicar tablero",
|
|
40084
|
+
description: "Publica o actualiza un tablero de gesti\xF3n para la direcci\xF3n del hospital, armado sobre datos reales de Alephoo (turnos, facturaci\xF3n, internaci\xF3n, producci\xF3n). `clave` identifica el tablero de forma estable (min\xFAsculas y guiones; volver a publicar con la misma clave lo actualiza en el lugar). `widgets` es la lista de piezas que se muestran, en orden: {tipo:'indicador', etiqueta, valor, unidad?, contexto?, tono?: neutro|ambar|senal|corte} \xB7 {tipo:'barras', titulo, unidad?, series:[{etiqueta, valor}]} \xB7 {tipo:'linea', titulo, unidad?, puntos:[{x, y}]} \xB7 {tipo:'tabla', titulo, columnas:[\u2026], filas:[[\u2026]]} \xB7 {tipo:'texto', titulo?, texto}. Cada widget admite `ancho` 1, 2 o 3 (columnas de 3). `fuentes` lista qu\xE9 se consult\xF3 (p. ej. 'Alephoo \xB7 api-consultas \xB7 turnos 01/09\u201330/09'). Si el pedido vino de una tarea, pasar `issueId`.",
|
|
40085
|
+
parametersSchema: {
|
|
40086
|
+
type: "object",
|
|
40087
|
+
properties: {
|
|
40088
|
+
clave: { type: "string" },
|
|
40089
|
+
titulo: { type: "string" },
|
|
40090
|
+
descripcion: { type: "string" },
|
|
40091
|
+
pedido: { type: "string", description: "Qu\xE9 pidi\xF3 la direcci\xF3n, en sus palabras." },
|
|
40092
|
+
periodo: { type: "string", description: "Per\xEDodo que cubren los datos, p. ej. 'septiembre 2026'." },
|
|
40093
|
+
fuentes: { type: "array", items: { type: "string" } },
|
|
40094
|
+
widgets: { type: "array", items: { type: "object" } },
|
|
40095
|
+
issueId: { type: "string", description: "Tarea de Paperclip que origin\xF3 el tablero (opcional; UUID)." }
|
|
40096
|
+
},
|
|
40097
|
+
required: ["clave", "titulo", "widgets"]
|
|
40098
|
+
}
|
|
40099
|
+
},
|
|
40100
|
+
{
|
|
40101
|
+
name: TOOL_NAMES.listarTableros,
|
|
40102
|
+
displayName: "Listar tableros",
|
|
40103
|
+
description: "Lista los tableros publicados para esta instituci\xF3n (clave, t\xEDtulo, per\xEDodo, fuentes, cu\xE1ndo se actualiz\xF3 y cu\xE1ntos widgets tiene). Usar antes de publicar para reutilizar la clave de un tablero existente en vez de crear uno nuevo. Solo lectura.",
|
|
40104
|
+
parametersSchema: { type: "object", properties: {} }
|
|
40025
40105
|
}
|
|
40026
40106
|
],
|
|
40027
40107
|
apiRoutes: [
|
|
@@ -40065,6 +40145,38 @@ var manifest = {
|
|
|
40065
40145
|
capability: "api.routes.register",
|
|
40066
40146
|
companyResolution: { from: "body", key: "companyId" }
|
|
40067
40147
|
},
|
|
40148
|
+
{
|
|
40149
|
+
routeKey: "marcar-cargado",
|
|
40150
|
+
method: "POST",
|
|
40151
|
+
path: "/casos/:casoId/cargado",
|
|
40152
|
+
auth: "board",
|
|
40153
|
+
capability: "api.routes.register",
|
|
40154
|
+
companyResolution: { from: "body", key: "companyId" }
|
|
40155
|
+
},
|
|
40156
|
+
{
|
|
40157
|
+
routeKey: "version",
|
|
40158
|
+
method: "GET",
|
|
40159
|
+
path: "/version",
|
|
40160
|
+
auth: "board",
|
|
40161
|
+
capability: "api.routes.register",
|
|
40162
|
+
companyResolution: { from: "query", key: "companyId" }
|
|
40163
|
+
},
|
|
40164
|
+
{
|
|
40165
|
+
routeKey: "serie",
|
|
40166
|
+
method: "GET",
|
|
40167
|
+
path: "/serie",
|
|
40168
|
+
auth: "board",
|
|
40169
|
+
capability: "api.routes.register",
|
|
40170
|
+
companyResolution: { from: "query", key: "companyId" }
|
|
40171
|
+
},
|
|
40172
|
+
{
|
|
40173
|
+
routeKey: "historial-politicas",
|
|
40174
|
+
method: "GET",
|
|
40175
|
+
path: "/politicas/historial",
|
|
40176
|
+
auth: "board",
|
|
40177
|
+
capability: "api.routes.register",
|
|
40178
|
+
companyResolution: { from: "query", key: "companyId" }
|
|
40179
|
+
},
|
|
40068
40180
|
{
|
|
40069
40181
|
routeKey: "politicas",
|
|
40070
40182
|
method: "GET",
|
|
@@ -40080,6 +40192,22 @@ var manifest = {
|
|
|
40080
40192
|
auth: "board",
|
|
40081
40193
|
capability: "api.routes.register",
|
|
40082
40194
|
companyResolution: { from: "body", key: "companyId" }
|
|
40195
|
+
},
|
|
40196
|
+
{
|
|
40197
|
+
routeKey: "tableros",
|
|
40198
|
+
method: "GET",
|
|
40199
|
+
path: "/tableros",
|
|
40200
|
+
auth: "board",
|
|
40201
|
+
capability: "api.routes.register",
|
|
40202
|
+
companyResolution: { from: "query", key: "companyId" }
|
|
40203
|
+
},
|
|
40204
|
+
{
|
|
40205
|
+
routeKey: "tablero-publicado",
|
|
40206
|
+
method: "GET",
|
|
40207
|
+
path: "/tableros/:clave",
|
|
40208
|
+
auth: "board",
|
|
40209
|
+
capability: "api.routes.register",
|
|
40210
|
+
companyResolution: { from: "query", key: "companyId" }
|
|
40083
40211
|
}
|
|
40084
40212
|
],
|
|
40085
40213
|
ui: {
|
|
@@ -40107,7 +40235,7 @@ var manifest_default = manifest;
|
|
|
40107
40235
|
import { randomUUID } from "node:crypto";
|
|
40108
40236
|
|
|
40109
40237
|
// src/workflows.ts
|
|
40110
|
-
var MODOS = ["corte", "observa", "propone", "ejecuta"];
|
|
40238
|
+
var MODOS = ["corte", "observa", "propone", "ejecuta", "autonomo"];
|
|
40111
40239
|
var MODO_POR_DEFECTO = "propone";
|
|
40112
40240
|
function num(v) {
|
|
40113
40241
|
if (typeof v === "number" && Number.isFinite(v)) return v;
|
|
@@ -40123,6 +40251,8 @@ function texto(v) {
|
|
|
40123
40251
|
var ok = (regla, detalle) => ({ regla, ok: true, detalle });
|
|
40124
40252
|
var falla = (regla, detalle) => ({ regla, ok: false, detalle });
|
|
40125
40253
|
var VARIACION_MAX_SIN_JUSTIFICACION = 0.5;
|
|
40254
|
+
var VARIACION_MAX_AUTONOMA = 0.2;
|
|
40255
|
+
var excepcion = (regla, dispara, detalle) => ({ regla, ok: !dispara, detalle, excepcion: true });
|
|
40126
40256
|
var actualizacionArancel = {
|
|
40127
40257
|
clave: "actualizacion_arancel",
|
|
40128
40258
|
nombre: "Actualizaci\xF3n de aranceles y honorarios",
|
|
@@ -40166,6 +40296,20 @@ var actualizacionArancel = {
|
|
|
40166
40296
|
}
|
|
40167
40297
|
}
|
|
40168
40298
|
return out;
|
|
40299
|
+
},
|
|
40300
|
+
autonomia: {
|
|
40301
|
+
aSinExcepcion: "aprobado",
|
|
40302
|
+
excepciones: (caso, datos) => {
|
|
40303
|
+
const nuevo = num(datos.valor_nuevo);
|
|
40304
|
+
const actual = num(datos.valor_actual ?? caso.datos.valor_actual);
|
|
40305
|
+
const variacion = nuevo !== null && actual !== null && actual > 0 ? Math.abs(nuevo - actual) / actual : null;
|
|
40306
|
+
return [
|
|
40307
|
+
excepcion("variacion_supera_umbral", variacion !== null && variacion > VARIACION_MAX_AUTONOMA, variacion === null ? "sin valor actual para comparar" : `${(variacion * 100).toFixed(1)}% (umbral ${VARIACION_MAX_AUTONOMA * 100}%)`),
|
|
40308
|
+
excepcion("sin_valor_actual", actual === null, actual === null ? "no se ley\xF3 el valor actual en el sistema" : "valor actual le\xEDdo"),
|
|
40309
|
+
excepcion("reintento_tras_diferencias", caso.estado === "con_diferencias", caso.estado === "con_diferencias" ? "la carga anterior no coincidi\xF3 al comprobar" : "primer intento"),
|
|
40310
|
+
excepcion("baja_de_valor", nuevo !== null && actual !== null && nuevo < actual, nuevo !== null && actual !== null && nuevo < actual ? "el valor nuevo es menor que el actual" : "no baja")
|
|
40311
|
+
];
|
|
40312
|
+
}
|
|
40169
40313
|
}
|
|
40170
40314
|
},
|
|
40171
40315
|
{
|
|
@@ -40189,6 +40333,7 @@ var actualizacionArancel = {
|
|
|
40189
40333
|
a: "aplicado",
|
|
40190
40334
|
actor: ["agente", "humano"],
|
|
40191
40335
|
nivelRequerido: "ejecuta",
|
|
40336
|
+
cargaManual: true,
|
|
40192
40337
|
descripcion: "Cargar el valor aprobado en el sistema de gesti\xF3n y registrar la acci\xF3n.",
|
|
40193
40338
|
validar: (_caso, datos) => [
|
|
40194
40339
|
texto(datos.accion_id) ? ok("accion_registrada") : falla("accion_registrada", "aplicar requiere accion_id de la escritura registrada con ops_registrar_accion")
|
|
@@ -40203,6 +40348,20 @@ var actualizacionArancel = {
|
|
|
40203
40348
|
descripcion: "Releer el valor en el sistema y compararlo con el aprobado. Si no coincide, el caso queda con diferencias.",
|
|
40204
40349
|
validar: (_caso, datos) => [num(datos.valor_leido) !== null ? ok("valor_leido_presente") : falla("valor_leido_presente", "verificar requiere valor_leido num\xE9rico")]
|
|
40205
40350
|
},
|
|
40351
|
+
{
|
|
40352
|
+
// Una carga manual que no coincidió se corrige en el sistema y se vuelve a comprobar:
|
|
40353
|
+
// el valor aprobado no cambia, así que no hace falta otra aprobación. El agente, en
|
|
40354
|
+
// cambio, vuelve a proponer (y en autónomo eso dispara la excepción de reintento).
|
|
40355
|
+
via: "corregir",
|
|
40356
|
+
de: ["con_diferencias"],
|
|
40357
|
+
a: "aplicado",
|
|
40358
|
+
actor: ["humano"],
|
|
40359
|
+
cargaManual: true,
|
|
40360
|
+
descripcion: "Corregir a mano la carga en el sistema de gesti\xF3n (el valor aprobado no cambia) y volver a comprobar.",
|
|
40361
|
+
validar: (_caso, datos) => [
|
|
40362
|
+
texto(datos.accion_id) ? ok("accion_registrada") : falla("accion_registrada", "corregir requiere accion_id de la escritura registrada con la carga corregida")
|
|
40363
|
+
]
|
|
40364
|
+
},
|
|
40206
40365
|
{
|
|
40207
40366
|
via: "cancelar",
|
|
40208
40367
|
de: ["detectado", "pendiente_aprobacion", "aprobado", "con_diferencias"],
|
|
@@ -40232,7 +40391,11 @@ var tareaOperativa = {
|
|
|
40232
40391
|
actor: ["agente", "humano"],
|
|
40233
40392
|
nivelRequerido: "propone",
|
|
40234
40393
|
descripcion: "Proponer el resultado para aprobaci\xF3n.",
|
|
40235
|
-
validar: (_caso, datos) => [texto(datos.resultado) ? ok("resultado_presente") : falla("resultado_presente", "proponer requiere un resultado descripto")]
|
|
40394
|
+
validar: (_caso, datos) => [texto(datos.resultado) ? ok("resultado_presente") : falla("resultado_presente", "proponer requiere un resultado descripto")],
|
|
40395
|
+
autonomia: {
|
|
40396
|
+
aSinExcepcion: "cerrada",
|
|
40397
|
+
excepciones: (_caso, datos) => [excepcion("resultado_con_observaciones", Boolean(texto(datos.observaciones)), texto(datos.observaciones) ? "el resultado trae observaciones para una persona" : "sin observaciones")]
|
|
40398
|
+
}
|
|
40236
40399
|
},
|
|
40237
40400
|
{ via: "aprobar", de: ["pendiente_aprobacion"], a: "cerrada", actor: ["humano"], descripcion: "Aprobaci\xF3n y cierre." },
|
|
40238
40401
|
{
|
|
@@ -40246,9 +40409,255 @@ var tareaOperativa = {
|
|
|
40246
40409
|
{ via: "cancelar", de: ["abierta", "en_curso", "pendiente_aprobacion"], a: "cancelada", actor: ["humano"], descripcion: "Cancelaci\xF3n manual." }
|
|
40247
40410
|
]
|
|
40248
40411
|
};
|
|
40412
|
+
var TOPE_DIARIO_RECUPERO = 20;
|
|
40413
|
+
var TITULOS = /* @__PURE__ */ new Set(["dr", "dra", "doctor", "doctora", "lic", "licenciado", "licenciada", "prof"]);
|
|
40414
|
+
function normalizarNombre(v) {
|
|
40415
|
+
const s = texto(v);
|
|
40416
|
+
if (!s) return null;
|
|
40417
|
+
const palabras = s.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, " ").split(" ").filter((p) => p && !TITULOS.has(p));
|
|
40418
|
+
return palabras.length ? palabras.sort().join(" ") : null;
|
|
40419
|
+
}
|
|
40420
|
+
function horaHM(v) {
|
|
40421
|
+
const s = texto(v);
|
|
40422
|
+
const m = s ? /^(\d{1,2}):(\d{2})(?::\d{2})?$/.exec(s) : null;
|
|
40423
|
+
if (!m) return null;
|
|
40424
|
+
const h = Number(m[1]);
|
|
40425
|
+
const min = Number(m[2]);
|
|
40426
|
+
return h < 24 && min < 60 ? `${String(h).padStart(2, "0")}:${m[2]}` : null;
|
|
40427
|
+
}
|
|
40428
|
+
function refExterna(v) {
|
|
40429
|
+
if (typeof v === "number" && Number.isFinite(v)) return String(v);
|
|
40430
|
+
return texto(v);
|
|
40431
|
+
}
|
|
40432
|
+
function fechaAISO(v) {
|
|
40433
|
+
const s = texto(v);
|
|
40434
|
+
if (!s) return null;
|
|
40435
|
+
if (fechaISO(s.slice(0, 10))) return s.slice(0, 10);
|
|
40436
|
+
const m = /^(\d{1,2})\/(\d{1,2})\/(\d{4})/.exec(s);
|
|
40437
|
+
if (!m) return null;
|
|
40438
|
+
const iso3 = `${m[3]}-${m[2].padStart(2, "0")}-${m[1].padStart(2, "0")}`;
|
|
40439
|
+
return fechaISO(iso3) ? iso3 : null;
|
|
40440
|
+
}
|
|
40441
|
+
function leerCola(v) {
|
|
40442
|
+
if (!Array.isArray(v) || v.length === 0) return null;
|
|
40443
|
+
const out = [];
|
|
40444
|
+
for (const e of v) {
|
|
40445
|
+
if (!e || typeof e !== "object") return null;
|
|
40446
|
+
const r = e;
|
|
40447
|
+
const id = refExterna(r.solicitud_id);
|
|
40448
|
+
if (!id) return null;
|
|
40449
|
+
out.push({ solicitud_id: id, prioridad: texto(r.prioridad), alta: fechaAISO(r.alta) });
|
|
40450
|
+
}
|
|
40451
|
+
return out;
|
|
40452
|
+
}
|
|
40453
|
+
function ordenarCola(cola) {
|
|
40454
|
+
const pronta = (e) => normalizarNombre(e.prioridad)?.includes("pronta") ? 0 : 1;
|
|
40455
|
+
return [...cola].sort((a, b) => pronta(a) - pronta(b) || (a.alta ?? "9999-12-31").localeCompare(b.alta ?? "9999-12-31") || (Number(a.solicitud_id) || 0) - (Number(b.solicitud_id) || 0) || a.solicitud_id.localeCompare(b.solicitud_id));
|
|
40456
|
+
}
|
|
40457
|
+
function posicionEnCola(datos, enCurso = []) {
|
|
40458
|
+
const cola = leerCola(datos.cola);
|
|
40459
|
+
const elegida = refExterna(datos.solicitud_id);
|
|
40460
|
+
const fuera = new Set(enCurso);
|
|
40461
|
+
const vigente = cola?.filter((e) => e.solicitud_id === elegida || !fuera.has(e.solicitud_id)) ?? null;
|
|
40462
|
+
if (!vigente || !elegida) return { posicion: null, total: vigente?.length ?? 0 };
|
|
40463
|
+
const i = ordenarCola(vigente).findIndex((e) => e.solicitud_id === elegida);
|
|
40464
|
+
return { posicion: i === -1 ? null : i + 1, total: vigente.length };
|
|
40465
|
+
}
|
|
40466
|
+
function fueraDePreferencia(preferencia, hora) {
|
|
40467
|
+
const p = normalizarNombre(preferencia);
|
|
40468
|
+
if (!p || !hora) return false;
|
|
40469
|
+
if (p.includes("manana")) return hora >= "13:00";
|
|
40470
|
+
if (p.includes("tarde")) return hora < "13:00";
|
|
40471
|
+
return false;
|
|
40472
|
+
}
|
|
40473
|
+
function validarLugar(caso, datos, contexto) {
|
|
40474
|
+
const l = { ...caso.datos, ...datos };
|
|
40475
|
+
const completo = fechaISO(l.fecha) && horaHM(l.hora) !== null && texto(l.profesional) !== null && texto(l.especialidad) !== null;
|
|
40476
|
+
const out = [completo ? ok("lugar_completo") : falla("lugar_completo", "el turno liberado necesita fecha (AAAA-MM-DD), hora (HH:MM), profesional y especialidad")];
|
|
40477
|
+
if (fechaISO(l.fecha) && contexto.hoy) {
|
|
40478
|
+
const fecha = String(l.fecha);
|
|
40479
|
+
const hora = horaHM(l.hora);
|
|
40480
|
+
const futuro = fecha > contexto.hoy || fecha === contexto.hoy && (!contexto.horaActual || hora !== null && hora > contexto.horaActual);
|
|
40481
|
+
out.push(futuro ? ok("lugar_futuro") : falla("lugar_futuro", `el turno del ${fecha}${hora ? ` a las ${hora}` : ""} ya pas\xF3: no se puede recuperar`));
|
|
40482
|
+
}
|
|
40483
|
+
return out;
|
|
40484
|
+
}
|
|
40485
|
+
var recuperoTurno = {
|
|
40486
|
+
clave: "recupero_turno",
|
|
40487
|
+
nombre: "Recupero de turnos liberados",
|
|
40488
|
+
puesto: "Pacientes y agenda",
|
|
40489
|
+
descripcion: "Detecta un turno que se liber\xF3 en la agenda, elige de la lista de espera (solicitudes de turno) a quien corresponde por especialidad, prioridad y antig\xFCedad, le asigna el turno en el sistema de gesti\xF3n y comprueba reley\xE9ndolo que qued\xF3 asignado.",
|
|
40490
|
+
inicial: "detectado",
|
|
40491
|
+
estados: [
|
|
40492
|
+
"detectado",
|
|
40493
|
+
"pendiente_aprobacion",
|
|
40494
|
+
"aprobado",
|
|
40495
|
+
"ofrecido",
|
|
40496
|
+
"aceptado",
|
|
40497
|
+
"asignado",
|
|
40498
|
+
"verificado",
|
|
40499
|
+
"con_diferencias",
|
|
40500
|
+
"sin_candidato",
|
|
40501
|
+
"rechazado",
|
|
40502
|
+
"cancelado"
|
|
40503
|
+
],
|
|
40504
|
+
finalesOk: ["verificado"],
|
|
40505
|
+
finalesNoOk: ["sin_candidato", "rechazado", "cancelado"],
|
|
40506
|
+
minutosAbsorbidos: 15,
|
|
40507
|
+
transiciones: [
|
|
40508
|
+
{
|
|
40509
|
+
via: "proponer",
|
|
40510
|
+
de: ["detectado", "con_diferencias"],
|
|
40511
|
+
a: "pendiente_aprobacion",
|
|
40512
|
+
actor: ["agente", "humano"],
|
|
40513
|
+
nivelRequerido: "propone",
|
|
40514
|
+
descripcion: "Proponer a qui\xE9n darle el turno liberado: una solicitud pendiente de la misma especialidad, informando la cola completa que se vio; el plugin la ordena (pronta respuesta primero, despu\xE9s antig\xFCedad) y elegir otra que no sea la primera exige justificaci\xF3n.",
|
|
40515
|
+
validar: (caso, datos, contexto) => {
|
|
40516
|
+
const l = { ...caso.datos, ...datos };
|
|
40517
|
+
const out = validarLugar(caso, datos, contexto);
|
|
40518
|
+
out.push(refExterna(datos.solicitud_id) ? ok("solicitud_presente") : falla("solicitud_presente", "proponer requiere solicitud_id: la solicitud de turno de la lista de espera"));
|
|
40519
|
+
const estado = normalizarNombre(datos.solicitud_estado);
|
|
40520
|
+
out.push(estado === "pendiente" ? ok("solicitud_pendiente") : falla("solicitud_pendiente", `la solicitud tiene que estar pendiente (est\xE1: ${texto(datos.solicitud_estado) ?? "sin informar"})`));
|
|
40521
|
+
const esp = normalizarNombre(l.especialidad);
|
|
40522
|
+
const espSolicitud = normalizarNombre(datos.solicitud_especialidad);
|
|
40523
|
+
out.push(esp && espSolicitud && esp === espSolicitud ? ok("especialidad_coincide") : falla("especialidad_coincide", `la solicitud es de ${texto(datos.solicitud_especialidad) ?? "(sin especialidad)"} y el turno es de ${texto(l.especialidad) ?? "(sin especialidad)"}`));
|
|
40524
|
+
out.push(contexto.solicitudEnOtroCaso ? falla("solicitud_libre", `esa solicitud ya tiene otro recupero en curso o asignado (${contexto.solicitudEnOtroCaso})`) : ok("solicitud_libre"));
|
|
40525
|
+
const { posicion, total } = posicionEnCola(datos, contexto.solicitudesEnCurso);
|
|
40526
|
+
if (!leerCola(datos.cola)) out.push(falla("orden_de_la_cola", "cola es obligatoria: la lista de espera pendiente de esa especialidad tal como se vio, [{solicitud_id, prioridad, alta}]"));
|
|
40527
|
+
else if (posicion === null) out.push(falla("orden_de_la_cola", "la solicitud elegida no est\xE1 en la cola informada"));
|
|
40528
|
+
else if (posicion > 1 && !texto(datos.justificacion)) out.push(falla("orden_de_la_cola", `es la ${posicion}.\xAA de ${total} en la cola: pasarla adelante de las anteriores requiere justificacion`));
|
|
40529
|
+
else out.push(ok("orden_de_la_cola", posicion === 1 ? `primera de ${total} en la cola` : `${posicion}.\xAA de ${total} en la cola, con justificaci\xF3n`));
|
|
40530
|
+
out.push(texto(datos.fuente) ? ok("fuente_presente") : falla("fuente_presente", "fuente (pantalla donde se vio el turno libre y la solicitud) es obligatoria"));
|
|
40531
|
+
return out;
|
|
40532
|
+
},
|
|
40533
|
+
autonomia: {
|
|
40534
|
+
aSinExcepcion: "aprobado",
|
|
40535
|
+
excepciones: (caso, datos, contexto) => {
|
|
40536
|
+
const l = { ...caso.datos, ...datos };
|
|
40537
|
+
const { posicion, total } = posicionEnCola(datos, contexto.solicitudesEnCurso);
|
|
40538
|
+
const pedido = normalizarNombre(datos.solicitud_profesional);
|
|
40539
|
+
const profesional = normalizarNombre(l.profesional);
|
|
40540
|
+
const paraHoy = Boolean(contexto.hoy && l.fecha === contexto.hoy);
|
|
40541
|
+
const asignados = contexto.asignacionesHoy ?? 0;
|
|
40542
|
+
const fuera = fueraDePreferencia(datos.solicitud_preferencia_horaria, horaHM(l.hora));
|
|
40543
|
+
return [
|
|
40544
|
+
excepcion("saltea_la_cola", posicion !== null && posicion > 1, posicion !== null && posicion > 1 ? `es la ${posicion}.\xAA de ${total} en la cola` : "primera de la cola"),
|
|
40545
|
+
excepcion("profesional_distinto", Boolean(pedido && profesional && pedido !== profesional), pedido ? pedido === profesional ? "es el profesional que pidi\xF3" : `pidi\xF3 a ${texto(datos.solicitud_profesional)}` : "no pidi\xF3 un profesional en particular"),
|
|
40546
|
+
excepcion("fuera_de_preferencia_horaria", fuera, fuera ? `prefiere ${texto(datos.solicitud_preferencia_horaria)} y el turno es a las ${horaHM(l.hora)}` : "dentro de su preferencia o sin preferencia"),
|
|
40547
|
+
excepcion("turno_para_hoy", paraHoy, paraHoy ? "el turno es para hoy" : "no es para hoy"),
|
|
40548
|
+
excepcion("sobreturno", l.sobreturno === true, l.sobreturno === true ? "es un sobreturno" : "turno de la grilla"),
|
|
40549
|
+
excepcion("reintento_tras_diferencias", caso.estado === "con_diferencias", caso.estado === "con_diferencias" ? "la asignaci\xF3n anterior no coincidi\xF3 al comprobar" : "primer intento"),
|
|
40550
|
+
excepcion("tope_diario", asignados >= TOPE_DIARIO_RECUPERO, `${asignados} turnos asignados hoy (tope ${TOPE_DIARIO_RECUPERO})`)
|
|
40551
|
+
];
|
|
40552
|
+
}
|
|
40553
|
+
}
|
|
40554
|
+
},
|
|
40555
|
+
{
|
|
40556
|
+
via: "aprobar",
|
|
40557
|
+
de: ["pendiente_aprobacion"],
|
|
40558
|
+
a: "aprobado",
|
|
40559
|
+
actor: ["humano"],
|
|
40560
|
+
descripcion: "Aprobaci\xF3n del responsable del hospital."
|
|
40561
|
+
},
|
|
40562
|
+
{
|
|
40563
|
+
via: "rechazar",
|
|
40564
|
+
de: ["pendiente_aprobacion"],
|
|
40565
|
+
a: "rechazado",
|
|
40566
|
+
actor: ["humano"],
|
|
40567
|
+
descripcion: "Rechazo con motivo.",
|
|
40568
|
+
validar: (_caso, datos) => [texto(datos.motivo) ? ok("motivo_presente") : falla("motivo_presente", "el rechazo requiere motivo")]
|
|
40569
|
+
},
|
|
40570
|
+
{
|
|
40571
|
+
// Paso opcional: donde el hospital quiere que el paciente acepte antes de asignarle el turno.
|
|
40572
|
+
via: "ofrecer",
|
|
40573
|
+
de: ["aprobado"],
|
|
40574
|
+
a: "ofrecido",
|
|
40575
|
+
actor: ["agente", "humano"],
|
|
40576
|
+
nivelRequerido: "ejecuta",
|
|
40577
|
+
descripcion: "Ofrecerle el turno al paciente antes de asignarlo (paso opcional seg\xFAn el hospital).",
|
|
40578
|
+
validar: (_caso, datos) => [texto(datos.canal) ? ok("canal_informado") : falla("canal_informado", "ofrecer requiere canal (tel\xE9fono, WhatsApp, correo)")]
|
|
40579
|
+
},
|
|
40580
|
+
{
|
|
40581
|
+
via: "aceptar",
|
|
40582
|
+
de: ["ofrecido"],
|
|
40583
|
+
a: "aceptado",
|
|
40584
|
+
actor: ["agente", "humano"],
|
|
40585
|
+
nivelRequerido: "observa",
|
|
40586
|
+
descripcion: "El paciente acept\xF3 el turno ofrecido.",
|
|
40587
|
+
validar: (_caso, datos) => [texto(datos.respuesta) ? ok("respuesta_registrada") : falla("respuesta_registrada", "aceptar requiere la respuesta del paciente")]
|
|
40588
|
+
},
|
|
40589
|
+
{
|
|
40590
|
+
via: "no_acepta",
|
|
40591
|
+
de: ["ofrecido"],
|
|
40592
|
+
a: "detectado",
|
|
40593
|
+
actor: ["agente", "humano"],
|
|
40594
|
+
nivelRequerido: "observa",
|
|
40595
|
+
descripcion: "El paciente no acept\xF3 o no respondi\xF3: el turno vuelve a buscar candidato.",
|
|
40596
|
+
validar: (_caso, datos) => [texto(datos.motivo) ? ok("motivo_presente") : falla("motivo_presente", "no_acepta requiere motivo (no contest\xF3, no puede ese d\xEDa\u2026)")]
|
|
40597
|
+
},
|
|
40598
|
+
{
|
|
40599
|
+
via: "asignar",
|
|
40600
|
+
de: ["aprobado", "aceptado"],
|
|
40601
|
+
a: "asignado",
|
|
40602
|
+
actor: ["agente", "humano"],
|
|
40603
|
+
nivelRequerido: "ejecuta",
|
|
40604
|
+
cargaManual: true,
|
|
40605
|
+
descripcion: "Dar el turno a la solicitud aprobada en el sistema de gesti\xF3n y registrar la acci\xF3n.",
|
|
40606
|
+
validar: (caso, datos, contexto) => [
|
|
40607
|
+
...validarLugar(caso, {}, contexto),
|
|
40608
|
+
texto(datos.accion_id) ? ok("accion_registrada") : falla("accion_registrada", "asignar requiere accion_id de la escritura registrada con ops_registrar_accion")
|
|
40609
|
+
]
|
|
40610
|
+
},
|
|
40611
|
+
{
|
|
40612
|
+
via: "verificar",
|
|
40613
|
+
de: ["asignado"],
|
|
40614
|
+
a: (caso, datos) => {
|
|
40615
|
+
const l = caso.datos;
|
|
40616
|
+
const coincide = texto(datos.leido_fecha) === texto(l.fecha) && horaHM(datos.leido_hora) === horaHM(l.hora) && normalizarNombre(datos.leido_profesional) === normalizarNombre(l.profesional) && (refExterna(datos.leido_solicitud_id) === null || refExterna(datos.leido_solicitud_id) === refExterna(l.solicitud_id));
|
|
40617
|
+
return coincide ? "verificado" : "con_diferencias";
|
|
40618
|
+
},
|
|
40619
|
+
actor: ["agente", "humano", "sistema"],
|
|
40620
|
+
nivelRequerido: "observa",
|
|
40621
|
+
descripcion: "Releer en el sistema el turno de la solicitud y compararlo con el aprobado (fecha, hora y profesional). Si no coincide, el caso queda con diferencias.",
|
|
40622
|
+
validar: (_caso, datos) => [
|
|
40623
|
+
fechaISO(datos.leido_fecha) && horaHM(datos.leido_hora) !== null && texto(datos.leido_profesional) ? ok("turno_leido_presente") : falla("turno_leido_presente", "verificar requiere leido_fecha (AAAA-MM-DD), leido_hora (HH:MM) y leido_profesional, rele\xEDdos en el sistema")
|
|
40624
|
+
]
|
|
40625
|
+
},
|
|
40626
|
+
{
|
|
40627
|
+
via: "corregir",
|
|
40628
|
+
de: ["con_diferencias"],
|
|
40629
|
+
a: "asignado",
|
|
40630
|
+
actor: ["humano"],
|
|
40631
|
+
cargaManual: true,
|
|
40632
|
+
descripcion: "Corregir a mano el turno en el sistema de gesti\xF3n (lo aprobado no cambia) y volver a comprobar.",
|
|
40633
|
+
validar: (_caso, datos) => [
|
|
40634
|
+
texto(datos.accion_id) ? ok("accion_registrada") : falla("accion_registrada", "corregir requiere accion_id de la escritura registrada con la correcci\xF3n")
|
|
40635
|
+
]
|
|
40636
|
+
},
|
|
40637
|
+
{
|
|
40638
|
+
via: "sin_candidato",
|
|
40639
|
+
de: ["detectado"],
|
|
40640
|
+
a: "sin_candidato",
|
|
40641
|
+
actor: ["agente", "humano"],
|
|
40642
|
+
nivelRequerido: "observa",
|
|
40643
|
+
descripcion: "No hay solicitudes pendientes que puedan tomar el turno liberado: queda libre.",
|
|
40644
|
+
validar: (_caso, datos) => [texto(datos.motivo) ? ok("motivo_presente") : falla("motivo_presente", "sin_candidato requiere motivo (qu\xE9 se busc\xF3 y por qu\xE9 no hay a qui\xE9n darlo)")]
|
|
40645
|
+
},
|
|
40646
|
+
{
|
|
40647
|
+
via: "descartar",
|
|
40648
|
+
de: ["detectado", "pendiente_aprobacion", "aprobado", "ofrecido", "aceptado"],
|
|
40649
|
+
a: "cancelado",
|
|
40650
|
+
actor: ["agente", "humano"],
|
|
40651
|
+
nivelRequerido: "observa",
|
|
40652
|
+
descripcion: "El turno ya no est\xE1 libre (lo ocup\xF3 otra persona, se anul\xF3 la agenda o pas\xF3 la hora): se cierra sin asignar.",
|
|
40653
|
+
validar: (_caso, datos) => [texto(datos.motivo) ? ok("motivo_presente") : falla("motivo_presente", "descartar requiere motivo")]
|
|
40654
|
+
}
|
|
40655
|
+
]
|
|
40656
|
+
};
|
|
40249
40657
|
var WORKFLOWS = {
|
|
40250
40658
|
[actualizacionArancel.clave]: actualizacionArancel,
|
|
40251
|
-
[tareaOperativa.clave]: tareaOperativa
|
|
40659
|
+
[tareaOperativa.clave]: tareaOperativa,
|
|
40660
|
+
[recuperoTurno.clave]: recuperoTurno
|
|
40252
40661
|
};
|
|
40253
40662
|
function getWorkflow(clave) {
|
|
40254
40663
|
return WORKFLOWS[clave] ?? null;
|
|
@@ -40256,7 +40665,7 @@ function getWorkflow(clave) {
|
|
|
40256
40665
|
function listarWorkflows() {
|
|
40257
40666
|
return Object.values(WORKFLOWS);
|
|
40258
40667
|
}
|
|
40259
|
-
var ORDEN_MODO = { corte: 0, observa: 1, propone: 2, ejecuta: 3 };
|
|
40668
|
+
var ORDEN_MODO = { corte: 0, observa: 1, propone: 2, ejecuta: 3, autonomo: 4 };
|
|
40260
40669
|
function modoHabilita(modo, nivelRequerido) {
|
|
40261
40670
|
if (modo === "corte") return false;
|
|
40262
40671
|
const requerido = nivelRequerido ?? "observa";
|
|
@@ -40265,13 +40674,14 @@ function modoHabilita(modo, nivelRequerido) {
|
|
|
40265
40674
|
function evaluarTransicion(input2) {
|
|
40266
40675
|
const { caso, via, actor } = input2;
|
|
40267
40676
|
const datos = input2.datos ?? {};
|
|
40677
|
+
const contexto = input2.contexto ?? {};
|
|
40268
40678
|
const wf = getWorkflow(caso.workflow);
|
|
40269
40679
|
if (!wf) {
|
|
40270
40680
|
return { ok: false, codigo: "workflow_desconocido", motivo: `workflow desconocido: ${caso.workflow}`, validaciones: [] };
|
|
40271
40681
|
}
|
|
40272
|
-
const def2 = wf.transiciones.find((
|
|
40682
|
+
const def2 = wf.transiciones.find((t3) => t3.via === via);
|
|
40273
40683
|
if (!def2) {
|
|
40274
|
-
const disponibles = wf.transiciones.filter((
|
|
40684
|
+
const disponibles = wf.transiciones.filter((t3) => t3.de.includes(caso.estado)).map((t3) => t3.via);
|
|
40275
40685
|
return { ok: false, codigo: "via_desconocida", motivo: `la transici\xF3n "${via}" no existe en ${wf.clave}; desde "${caso.estado}" se puede: ${disponibles.join(", ") || "ninguna"}`, validaciones: [] };
|
|
40276
40686
|
}
|
|
40277
40687
|
if (!def2.de.includes(caso.estado)) {
|
|
@@ -40284,12 +40694,21 @@ function evaluarTransicion(input2) {
|
|
|
40284
40694
|
const motivo = input2.modo === "corte" ? `el workflow ${wf.clave} est\xE1 cortado para agentes en esta instituci\xF3n` : `la pol\xEDtica vigente es "${input2.modo}" y "${via}" requiere "${def2.nivelRequerido ?? "observa"}"`;
|
|
40285
40695
|
return { ok: false, codigo: "politica", motivo, validaciones: [] };
|
|
40286
40696
|
}
|
|
40287
|
-
const validaciones = def2.validar ? def2.validar(caso, datos) : [];
|
|
40697
|
+
const validaciones = def2.validar ? def2.validar(caso, datos, contexto) : [];
|
|
40288
40698
|
const fallidas = validaciones.filter((v) => !v.ok);
|
|
40289
40699
|
if (fallidas.length > 0) {
|
|
40290
40700
|
return { ok: false, codigo: "validacion", motivo: fallidas.map((f) => `${f.regla}: ${f.detalle ?? "fall\xF3"}`).join("; "), validaciones };
|
|
40291
40701
|
}
|
|
40292
|
-
|
|
40702
|
+
let a = typeof def2.a === "function" ? def2.a(caso, datos) : def2.a;
|
|
40703
|
+
let autoaprobado = false;
|
|
40704
|
+
if (actor === "agente" && input2.modo === "autonomo" && def2.autonomia) {
|
|
40705
|
+
const excepciones = def2.autonomia.excepciones(caso, datos, contexto);
|
|
40706
|
+
validaciones.push(...excepciones);
|
|
40707
|
+
if (excepciones.every((e) => e.ok)) {
|
|
40708
|
+
a = def2.autonomia.aSinExcepcion;
|
|
40709
|
+
autoaprobado = true;
|
|
40710
|
+
}
|
|
40711
|
+
}
|
|
40293
40712
|
const esFinalOk = wf.finalesOk.includes(a);
|
|
40294
40713
|
return {
|
|
40295
40714
|
ok: true,
|
|
@@ -40298,13 +40717,17 @@ function evaluarTransicion(input2) {
|
|
|
40298
40717
|
via,
|
|
40299
40718
|
validaciones,
|
|
40300
40719
|
minutosAbsorbidos: esFinalOk ? wf.minutosAbsorbidos : 0,
|
|
40301
|
-
esFinal: esFinalOk || wf.finalesNoOk.includes(a)
|
|
40720
|
+
esFinal: esFinalOk || wf.finalesNoOk.includes(a),
|
|
40721
|
+
autoaprobado
|
|
40302
40722
|
};
|
|
40303
40723
|
}
|
|
40304
40724
|
function transicionesDisponibles(caso, actor) {
|
|
40305
40725
|
const wf = getWorkflow(caso.workflow);
|
|
40306
40726
|
if (!wf) return [];
|
|
40307
|
-
return wf.transiciones.filter((
|
|
40727
|
+
return wf.transiciones.filter((t3) => t3.de.includes(caso.estado) && (!actor || t3.actor.includes(actor)));
|
|
40728
|
+
}
|
|
40729
|
+
function transicionCargaManual(caso) {
|
|
40730
|
+
return transicionesDisponibles(caso, "humano").find((t3) => t3.cargaManual) ?? null;
|
|
40308
40731
|
}
|
|
40309
40732
|
function esModo(v) {
|
|
40310
40733
|
return typeof v === "string" && MODOS.includes(v);
|
|
@@ -40572,6 +40995,32 @@ async function abrirCaso(ctx, input2) {
|
|
|
40572
40995
|
}
|
|
40573
40996
|
};
|
|
40574
40997
|
}
|
|
40998
|
+
var ZONA_HOSPITAL = "America/Argentina/Buenos_Aires";
|
|
40999
|
+
function ahoraEnHospital(ahora = /* @__PURE__ */ new Date()) {
|
|
41000
|
+
const partes = new Intl.DateTimeFormat("en-CA", { timeZone: ZONA_HOSPITAL, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).formatToParts(ahora);
|
|
41001
|
+
const p = (tipo) => partes.find((x) => x.type === tipo)?.value ?? "00";
|
|
41002
|
+
const hoy = `${p("year")}-${p("month")}-${p("day")}`;
|
|
41003
|
+
return { hoy, hora: `${p("hour")}:${p("minute")}`, inicioDelDia: /* @__PURE__ */ new Date(`${hoy}T03:00:00Z`) };
|
|
41004
|
+
}
|
|
41005
|
+
async function contextoDe(ctx, companyId, caso, via, datos) {
|
|
41006
|
+
const { hoy, hora, inicioDelDia } = ahoraEnHospital();
|
|
41007
|
+
const contexto = { hoy, horaActual: hora };
|
|
41008
|
+
if (caso.workflow !== "recupero_turno" || via !== "proponer") return contexto;
|
|
41009
|
+
const otros = await ctx.db.query(
|
|
41010
|
+
`SELECT id, datos->>'solicitud_id' AS solicitud_id FROM ${t(ctx, "caso")} WHERE company_id = $1 AND workflow = $2 AND id <> $3 AND datos->>'solicitud_id' IS NOT NULL AND estado NOT IN ($4, $5, $6) LIMIT 1000`,
|
|
41011
|
+
[companyId, "recupero_turno", caso.id, "sin_candidato", "rechazado", "cancelado"]
|
|
41012
|
+
);
|
|
41013
|
+
contexto.solicitudesEnCurso = [...new Set(otros.map((r) => String(r.solicitud_id)))];
|
|
41014
|
+
const solicitud = refExterna(datos.solicitud_id);
|
|
41015
|
+
const mismo = solicitud ? otros.find((r) => String(r.solicitud_id) === solicitud) : void 0;
|
|
41016
|
+
contexto.solicitudEnOtroCaso = mismo ? String(mismo.id) : null;
|
|
41017
|
+
const asignados = await ctx.db.query(
|
|
41018
|
+
`SELECT count(*)::int AS cantidad FROM ${t(ctx, "transicion")} WHERE company_id = $1 AND via = $2 AND created_at >= $3`,
|
|
41019
|
+
[companyId, "asignar", inicioDelDia.toISOString()]
|
|
41020
|
+
);
|
|
41021
|
+
contexto.asignacionesHoy = Number(asignados[0]?.cantidad ?? 0);
|
|
41022
|
+
return contexto;
|
|
41023
|
+
}
|
|
40575
41024
|
async function transicionar(ctx, input2) {
|
|
40576
41025
|
const caso = await leerCaso(ctx, input2.companyId, input2.casoId);
|
|
40577
41026
|
if (!caso) throw new OpsError("caso_inexistente", `no existe el caso ${input2.casoId} en esta instituci\xF3n`);
|
|
@@ -40586,14 +41035,41 @@ async function transicionar(ctx, input2) {
|
|
|
40586
41035
|
const datos = { ...input2.datos ?? {} };
|
|
40587
41036
|
if (input2.motivo && !datos.motivo) datos.motivo = input2.motivo;
|
|
40588
41037
|
const modo = input2.actor.tipo === "agente" ? await obtenerModo(ctx, input2.companyId, caso.workflow) : "ejecuta";
|
|
40589
|
-
const
|
|
41038
|
+
const contexto = await contextoDe(ctx, input2.companyId, caso, input2.via, datos);
|
|
41039
|
+
const resultado = evaluarTransicion({ caso, via: input2.via, actor: input2.actor.tipo, datos, modo, contexto });
|
|
40590
41040
|
if (!resultado.ok) {
|
|
40591
41041
|
throw new OpsError(resultado.codigo, resultado.motivo, { validaciones: resultado.validaciones, estado: caso.estado });
|
|
40592
41042
|
}
|
|
41043
|
+
const accionId = str(datos.accion_id);
|
|
41044
|
+
if (accionId) {
|
|
41045
|
+
const rows = await ctx.db.query(
|
|
41046
|
+
`SELECT id, caso_id, tipo, resultado FROM ${t(ctx, "accion")} WHERE company_id = $1 AND id = $2 LIMIT 1`,
|
|
41047
|
+
[input2.companyId, accionId]
|
|
41048
|
+
);
|
|
41049
|
+
const accion = rows[0];
|
|
41050
|
+
const problema = !accion ? `accion_id ${accionId} no existe en esta instituci\xF3n` : String(accion.caso_id) !== caso.id ? `la acci\xF3n ${accionId} pertenece a otro caso` : String(accion.tipo) !== "escritura" ? `la acci\xF3n ${accionId} es de tipo ${String(accion.tipo)}; aplicar exige una escritura registrada` : String(accion.resultado) !== "ok" ? `la acci\xF3n ${accionId} termin\xF3 con resultado ${String(accion.resultado)}` : null;
|
|
41051
|
+
if (problema) {
|
|
41052
|
+
throw new OpsError("validacion", `accion_registrada: ${problema}`, { validaciones: [{ regla: "accion_registrada", ok: false, detalle: problema }], estado: caso.estado });
|
|
41053
|
+
}
|
|
41054
|
+
}
|
|
41055
|
+
const excepcionesEvaluadas = resultado.validaciones.filter((v) => v.excepcion);
|
|
41056
|
+
if (excepcionesEvaluadas.length > 0) datos.excepciones = excepcionesEvaluadas.filter((v) => !v.ok).map((v) => v.regla);
|
|
41057
|
+
else if (resultado.via === "proponer") datos.excepciones = [];
|
|
41058
|
+
else delete datos.excepciones;
|
|
41059
|
+
if (caso.workflow === "recupero_turno" && resultado.via === "proponer") {
|
|
41060
|
+
const enCurso = new Set(contexto.solicitudesEnCurso ?? []);
|
|
41061
|
+
const { posicion, total } = posicionEnCola(datos, enCurso);
|
|
41062
|
+
datos.posicion_en_cola = posicion;
|
|
41063
|
+
datos.largo_cola = total;
|
|
41064
|
+
const cola = leerCola(datos.cola);
|
|
41065
|
+
const elegida = cola?.find((e) => e.solicitud_id === refExterna(datos.solicitud_id));
|
|
41066
|
+
if (elegida?.prioridad && !str(datos.solicitud_prioridad)) datos.solicitud_prioridad = elegida.prioridad;
|
|
41067
|
+
if (cola) datos.cola = ordenarCola(cola).map((e) => enCurso.has(e.solicitud_id) && e.solicitud_id !== elegida?.solicitud_id ? { ...e, en_otro_recupero: true } : e);
|
|
41068
|
+
}
|
|
40593
41069
|
const transicionId = randomUUID();
|
|
40594
41070
|
await ctx.db.execute(
|
|
40595
41071
|
`INSERT INTO ${t(ctx, "transicion")} (id, company_id, caso_id, de_estado, a_estado, via, actor_tipo, actor_id, run_id, motivo, datos, validaciones, idempotency_key) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11::jsonb, $12::jsonb, $13)`,
|
|
40596
|
-
[transicionId, input2.companyId, caso.id, resultado.de, resultado.a, resultado.via, input2.actor.tipo, input2.actor.id, input2.actor.runId ?? null, input2.motivo ?? null, JSON.stringify(datos), JSON.stringify(resultado.validaciones), idem]
|
|
41072
|
+
[transicionId, input2.companyId, caso.id, resultado.de, resultado.a, resultado.via, input2.actor.tipo, input2.actor.id, input2.actor.runId ?? null, resultado.autoaprobado ? input2.motivo ?? "Aprobado autom\xE1ticamente: pol\xEDtica aut\xF3noma, sin excepciones" : input2.motivo ?? null, JSON.stringify(resultado.autoaprobado ? { ...datos, autoaprobado: true } : datos), JSON.stringify(resultado.validaciones), idem]
|
|
40597
41073
|
);
|
|
40598
41074
|
const nuevosDatos = { ...caso.datos, ...datos };
|
|
40599
41075
|
delete nuevosDatos.motivo;
|
|
@@ -40638,7 +41114,7 @@ async function registrarAccion(ctx, input2) {
|
|
|
40638
41114
|
if (!objetivo) throw new OpsError("objetivo_requerido", "objetivo es obligatorio (qu\xE9 pantalla, endpoint o archivo se toc\xF3)");
|
|
40639
41115
|
if (input2.tipo === "escritura" && input2.actor.tipo === "agente") {
|
|
40640
41116
|
const modo = await obtenerModo(ctx, input2.companyId, caso.workflow);
|
|
40641
|
-
if (modo
|
|
41117
|
+
if (!modoHabilita(modo, "ejecuta")) throw new OpsError("politica", `la pol\xEDtica vigente de ${caso.workflow} es "${modo}": un agente no puede registrar escrituras sobre el sistema del hospital`);
|
|
40642
41118
|
}
|
|
40643
41119
|
const id = randomUUID();
|
|
40644
41120
|
const evidencia = input2.evidencia ?? {};
|
|
@@ -40664,6 +41140,89 @@ async function registrarAccion(ctx, input2) {
|
|
|
40664
41140
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
40665
41141
|
};
|
|
40666
41142
|
}
|
|
41143
|
+
function numero(v) {
|
|
41144
|
+
if (typeof v === "number" && Number.isFinite(v)) return v;
|
|
41145
|
+
if (typeof v === "string" && v.trim() !== "" && Number.isFinite(Number(v))) return Number(v);
|
|
41146
|
+
return null;
|
|
41147
|
+
}
|
|
41148
|
+
function motivoSinCarga(caso) {
|
|
41149
|
+
const wf = getWorkflow(caso.workflow);
|
|
41150
|
+
if (!wf || !wf.transiciones.some((t3) => t3.cargaManual)) return `el workflow ${caso.workflow} no tiene carga manual en el sistema de gesti\xF3n`;
|
|
41151
|
+
if (wf.finalesOk.includes(caso.estado)) return "ya est\xE1 cargado y comprobado";
|
|
41152
|
+
if (wf.finalesNoOk.includes(caso.estado)) return `est\xE1 ${caso.estado}: no se carga`;
|
|
41153
|
+
if (wf.transiciones.some((t3) => t3.cargaManual && t3.a === caso.estado)) return "ya figura como cargado; falta la comprobaci\xF3n del puesto";
|
|
41154
|
+
return "todav\xEDa no est\xE1 aprobado: no hay nada para cargar";
|
|
41155
|
+
}
|
|
41156
|
+
async function registrarCargaManual(ctx, input2) {
|
|
41157
|
+
if (input2.actor.tipo !== "humano") {
|
|
41158
|
+
throw new OpsError("actor_no_permitido", "la carga manual la declara una persona del hospital; un agente carga con ops_registrar_accion y la transici\xF3n aplicar");
|
|
41159
|
+
}
|
|
41160
|
+
const caso = await leerCaso(ctx, input2.companyId, input2.casoId);
|
|
41161
|
+
if (!caso) throw new OpsError("caso_inexistente", `no existe el caso ${input2.casoId} en esta instituci\xF3n`);
|
|
41162
|
+
const idem = str(input2.idempotencyKey);
|
|
41163
|
+
if (idem) {
|
|
41164
|
+
const prev = await ctx.db.query(
|
|
41165
|
+
`SELECT id, caso_id, de_estado, a_estado, via, actor_tipo, actor_id, motivo, datos, validaciones, created_at FROM ${t(ctx, "transicion")} WHERE company_id = $1 AND idempotency_key = $2 LIMIT 1`,
|
|
41166
|
+
[input2.companyId, idem]
|
|
41167
|
+
);
|
|
41168
|
+
if (prev[0]) {
|
|
41169
|
+
const transicion = mapTransicion(prev[0]);
|
|
41170
|
+
return { caso, transicion, accion: null, via: transicion.via, repetida: true };
|
|
41171
|
+
}
|
|
41172
|
+
}
|
|
41173
|
+
const def2 = transicionCargaManual(caso);
|
|
41174
|
+
if (!def2) throw new OpsError("estado_invalido", motivoSinCarga(caso), { estado: caso.estado });
|
|
41175
|
+
const sinValor = input2.valorCargado === void 0 || input2.valorCargado === null || input2.valorCargado === "";
|
|
41176
|
+
const valorCargado = sinValor ? null : numero(input2.valorCargado);
|
|
41177
|
+
if (!sinValor && valorCargado === null) {
|
|
41178
|
+
throw new OpsError("validacion", "valor_cargado: debe ser un n\xFAmero", { validaciones: [{ regla: "valor_cargado_numerico", ok: false, detalle: "debe ser un n\xFAmero" }], estado: caso.estado });
|
|
41179
|
+
}
|
|
41180
|
+
const { hoy, hora } = ahoraEnHospital();
|
|
41181
|
+
const previa = evaluarTransicion({ caso, via: def2.via, actor: "humano", datos: { accion_id: "(por registrar)" }, modo: "ejecuta", contexto: { hoy, horaActual: hora } });
|
|
41182
|
+
if (!previa.ok) throw new OpsError(previa.codigo, previa.motivo, { validaciones: previa.validaciones, estado: caso.estado });
|
|
41183
|
+
const persona = str(input2.persona);
|
|
41184
|
+
const comentario = str(input2.comentario);
|
|
41185
|
+
const accion = await registrarAccion(ctx, {
|
|
41186
|
+
companyId: input2.companyId,
|
|
41187
|
+
casoId: caso.id,
|
|
41188
|
+
tipo: "escritura",
|
|
41189
|
+
conector: "manual",
|
|
41190
|
+
objetivo: `Alephoo \xB7 ${caso.titulo}${caso.referencia ? ` (ref ${caso.referencia})` : ""}`,
|
|
41191
|
+
resultado: "ok",
|
|
41192
|
+
evidencia: {
|
|
41193
|
+
...persona ? { cargado_por: persona } : {},
|
|
41194
|
+
...valorCargado !== null ? { valor_cargado: valorCargado } : {},
|
|
41195
|
+
...caso.datos.valor_nuevo !== void 0 ? { valor_aprobado: caso.datos.valor_nuevo } : {},
|
|
41196
|
+
...caso.datos.vigencia_desde !== void 0 ? { vigencia_desde: caso.datos.vigencia_desde } : {},
|
|
41197
|
+
...comentario ? { nota: comentario } : {}
|
|
41198
|
+
},
|
|
41199
|
+
detalle: comentario,
|
|
41200
|
+
actor: input2.actor
|
|
41201
|
+
});
|
|
41202
|
+
const datos = {
|
|
41203
|
+
accion_id: accion.id,
|
|
41204
|
+
...persona ? { cargado_por: persona } : {},
|
|
41205
|
+
...valorCargado !== null ? { valor_cargado: valorCargado } : {},
|
|
41206
|
+
// Una lectura anterior (la que dio diferencias) ya no describe lo que hay en el sistema.
|
|
41207
|
+
valor_leido: null
|
|
41208
|
+
};
|
|
41209
|
+
try {
|
|
41210
|
+
const r = await transicionar(ctx, { companyId: input2.companyId, casoId: caso.id, via: def2.via, datos, motivo: comentario, idempotencyKey: idem, actor: input2.actor });
|
|
41211
|
+
return { caso: r.caso, transicion: r.transicion, accion, via: def2.via, repetida: r.repetida };
|
|
41212
|
+
} catch (err) {
|
|
41213
|
+
if (idem) {
|
|
41214
|
+
const prev = await ctx.db.query(
|
|
41215
|
+
`SELECT id, caso_id, de_estado, a_estado, via, actor_tipo, actor_id, motivo, datos, validaciones, created_at FROM ${t(ctx, "transicion")} WHERE company_id = $1 AND idempotency_key = $2 LIMIT 1`,
|
|
41216
|
+
[input2.companyId, idem]
|
|
41217
|
+
);
|
|
41218
|
+
if (prev[0]) {
|
|
41219
|
+
const transicion = mapTransicion(prev[0]);
|
|
41220
|
+
return { caso: await leerCaso(ctx, input2.companyId, caso.id) ?? caso, transicion, accion: null, via: transicion.via, repetida: true };
|
|
41221
|
+
}
|
|
41222
|
+
}
|
|
41223
|
+
throw err;
|
|
41224
|
+
}
|
|
41225
|
+
}
|
|
40667
41226
|
function finalesOk() {
|
|
40668
41227
|
return [...new Set(listarWorkflows().flatMap((w) => w.finalesOk))];
|
|
40669
41228
|
}
|
|
@@ -40754,6 +41313,67 @@ async function tablero(ctx, companyId, diasInput) {
|
|
|
40754
41313
|
politicas
|
|
40755
41314
|
};
|
|
40756
41315
|
}
|
|
41316
|
+
async function serie(ctx, companyId, diasInput) {
|
|
41317
|
+
const dias = Math.min(Math.max(Number(diasInput ?? 30) || 30, 1), 365);
|
|
41318
|
+
const p = [companyId, dias];
|
|
41319
|
+
const [abiertos, cerrados, acciones] = await Promise.all([
|
|
41320
|
+
ctx.db.query(
|
|
41321
|
+
`SELECT to_char(created_at, 'YYYY-MM-DD') AS dia, count(*)::int AS cantidad FROM ${t(ctx, "caso")} WHERE company_id = $1 AND created_at >= now() - ($2::int * interval '1 day') GROUP BY 1 ORDER BY 1`,
|
|
41322
|
+
p
|
|
41323
|
+
),
|
|
41324
|
+
ctx.db.query(
|
|
41325
|
+
`SELECT to_char(cerrado_at, 'YYYY-MM-DD') AS dia, estado, count(*)::int AS cantidad, coalesce(sum(minutos_absorbidos), 0)::int AS minutos FROM ${t(ctx, "caso")} WHERE company_id = $1 AND cerrado_at IS NOT NULL AND cerrado_at >= now() - ($2::int * interval '1 day') GROUP BY 1, 2 ORDER BY 1`,
|
|
41326
|
+
p
|
|
41327
|
+
),
|
|
41328
|
+
ctx.db.query(
|
|
41329
|
+
`SELECT to_char(created_at, 'YYYY-MM-DD') AS dia, count(*)::int AS cantidad FROM ${t(ctx, "accion")} WHERE company_id = $1 AND created_at >= now() - ($2::int * interval '1 day') GROUP BY 1 ORDER BY 1`,
|
|
41330
|
+
p
|
|
41331
|
+
)
|
|
41332
|
+
]);
|
|
41333
|
+
const okSet = new Set(finalesOk());
|
|
41334
|
+
const puntos = /* @__PURE__ */ new Map();
|
|
41335
|
+
const desde = new Date(Date.now() - (dias - 1) * 864e5);
|
|
41336
|
+
for (let i = 0; i < dias; i += 1) {
|
|
41337
|
+
const d = new Date(desde.getTime() + i * 864e5).toISOString().slice(0, 10);
|
|
41338
|
+
puntos.set(d, { dia: d, abiertos: 0, cerradosOk: 0, rechazados: 0, minutos: 0, acciones: 0 });
|
|
41339
|
+
}
|
|
41340
|
+
const descartado = { dia: "", abiertos: 0, cerradosOk: 0, rechazados: 0, minutos: 0, acciones: 0 };
|
|
41341
|
+
const punto = (dia) => {
|
|
41342
|
+
const k = typeof dia === "string" ? dia.slice(0, 10) : "";
|
|
41343
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(k)) return descartado;
|
|
41344
|
+
if (!puntos.has(k)) puntos.set(k, { dia: k, abiertos: 0, cerradosOk: 0, rechazados: 0, minutos: 0, acciones: 0 });
|
|
41345
|
+
return puntos.get(k);
|
|
41346
|
+
};
|
|
41347
|
+
for (const r of abiertos) punto(r.dia).abiertos += Number(r.cantidad ?? 0);
|
|
41348
|
+
for (const r of cerrados) {
|
|
41349
|
+
const pt = punto(r.dia);
|
|
41350
|
+
if (okSet.has(String(r.estado))) {
|
|
41351
|
+
pt.cerradosOk += Number(r.cantidad ?? 0);
|
|
41352
|
+
pt.minutos += Number(r.minutos ?? 0);
|
|
41353
|
+
} else if (String(r.estado).startsWith("rechazad")) {
|
|
41354
|
+
pt.rechazados += Number(r.cantidad ?? 0);
|
|
41355
|
+
}
|
|
41356
|
+
}
|
|
41357
|
+
for (const r of acciones) punto(r.dia).acciones += Number(r.cantidad ?? 0);
|
|
41358
|
+
return { dias, desde: desde.toISOString().slice(0, 10), puntos: [...puntos.values()].sort((a, b) => a.dia.localeCompare(b.dia)) };
|
|
41359
|
+
}
|
|
41360
|
+
async function historialPoliticas(ctx, companyId, limitInput) {
|
|
41361
|
+
const limit = Math.min(Math.max(Number(limitInput ?? 50) || 50, 1), 200);
|
|
41362
|
+
const rows = await ctx.db.query(
|
|
41363
|
+
`SELECT id, workflow, modo_anterior, modo_nuevo, motivo, actor_tipo, actor_id, created_at FROM ${t(ctx, "politica_historial")} WHERE company_id = $1 ORDER BY created_at DESC LIMIT $2`,
|
|
41364
|
+
[companyId, limit]
|
|
41365
|
+
);
|
|
41366
|
+
return rows.map((r) => ({
|
|
41367
|
+
id: String(r.id),
|
|
41368
|
+
workflow: String(r.workflow),
|
|
41369
|
+
modoAnterior: r.modo_anterior ?? null,
|
|
41370
|
+
modoNuevo: String(r.modo_nuevo),
|
|
41371
|
+
motivo: r.motivo ?? null,
|
|
41372
|
+
actorTipo: String(r.actor_tipo),
|
|
41373
|
+
actorId: r.actor_id ?? null,
|
|
41374
|
+
createdAt: iso(r.created_at)
|
|
41375
|
+
}));
|
|
41376
|
+
}
|
|
40757
41377
|
async function indicador(ctx, input2) {
|
|
40758
41378
|
const tb = await tablero(ctx, input2.companyId, input2.dias);
|
|
40759
41379
|
const filtro = (wf) => !input2.workflow || wf === input2.workflow;
|
|
@@ -40776,6 +41396,200 @@ function errorParaAgente(err) {
|
|
|
40776
41396
|
return { error: `error_interno: ${message2}`, data: { codigo: "error_interno" } };
|
|
40777
41397
|
}
|
|
40778
41398
|
|
|
41399
|
+
// src/tableros.ts
|
|
41400
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
41401
|
+
var TIPOS = ["indicador", "barras", "linea", "tabla", "texto"];
|
|
41402
|
+
var TONOS = ["neutro", "ambar", "senal", "corte"];
|
|
41403
|
+
var MAX_WIDGETS = 24;
|
|
41404
|
+
function t2(ctx, table) {
|
|
41405
|
+
return `${ctx.db.namespace}.${table}`;
|
|
41406
|
+
}
|
|
41407
|
+
function iso2(v) {
|
|
41408
|
+
if (v instanceof Date) return v.toISOString();
|
|
41409
|
+
if (typeof v === "string") return v;
|
|
41410
|
+
return "";
|
|
41411
|
+
}
|
|
41412
|
+
function arr(v) {
|
|
41413
|
+
if (Array.isArray(v)) return v;
|
|
41414
|
+
if (typeof v === "string") {
|
|
41415
|
+
try {
|
|
41416
|
+
const p = JSON.parse(v);
|
|
41417
|
+
return Array.isArray(p) ? p : [];
|
|
41418
|
+
} catch {
|
|
41419
|
+
return [];
|
|
41420
|
+
}
|
|
41421
|
+
}
|
|
41422
|
+
return [];
|
|
41423
|
+
}
|
|
41424
|
+
function texto2(v, max, campo, problemas, obligatorio = false) {
|
|
41425
|
+
if (v === void 0 || v === null || v === "") {
|
|
41426
|
+
if (obligatorio) problemas.push(`${campo} es obligatorio`);
|
|
41427
|
+
return void 0;
|
|
41428
|
+
}
|
|
41429
|
+
if (typeof v !== "string") {
|
|
41430
|
+
problemas.push(`${campo} debe ser texto`);
|
|
41431
|
+
return void 0;
|
|
41432
|
+
}
|
|
41433
|
+
const s = v.trim();
|
|
41434
|
+
if (s.length > max) problemas.push(`${campo} supera ${max} caracteres`);
|
|
41435
|
+
return s.slice(0, max);
|
|
41436
|
+
}
|
|
41437
|
+
function numero2(v, campo, problemas) {
|
|
41438
|
+
const n = typeof v === "number" ? v : typeof v === "string" ? Number(v) : NaN;
|
|
41439
|
+
if (!Number.isFinite(n)) problemas.push(`${campo} debe ser un n\xFAmero`);
|
|
41440
|
+
return Number.isFinite(n) ? n : 0;
|
|
41441
|
+
}
|
|
41442
|
+
function ancho(v) {
|
|
41443
|
+
return v === 1 || v === 2 || v === 3 ? v : void 0;
|
|
41444
|
+
}
|
|
41445
|
+
function validarWidgets(entrada) {
|
|
41446
|
+
const problemas = [];
|
|
41447
|
+
const lista = Array.isArray(entrada) ? entrada : [];
|
|
41448
|
+
if (!Array.isArray(entrada) || lista.length === 0) problemas.push("widgets debe ser una lista con al menos un elemento");
|
|
41449
|
+
if (lista.length > MAX_WIDGETS) problemas.push(`widgets admite hasta ${MAX_WIDGETS} elementos`);
|
|
41450
|
+
const salida = [];
|
|
41451
|
+
lista.slice(0, MAX_WIDGETS).forEach((w, i) => {
|
|
41452
|
+
const ref = `widgets[${i}]`;
|
|
41453
|
+
const o = w && typeof w === "object" && !Array.isArray(w) ? w : {};
|
|
41454
|
+
const tipo = o.tipo;
|
|
41455
|
+
if (typeof tipo !== "string" || !TIPOS.includes(tipo)) {
|
|
41456
|
+
problemas.push(`${ref}.tipo debe ser uno de ${TIPOS.join(", ")}`);
|
|
41457
|
+
return;
|
|
41458
|
+
}
|
|
41459
|
+
const a = ancho(o.ancho);
|
|
41460
|
+
switch (tipo) {
|
|
41461
|
+
case "indicador": {
|
|
41462
|
+
const etiqueta = texto2(o.etiqueta, 80, `${ref}.etiqueta`, problemas, true) ?? "";
|
|
41463
|
+
const valor = typeof o.valor === "number" && Number.isFinite(o.valor) ? o.valor : texto2(o.valor, 40, `${ref}.valor`, problemas, true) ?? "";
|
|
41464
|
+
const tono = typeof o.tono === "string" && TONOS.includes(o.tono) ? o.tono : void 0;
|
|
41465
|
+
if (o.tono !== void 0 && !tono) problemas.push(`${ref}.tono debe ser uno de ${TONOS.join(", ")}`);
|
|
41466
|
+
salida.push({ tipo, etiqueta, valor, unidad: texto2(o.unidad, 16, `${ref}.unidad`, problemas), contexto: texto2(o.contexto, 160, `${ref}.contexto`, problemas), tono, ancho: a });
|
|
41467
|
+
break;
|
|
41468
|
+
}
|
|
41469
|
+
case "barras": {
|
|
41470
|
+
const titulo = texto2(o.titulo, 120, `${ref}.titulo`, problemas, true) ?? "";
|
|
41471
|
+
const series = arr(o.series);
|
|
41472
|
+
if (series.length === 0 || series.length > 40) problemas.push(`${ref}.series debe tener entre 1 y 40 barras`);
|
|
41473
|
+
salida.push({
|
|
41474
|
+
tipo,
|
|
41475
|
+
titulo,
|
|
41476
|
+
unidad: texto2(o.unidad, 16, `${ref}.unidad`, problemas),
|
|
41477
|
+
series: series.slice(0, 40).map((s, j) => {
|
|
41478
|
+
const so = s && typeof s === "object" ? s : {};
|
|
41479
|
+
return { etiqueta: texto2(so.etiqueta, 60, `${ref}.series[${j}].etiqueta`, problemas, true) ?? "", valor: numero2(so.valor, `${ref}.series[${j}].valor`, problemas) };
|
|
41480
|
+
}),
|
|
41481
|
+
ancho: a
|
|
41482
|
+
});
|
|
41483
|
+
break;
|
|
41484
|
+
}
|
|
41485
|
+
case "linea": {
|
|
41486
|
+
const titulo = texto2(o.titulo, 120, `${ref}.titulo`, problemas, true) ?? "";
|
|
41487
|
+
const puntos = arr(o.puntos);
|
|
41488
|
+
if (puntos.length === 0 || puntos.length > 400) problemas.push(`${ref}.puntos debe tener entre 1 y 400 puntos`);
|
|
41489
|
+
salida.push({
|
|
41490
|
+
tipo,
|
|
41491
|
+
titulo,
|
|
41492
|
+
unidad: texto2(o.unidad, 16, `${ref}.unidad`, problemas),
|
|
41493
|
+
puntos: puntos.slice(0, 400).map((p, j) => {
|
|
41494
|
+
const po = p && typeof p === "object" ? p : {};
|
|
41495
|
+
return { x: texto2(po.x, 40, `${ref}.puntos[${j}].x`, problemas, true) ?? "", y: numero2(po.y, `${ref}.puntos[${j}].y`, problemas) };
|
|
41496
|
+
}),
|
|
41497
|
+
ancho: a
|
|
41498
|
+
});
|
|
41499
|
+
break;
|
|
41500
|
+
}
|
|
41501
|
+
case "tabla": {
|
|
41502
|
+
const titulo = texto2(o.titulo, 120, `${ref}.titulo`, problemas, true) ?? "";
|
|
41503
|
+
const columnas = arr(o.columnas);
|
|
41504
|
+
if (columnas.length === 0 || columnas.length > 12) problemas.push(`${ref}.columnas debe tener entre 1 y 12 columnas`);
|
|
41505
|
+
const filas = arr(o.filas);
|
|
41506
|
+
if (filas.length > 200) problemas.push(`${ref}.filas admite hasta 200 filas`);
|
|
41507
|
+
const cols = columnas.slice(0, 12).map((c, j) => texto2(c, 60, `${ref}.columnas[${j}]`, problemas, true) ?? "");
|
|
41508
|
+
salida.push({
|
|
41509
|
+
tipo,
|
|
41510
|
+
titulo,
|
|
41511
|
+
columnas: cols,
|
|
41512
|
+
filas: filas.slice(0, 200).map((f, j) => {
|
|
41513
|
+
const celdas = arr(f);
|
|
41514
|
+
if (celdas.length !== cols.length) problemas.push(`${ref}.filas[${j}] tiene ${celdas.length} celdas y la tabla ${cols.length} columnas`);
|
|
41515
|
+
return celdas.slice(0, cols.length).map((c) => typeof c === "number" && Number.isFinite(c) ? c : c === null || c === void 0 ? null : String(c).slice(0, 200));
|
|
41516
|
+
}),
|
|
41517
|
+
ancho: a
|
|
41518
|
+
});
|
|
41519
|
+
break;
|
|
41520
|
+
}
|
|
41521
|
+
case "texto": {
|
|
41522
|
+
salida.push({ tipo, titulo: texto2(o.titulo, 120, `${ref}.titulo`, problemas), texto: texto2(o.texto, 4e3, `${ref}.texto`, problemas, true) ?? "", ancho: a });
|
|
41523
|
+
break;
|
|
41524
|
+
}
|
|
41525
|
+
}
|
|
41526
|
+
});
|
|
41527
|
+
if (problemas.length) throw new OpsError("tablero_invalido", `el tablero no se puede publicar: ${problemas.slice(0, 12).join("; ")}${problemas.length > 12 ? ` (y ${problemas.length - 12} m\xE1s)` : ""}`, { problemas });
|
|
41528
|
+
return salida;
|
|
41529
|
+
}
|
|
41530
|
+
function mapTablero(r) {
|
|
41531
|
+
return {
|
|
41532
|
+
id: String(r.id),
|
|
41533
|
+
companyId: String(r.company_id),
|
|
41534
|
+
clave: String(r.clave),
|
|
41535
|
+
titulo: String(r.titulo),
|
|
41536
|
+
descripcion: r.descripcion ?? null,
|
|
41537
|
+
pedido: r.pedido ?? null,
|
|
41538
|
+
periodo: r.periodo ?? null,
|
|
41539
|
+
fuentes: arr(r.fuentes).map(String),
|
|
41540
|
+
widgets: arr(r.widgets),
|
|
41541
|
+
agenteId: r.agente_id ?? null,
|
|
41542
|
+
issueId: r.issue_id ?? null,
|
|
41543
|
+
publicadoPorTipo: String(r.publicado_por_tipo),
|
|
41544
|
+
publicadoPorId: r.publicado_por_id ?? null,
|
|
41545
|
+
versiones: Number(r.versiones ?? 1),
|
|
41546
|
+
createdAt: iso2(r.created_at),
|
|
41547
|
+
updatedAt: iso2(r.updated_at)
|
|
41548
|
+
};
|
|
41549
|
+
}
|
|
41550
|
+
var COLS = "id, company_id, clave, titulo, descripcion, pedido, periodo, fuentes, widgets, agente_id, issue_id, publicado_por_tipo, publicado_por_id, versiones, created_at, updated_at";
|
|
41551
|
+
var CLAVE_RE = /^[a-z0-9][a-z0-9-]{1,60}$/;
|
|
41552
|
+
async function listarTableros(ctx, companyId) {
|
|
41553
|
+
const rows = await ctx.db.query(`SELECT ${COLS} FROM ${t2(ctx, "tablero")} WHERE company_id = $1 ORDER BY updated_at DESC`, [companyId]);
|
|
41554
|
+
return rows.map(mapTablero);
|
|
41555
|
+
}
|
|
41556
|
+
async function leerTablero(ctx, companyId, clave) {
|
|
41557
|
+
const rows = await ctx.db.query(`SELECT ${COLS} FROM ${t2(ctx, "tablero")} WHERE company_id = $1 AND clave = $2 LIMIT 1`, [companyId, clave]);
|
|
41558
|
+
return rows[0] ? mapTablero(rows[0]) : null;
|
|
41559
|
+
}
|
|
41560
|
+
async function publicarTablero(ctx, input2) {
|
|
41561
|
+
const clave = typeof input2.clave === "string" ? input2.clave.trim().toLowerCase() : "";
|
|
41562
|
+
if (!CLAVE_RE.test(clave)) throw new OpsError("clave_invalida", "clave debe ser un identificador estable en min\xFAsculas (letras, n\xFAmeros y guiones, 2 a 61 caracteres), p. ej. turnos-ausentismo");
|
|
41563
|
+
const titulo = typeof input2.titulo === "string" ? input2.titulo.trim().slice(0, 140) : "";
|
|
41564
|
+
if (!titulo) throw new OpsError("titulo_requerido", "titulo es obligatorio");
|
|
41565
|
+
const widgets = validarWidgets(input2.widgets);
|
|
41566
|
+
const fuentes = arr(input2.fuentes).filter((f) => typeof f === "string" && f.trim()).map((f) => String(f).trim().slice(0, 120)).slice(0, 12);
|
|
41567
|
+
const limpio = (v, max) => typeof v === "string" && v.trim() ? v.trim().slice(0, max) : null;
|
|
41568
|
+
const previo = await leerTablero(ctx, input2.companyId, clave);
|
|
41569
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
41570
|
+
if (previo) {
|
|
41571
|
+
await ctx.db.execute(
|
|
41572
|
+
`UPDATE ${t2(ctx, "tablero")} SET titulo = $3, descripcion = $4, pedido = COALESCE($5, pedido), periodo = $6, fuentes = $7::jsonb, widgets = $8::jsonb, agente_id = COALESCE($9, agente_id), issue_id = COALESCE($10, issue_id), publicado_por_tipo = $11, publicado_por_id = $12, versiones = versiones + 1, updated_at = now() WHERE company_id = $1 AND clave = $2`,
|
|
41573
|
+
[input2.companyId, clave, titulo, limpio(input2.descripcion, 600), limpio(input2.pedido, 1e3), limpio(input2.periodo, 80), JSON.stringify(fuentes), JSON.stringify(widgets), input2.agenteId ?? null, input2.issueId ?? null, input2.actor.tipo, input2.actor.id]
|
|
41574
|
+
);
|
|
41575
|
+
await ctx.activity.log({ companyId: input2.companyId, message: `Autopilot Care: tablero \xAB${titulo}\xBB actualizado (${clave}, versi\xF3n ${previo.versiones + 1})`, metadata: { clave, widgets: widgets.length, agentId: input2.agenteId ?? null, issueId: input2.issueId ?? null } });
|
|
41576
|
+
return {
|
|
41577
|
+
creado: false,
|
|
41578
|
+
tablero: { ...previo, titulo, descripcion: limpio(input2.descripcion, 600), pedido: limpio(input2.pedido, 1e3) ?? previo.pedido, periodo: limpio(input2.periodo, 80), fuentes, widgets, agenteId: input2.agenteId ?? previo.agenteId, issueId: input2.issueId ?? previo.issueId, publicadoPorTipo: input2.actor.tipo, publicadoPorId: input2.actor.id, versiones: previo.versiones + 1, updatedAt: now }
|
|
41579
|
+
};
|
|
41580
|
+
}
|
|
41581
|
+
const id = randomUUID2();
|
|
41582
|
+
await ctx.db.execute(
|
|
41583
|
+
`INSERT INTO ${t2(ctx, "tablero")} (id, company_id, clave, titulo, descripcion, pedido, periodo, fuentes, widgets, agente_id, issue_id, publicado_por_tipo, publicado_por_id) VALUES ($1, $2, $3, $4, $5, $6, $7, $8::jsonb, $9::jsonb, $10, $11, $12, $13)`,
|
|
41584
|
+
[id, input2.companyId, clave, titulo, limpio(input2.descripcion, 600), limpio(input2.pedido, 1e3), limpio(input2.periodo, 80), JSON.stringify(fuentes), JSON.stringify(widgets), input2.agenteId ?? null, input2.issueId ?? null, input2.actor.tipo, input2.actor.id]
|
|
41585
|
+
);
|
|
41586
|
+
await ctx.activity.log({ companyId: input2.companyId, message: `Autopilot Care: tablero \xAB${titulo}\xBB publicado (${clave})`, metadata: { clave, widgets: widgets.length, agentId: input2.agenteId ?? null, issueId: input2.issueId ?? null } });
|
|
41587
|
+
return {
|
|
41588
|
+
creado: true,
|
|
41589
|
+
tablero: { id, companyId: input2.companyId, clave, titulo, descripcion: limpio(input2.descripcion, 600), pedido: limpio(input2.pedido, 1e3), periodo: limpio(input2.periodo, 80), fuentes, widgets, agenteId: input2.agenteId ?? null, issueId: input2.issueId ?? null, publicadoPorTipo: input2.actor.tipo, publicadoPorId: input2.actor.id, versiones: 1, createdAt: now, updatedAt: now }
|
|
41590
|
+
};
|
|
41591
|
+
}
|
|
41592
|
+
|
|
40779
41593
|
// src/worker.ts
|
|
40780
41594
|
function str2(v) {
|
|
40781
41595
|
return typeof v === "string" && v.trim().length > 0 ? v.trim() : null;
|
|
@@ -40783,6 +41597,10 @@ function str2(v) {
|
|
|
40783
41597
|
function obj(v) {
|
|
40784
41598
|
return v && typeof v === "object" && !Array.isArray(v) ? v : {};
|
|
40785
41599
|
}
|
|
41600
|
+
function uuidOrNull(v) {
|
|
41601
|
+
const s = str2(v);
|
|
41602
|
+
return s && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s) ? s : null;
|
|
41603
|
+
}
|
|
40786
41604
|
function numOrNull(v) {
|
|
40787
41605
|
const n = typeof v === "number" ? v : typeof v === "string" ? Number(v) : NaN;
|
|
40788
41606
|
return Number.isFinite(n) ? n : null;
|
|
@@ -40793,7 +41611,7 @@ function companyFrom(params, fallback) {
|
|
|
40793
41611
|
return companyId;
|
|
40794
41612
|
}
|
|
40795
41613
|
function toolSchema(name) {
|
|
40796
|
-
const decl = manifest_default.tools?.find((
|
|
41614
|
+
const decl = manifest_default.tools?.find((t3) => t3.name === name);
|
|
40797
41615
|
return {
|
|
40798
41616
|
displayName: decl?.displayName ?? name,
|
|
40799
41617
|
description: decl?.description ?? "",
|
|
@@ -40846,7 +41664,8 @@ Transiciones registradas: ${detalle.transiciones.length}; acciones registradas:
|
|
|
40846
41664
|
datos: obj(p.datos),
|
|
40847
41665
|
idempotencyKey: str2(p.idempotencyKey),
|
|
40848
41666
|
actor: actorAgente(runCtx),
|
|
40849
|
-
agenteId: runCtx.agentId
|
|
41667
|
+
agenteId: runCtx.agentId,
|
|
41668
|
+
issueId: uuidOrNull(p.issueId)
|
|
40850
41669
|
});
|
|
40851
41670
|
return {
|
|
40852
41671
|
content: `${creado ? "Caso abierto" : "Caso ya existente (no se duplic\xF3)"}: ${resumenCaso(caso)}`,
|
|
@@ -40893,6 +41712,34 @@ Transiciones registradas: ${detalle.transiciones.length}; acciones registradas:
|
|
|
40893
41712
|
const data = await indicador(ctx, { companyId: runCtx.companyId, indicador: nombre, workflow: str2(p.workflow), dias: numOrNull(p.dias) });
|
|
40894
41713
|
return { content: JSON.stringify(data, null, 2), data };
|
|
40895
41714
|
}));
|
|
41715
|
+
ctx.tools.register(TOOL_NAMES.publicarTablero, toolSchema(TOOL_NAMES.publicarTablero), async (params, runCtx) => conErrores(async () => {
|
|
41716
|
+
const p = obj(params);
|
|
41717
|
+
const r = await publicarTablero(ctx, {
|
|
41718
|
+
companyId: runCtx.companyId,
|
|
41719
|
+
clave: str2(p.clave) ?? "",
|
|
41720
|
+
titulo: str2(p.titulo) ?? "",
|
|
41721
|
+
descripcion: str2(p.descripcion),
|
|
41722
|
+
pedido: str2(p.pedido),
|
|
41723
|
+
periodo: str2(p.periodo),
|
|
41724
|
+
fuentes: p.fuentes,
|
|
41725
|
+
widgets: p.widgets,
|
|
41726
|
+
actor: actorAgente(runCtx),
|
|
41727
|
+
agenteId: runCtx.agentId,
|
|
41728
|
+
issueId: uuidOrNull(p.issueId)
|
|
41729
|
+
});
|
|
41730
|
+
return {
|
|
41731
|
+
content: `${r.creado ? "Tablero publicado" : `Tablero actualizado (versi\xF3n ${r.tablero.versiones})`}: ${r.tablero.clave} \xB7 ${r.tablero.titulo} \xB7 ${r.tablero.widgets.length} widgets. La direcci\xF3n lo ve en el portal, secci\xF3n Tableros.`,
|
|
41732
|
+
data: { tablero: { ...r.tablero, widgets: void 0 }, creado: r.creado }
|
|
41733
|
+
};
|
|
41734
|
+
}));
|
|
41735
|
+
ctx.tools.register(TOOL_NAMES.listarTableros, toolSchema(TOOL_NAMES.listarTableros), async (_params, runCtx) => conErrores(async () => {
|
|
41736
|
+
const tableros = await listarTableros(ctx, runCtx.companyId);
|
|
41737
|
+
const resumen = tableros.map((x) => ({ clave: x.clave, titulo: x.titulo, periodo: x.periodo, fuentes: x.fuentes, widgets: x.widgets.length, versiones: x.versiones, actualizadoEn: x.updatedAt, issueId: x.issueId }));
|
|
41738
|
+
return {
|
|
41739
|
+
content: resumen.length ? resumen.map((x) => `${x.clave} \xB7 ${x.titulo}${x.periodo ? ` \xB7 ${x.periodo}` : ""} \xB7 ${x.widgets} widgets \xB7 v${x.versiones} \xB7 ${x.actualizadoEn}`).join("\n") : "No hay tableros publicados todav\xEDa.",
|
|
41740
|
+
data: { tableros: resumen }
|
|
41741
|
+
};
|
|
41742
|
+
}));
|
|
40896
41743
|
}
|
|
40897
41744
|
function actorHumano(context) {
|
|
40898
41745
|
if (context.actor.type === "agent") return { tipo: "agente", id: context.actor.agentId };
|
|
@@ -40909,7 +41756,7 @@ function registrarDatosYAcciones(ctx) {
|
|
|
40909
41756
|
finalesOk: w.finalesOk,
|
|
40910
41757
|
finalesNoOk: w.finalesNoOk,
|
|
40911
41758
|
minutosAbsorbidos: w.minutosAbsorbidos,
|
|
40912
|
-
transiciones: w.transiciones.map((
|
|
41759
|
+
transiciones: w.transiciones.map((t3) => ({ via: t3.via, de: t3.de, a: typeof t3.a === "string" ? t3.a : "(seg\xFAn datos)", actor: t3.actor, nivelRequerido: t3.nivelRequerido ?? null, descripcion: t3.descripcion }))
|
|
40913
41760
|
})));
|
|
40914
41761
|
ctx.data.register(DATA_KEYS.tablero, async (params) => tablero(ctx, companyFrom(params), numOrNull(params.dias)));
|
|
40915
41762
|
ctx.data.register(DATA_KEYS.casos, async (params) => listarCasos(ctx, { companyId: companyFrom(params), workflow: str2(params.workflow), estado: str2(params.estado), limit: numOrNull(params.limit) }));
|
|
@@ -40919,6 +41766,8 @@ function registrarDatosYAcciones(ctx) {
|
|
|
40919
41766
|
return leerCasoCompleto(ctx, companyFrom(params), casoId);
|
|
40920
41767
|
});
|
|
40921
41768
|
ctx.data.register(DATA_KEYS.politicas, async (params) => listarPoliticas(ctx, companyFrom(params)));
|
|
41769
|
+
ctx.data.register(DATA_KEYS.serie, async (params) => serie(ctx, companyFrom(params), numOrNull(params.dias)));
|
|
41770
|
+
ctx.data.register(DATA_KEYS.historialPoliticas, async (params) => historialPoliticas(ctx, companyFrom(params), numOrNull(params.limit)));
|
|
40922
41771
|
ctx.actions.register(ACTION_KEYS.aprobar, async (params, context) => {
|
|
40923
41772
|
const casoId = str2(params.casoId);
|
|
40924
41773
|
if (!casoId) throw new OpsError("caso_requerido", "casoId es obligatorio");
|
|
@@ -40929,11 +41778,23 @@ function registrarDatosYAcciones(ctx) {
|
|
|
40929
41778
|
if (!casoId) throw new OpsError("caso_requerido", "casoId es obligatorio");
|
|
40930
41779
|
return transicionar(ctx, { companyId: companyFrom(params, context.companyId), casoId, via: "rechazar", motivo: str2(params.motivo), datos: obj(params.datos), actor: actorHumano(context) });
|
|
40931
41780
|
});
|
|
41781
|
+
ctx.actions.register(ACTION_KEYS.marcarCargado, async (params, context) => {
|
|
41782
|
+
const casoId = str2(params.casoId);
|
|
41783
|
+
if (!casoId) throw new OpsError("caso_requerido", "casoId es obligatorio");
|
|
41784
|
+
return registrarCargaManual(ctx, {
|
|
41785
|
+
companyId: companyFrom(params, context.companyId),
|
|
41786
|
+
casoId,
|
|
41787
|
+
valorCargado: params.valorCargado,
|
|
41788
|
+
comentario: str2(params.comentario),
|
|
41789
|
+
persona: str2(params.cargadoPor),
|
|
41790
|
+
actor: actorHumano(context)
|
|
41791
|
+
});
|
|
41792
|
+
});
|
|
40932
41793
|
ctx.actions.register(ACTION_KEYS.cambiarPolitica, async (params, context) => {
|
|
40933
41794
|
const workflow = str2(params.workflow);
|
|
40934
41795
|
const modo = params.modo;
|
|
40935
41796
|
if (!workflow) throw new OpsError("workflow_requerido", "workflow es obligatorio");
|
|
40936
|
-
if (!esModo(modo)) throw new OpsError("modo_invalido", "modo debe ser corte, observa, propone o
|
|
41797
|
+
if (!esModo(modo)) throw new OpsError("modo_invalido", "modo debe ser corte, observa, propone, ejecuta o autonomo");
|
|
40937
41798
|
return cambiarPolitica(ctx, { companyId: companyFrom(params, context.companyId), workflow, modo, motivo: str2(params.motivo), actor: actorHumano(context) });
|
|
40938
41799
|
});
|
|
40939
41800
|
ctx.actions.register(ACTION_KEYS.abrirCaso, async (params, context) => {
|
|
@@ -40956,6 +41817,10 @@ async function manejarApi(ctx, input2) {
|
|
|
40956
41817
|
const q = input2.query;
|
|
40957
41818
|
const qs = (k) => Array.isArray(q[k]) ? str2(q[k][0]) : str2(q[k]);
|
|
40958
41819
|
const actor = input2.actor.actorType === "agent" ? { tipo: "agente", id: input2.actor.agentId ?? input2.actor.actorId, runId: input2.actor.runId ?? null } : { tipo: "humano", id: input2.actor.userId ?? input2.actor.actorId };
|
|
41820
|
+
const quien = obj(body.decididoPor);
|
|
41821
|
+
const decididoPor = str2(quien.nombre) ? `${str2(quien.nombre)}${str2(quien.email) ? ` (${str2(quien.email)})` : ""}` : null;
|
|
41822
|
+
const conPersona = (datos) => decididoPor ? { ...datos, decidido_por: decididoPor } : datos;
|
|
41823
|
+
const motivoConPersona = (motivo) => decididoPor ? `${motivo ? `${motivo} \xB7 ` : ""}decidido por ${decididoPor}` : motivo ?? null;
|
|
40959
41824
|
switch (input2.routeKey) {
|
|
40960
41825
|
case "tablero":
|
|
40961
41826
|
return respuesta(200, await tablero(ctx, companyId, numOrNull(qs("dias"))));
|
|
@@ -40966,16 +41831,30 @@ async function manejarApi(ctx, input2) {
|
|
|
40966
41831
|
return detalle ? respuesta(200, detalle) : respuesta(404, { error: "caso_inexistente" });
|
|
40967
41832
|
}
|
|
40968
41833
|
case "aprobar":
|
|
40969
|
-
return respuesta(200, await transicionar(ctx, { companyId, casoId: input2.params.casoId ?? "", via: "aprobar", motivo: str2(body.motivo), datos: obj(body.datos), actor }));
|
|
41834
|
+
return respuesta(200, await transicionar(ctx, { companyId, casoId: input2.params.casoId ?? "", via: "aprobar", motivo: str2(body.motivo), datos: conPersona(obj(body.datos)), actor }));
|
|
40970
41835
|
case "rechazar":
|
|
40971
|
-
return respuesta(200, await transicionar(ctx, { companyId, casoId: input2.params.casoId ?? "", via: "rechazar", motivo: str2(body.motivo), datos: obj(body.datos), actor }));
|
|
41836
|
+
return respuesta(200, await transicionar(ctx, { companyId, casoId: input2.params.casoId ?? "", via: "rechazar", motivo: str2(body.motivo), datos: conPersona(obj(body.datos)), actor }));
|
|
41837
|
+
case "marcar-cargado":
|
|
41838
|
+
return respuesta(200, await registrarCargaManual(ctx, { companyId, casoId: input2.params.casoId ?? "", valorCargado: body.valorCargado, comentario: str2(body.comentario), persona: decididoPor, idempotencyKey: str2(body.idempotencyKey), actor }));
|
|
41839
|
+
case "version":
|
|
41840
|
+
return respuesta(200, { version: manifest_default.version, capacidades: ["carga-manual", "recupero-turnos"], workflows: listarWorkflows().map((w) => w.clave) });
|
|
40972
41841
|
case "politicas":
|
|
40973
41842
|
return respuesta(200, { politicas: await listarPoliticas(ctx, companyId) });
|
|
41843
|
+
case "serie":
|
|
41844
|
+
return respuesta(200, await serie(ctx, companyId, numOrNull(qs("dias"))));
|
|
41845
|
+
case "historial-politicas":
|
|
41846
|
+
return respuesta(200, { cambios: await historialPoliticas(ctx, companyId, numOrNull(qs("limit"))) });
|
|
41847
|
+
case "tableros":
|
|
41848
|
+
return respuesta(200, { tableros: await listarTableros(ctx, companyId) });
|
|
41849
|
+
case "tablero-publicado": {
|
|
41850
|
+
const tb = await leerTablero(ctx, companyId, (input2.params.clave ?? "").toLowerCase());
|
|
41851
|
+
return tb ? respuesta(200, tb) : respuesta(404, { error: "tablero_inexistente" });
|
|
41852
|
+
}
|
|
40974
41853
|
case "cambiar-politica": {
|
|
40975
41854
|
const workflow = str2(body.workflow);
|
|
40976
41855
|
if (!workflow) return respuesta(400, { error: "workflow_requerido" });
|
|
40977
|
-
if (!esModo(body.modo)) return respuesta(400, { error: "modo_invalido", detalle: "modo debe ser corte, observa, propone o
|
|
40978
|
-
return respuesta(200, await cambiarPolitica(ctx, { companyId, workflow, modo: body.modo, motivo: str2(body.motivo), actor }));
|
|
41856
|
+
if (!esModo(body.modo)) return respuesta(400, { error: "modo_invalido", detalle: "modo debe ser corte, observa, propone, ejecuta o autonomo" });
|
|
41857
|
+
return respuesta(200, await cambiarPolitica(ctx, { companyId, workflow, modo: body.modo, motivo: motivoConPersona(str2(body.motivo)), actor }));
|
|
40979
41858
|
}
|
|
40980
41859
|
default:
|
|
40981
41860
|
return respuesta(404, { error: "ruta_desconocida", routeKey: input2.routeKey });
|
|
@@ -40998,7 +41877,7 @@ var plugin = definePlugin({
|
|
|
40998
41877
|
return await manejarApi(activeContext(), input2);
|
|
40999
41878
|
} catch (err) {
|
|
41000
41879
|
if (err instanceof OpsError) {
|
|
41001
|
-
const status = err.codigo === "caso_inexistente" ? 404 : err.codigo === "politica" || err.codigo === "actor_no_permitido" ? 403 : 422;
|
|
41880
|
+
const status = err.codigo === "caso_inexistente" || err.codigo === "tablero_inexistente" ? 404 : err.codigo === "politica" || err.codigo === "actor_no_permitido" ? 403 : 422;
|
|
41002
41881
|
return respuesta(status, { error: err.codigo, motivo: err.motivo, detalle: err.detalle ?? null });
|
|
41003
41882
|
}
|
|
41004
41883
|
return respuesta(500, { error: "error_interno", motivo: err instanceof Error ? err.message : String(err) });
|