@stylusnexus/agentarmor-ml 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +4 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -171,7 +171,7 @@ async function downloadFile(filename, destDir, config, optional) {
171
171
  const tmpPath = `${destPath}.tmp`;
172
172
  for (let attempt = 0; attempt <= retries; attempt++) {
173
173
  try {
174
- await new Promise((resolve, reject) => {
174
+ await new Promise((resolve2, reject) => {
175
175
  const timer = setTimeout(() => {
176
176
  reject(
177
177
  new AgentArmorModelError(
@@ -198,7 +198,7 @@ async function downloadFile(filename, destDir, config, optional) {
198
198
  if (res.statusCode === 404 && optional) {
199
199
  clearTimeout(timer);
200
200
  res.resume();
201
- resolve();
201
+ resolve2();
202
202
  return;
203
203
  }
204
204
  if (res.statusCode !== 200) {
@@ -223,7 +223,7 @@ async function downloadFile(filename, destDir, config, optional) {
223
223
  const ws = (0, import_fs.createWriteStream)(tmpPath);
224
224
  (0, import_promises2.pipeline)(res, ws).then(() => {
225
225
  clearTimeout(timer);
226
- resolve();
226
+ resolve2();
227
227
  }).catch((pipeErr) => {
228
228
  clearTimeout(timer);
229
229
  reject(
@@ -367,7 +367,7 @@ async function cmdDownload(args) {
367
367
  enabled: true,
368
368
  download: { onProgress }
369
369
  });
370
- const resolvedDir = (0, import_path3.join)(process.cwd(), dir);
370
+ const resolvedDir = (0, import_path3.resolve)(dir);
371
371
  (0, import_fs2.mkdirSync)(resolvedDir, { recursive: true });
372
372
  for (const file of REQUIRED_MODEL_FILES) {
373
373
  const src = (0, import_path3.join)(result.modelDir, file);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stylusnexus/agentarmor-ml",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "ML classifier add-on for Agent Armor. Downloads and runs a DeBERTa-v3-small ONNX model for agent trap detection.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",