node-autotask 0.37.1 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/MCP_TOOL_CATALOG.json +127 -44
  3. package/MCP_TOOL_MANIFEST.md +9 -9
  4. package/N8N_MCP_MANIFEST.json +4 -4
  5. package/N8N_MCP_MANIFEST.md +5 -5
  6. package/README.md +3 -0
  7. package/capabilities.json +2500 -1713
  8. package/capabilities.schema.json +2 -1
  9. package/dist/capabilities.cjs +2 -2
  10. package/dist/capabilities.d.cts +4 -4
  11. package/dist/capabilities.d.ts +4 -4
  12. package/dist/capabilities.js +1 -1
  13. package/dist/{chunk-KQ6HMBB4.js → chunk-2KQS3RHQ.js} +2499 -1712
  14. package/dist/{chunk-TBFXRNNE.cjs → chunk-45PLS73K.cjs} +2452 -2065
  15. package/dist/chunk-5VHSLJMR.js +71 -0
  16. package/dist/{chunk-PFFW4DIK.cjs → chunk-6ROB5KXB.cjs} +285 -285
  17. package/dist/{chunk-7IADHNBZ.js → chunk-FV5PJLIZ.js} +2602 -2215
  18. package/dist/{chunk-25VGFT5M.cjs → chunk-KSNK6UEW.cjs} +143 -143
  19. package/dist/{chunk-PFJAMFUL.js → chunk-LD5UPSDB.js} +2 -2
  20. package/dist/chunk-MJTKK3QG.cjs +71 -0
  21. package/dist/{chunk-7WI7FBPB.js → chunk-OKFTECIE.js} +2 -2
  22. package/dist/{chunk-HBYKTXN3.cjs → chunk-RAZEXOLC.cjs} +2499 -1712
  23. package/dist/{index-m-7fOwFl.d.cts → index-BQVStxwi.d.cts} +15 -1
  24. package/dist/{index-m-7fOwFl.d.ts → index-BQVStxwi.d.ts} +15 -1
  25. package/dist/{index-CqepIQfp.d.cts → index-BVOOHPvr.d.cts} +28 -8
  26. package/dist/{index-BDqw377y.d.ts → index-Bmoiwhx2.d.ts} +28 -8
  27. package/dist/index.cjs +27 -22
  28. package/dist/index.d.cts +26 -5
  29. package/dist/index.d.ts +26 -5
  30. package/dist/index.js +9 -4
  31. package/dist/operations/index.cjs +249 -227
  32. package/dist/operations/index.d.cts +76 -15
  33. package/dist/operations/index.d.ts +76 -15
  34. package/dist/operations/index.js +60 -38
  35. package/dist/pool.cjs +10 -9
  36. package/dist/pool.d.cts +2 -2
  37. package/dist/pool.d.ts +2 -2
  38. package/dist/pool.js +5 -4
  39. package/dist/resources/index.cjs +5 -4
  40. package/dist/resources/index.d.cts +2 -2
  41. package/dist/resources/index.d.ts +2 -2
  42. package/dist/resources/index.js +4 -3
  43. package/dist/types/index.d.cts +1 -1
  44. package/dist/types/index.d.ts +1 -1
  45. package/dist/untrusted.cjs +24 -70
  46. package/dist/untrusted.js +12 -58
  47. package/docs/API.md +129 -3
  48. package/examples/mcp/manifest.ts +5 -0
  49. package/examples/mcp/rank.ts +62 -0
  50. package/examples/mcp/tools-meta.ts +6 -1
  51. package/package.json +1 -1
@@ -0,0 +1,71 @@
1
+ // src/untrusted.ts
2
+ var UNTRUSTED_OPEN = "<untrusted_content>";
3
+ var UNTRUSTED_CLOSE = "</untrusted_content>";
4
+ var UNTRUSTED_OPEN_NEUTRALISED = "\\u003Cuntrusted_content\\u003E";
5
+ var UNTRUSTED_CLOSE_NEUTRALISED = "\\u003C\\/untrusted_content\\u003E";
6
+ var REDACTED_MARKER = "[REDACTED]";
7
+ function isPlainRecord(value) {
8
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
9
+ const proto = Object.getPrototypeOf(value);
10
+ return proto === Object.prototype || proto === null;
11
+ }
12
+ function wrapUntrusted(value) {
13
+ if (typeof value !== "string") return void 0;
14
+ if (value === "") return void 0;
15
+ if (value === REDACTED_MARKER) return void 0;
16
+ if (value.startsWith(UNTRUSTED_OPEN) && value.endsWith(UNTRUSTED_CLOSE) && !value.slice(UNTRUSTED_OPEN.length, value.length - UNTRUSTED_CLOSE.length).includes(UNTRUSTED_OPEN) && !value.slice(UNTRUSTED_OPEN.length, value.length - UNTRUSTED_CLOSE.length).includes(UNTRUSTED_CLOSE)) {
17
+ return value;
18
+ }
19
+ const inner = value.split(UNTRUSTED_OPEN).join(UNTRUSTED_OPEN_NEUTRALISED).split(UNTRUSTED_CLOSE).join(UNTRUSTED_CLOSE_NEUTRALISED);
20
+ return `${UNTRUSTED_OPEN}${inner}${UNTRUSTED_CLOSE}`;
21
+ }
22
+ function markUntrusted(record, fields) {
23
+ if (!isPlainRecord(record)) return record;
24
+ const fieldSet = new Set(fields);
25
+ const out = { ...record };
26
+ for (const key of Object.keys(record)) {
27
+ if (!fieldSet.has(key)) continue;
28
+ const wrapped = wrapUntrusted(record[key]);
29
+ if (wrapped !== void 0) out[key] = wrapped;
30
+ }
31
+ return out;
32
+ }
33
+ function deepMarkUntrusted(value, fields) {
34
+ if (Array.isArray(value)) return value.map((entry) => deepMarkUntrusted(entry, fields));
35
+ if (!isPlainRecord(value)) return value;
36
+ const marked = markUntrusted(value, fields);
37
+ const out = {};
38
+ for (const [key, entry] of Object.entries(marked)) {
39
+ out[key] = deepMarkUntrusted(entry, fields);
40
+ }
41
+ return out;
42
+ }
43
+ function stripUntrustedWrapper(value) {
44
+ if (typeof value !== "string") return value;
45
+ if (!value.startsWith(UNTRUSTED_OPEN) || !value.endsWith(UNTRUSTED_CLOSE)) return value;
46
+ const inner = value.slice(UNTRUSTED_OPEN.length, value.length - UNTRUSTED_CLOSE.length);
47
+ return inner;
48
+ }
49
+ function stripUntrustedDeep(value) {
50
+ if (typeof value === "string") return stripUntrustedWrapper(value);
51
+ if (Array.isArray(value)) return value.map((entry) => stripUntrustedDeep(entry));
52
+ if (!isPlainRecord(value)) return value;
53
+ const out = {};
54
+ for (const [key, entry] of Object.entries(value)) {
55
+ out[key] = stripUntrustedDeep(entry);
56
+ }
57
+ return out;
58
+ }
59
+
60
+ export {
61
+ UNTRUSTED_OPEN,
62
+ UNTRUSTED_CLOSE,
63
+ UNTRUSTED_OPEN_NEUTRALISED,
64
+ UNTRUSTED_CLOSE_NEUTRALISED,
65
+ REDACTED_MARKER,
66
+ wrapUntrusted,
67
+ markUntrusted,
68
+ deepMarkUntrusted,
69
+ stripUntrustedWrapper,
70
+ stripUntrustedDeep
71
+ };