agentsys 5.8.6 → 5.9.1

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/lib/package.json CHANGED
@@ -4,40 +4,6 @@
4
4
  "description": "Core library for AgentSys: platform detection, pattern matching, workflow state, and utilities",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
- "exports": {
8
- ".": "./index.js",
9
- "./binary": "./binary/index.js",
10
- "./collectors": "./collectors/index.js",
11
- "./config": "./config/index.js",
12
- "./cross-platform": "./cross-platform/index.js",
13
- "./discovery": "./discovery/index.js",
14
- "./enhance": "./enhance/index.js",
15
- "./perf": "./perf/index.js",
16
- "./repo-intel": "./repo-intel/index.js",
17
- "./repo-intel/queries": "./repo-intel/queries.js",
18
- "./repo-map": "./repo-map/index.js",
19
- "./collectors/codebase": "./collectors/codebase.js",
20
- "./collectors/docs-patterns": "./collectors/docs-patterns.js",
21
- "./collectors/documentation": "./collectors/documentation.js",
22
- "./collectors/github": "./collectors/github.js",
23
- "./enhance/agent-analyzer": "./enhance/agent-analyzer.js",
24
- "./enhance/agent-patterns": "./enhance/agent-patterns.js",
25
- "./enhance/cross-file-analyzer": "./enhance/cross-file-analyzer.js",
26
- "./enhance/cross-file-patterns": "./enhance/cross-file-patterns.js",
27
- "./enhance/fixer": "./enhance/fixer.js",
28
- "./enhance/plugin-patterns": "./enhance/plugin-patterns.js",
29
- "./enhance/projectmemory-analyzer": "./enhance/projectmemory-analyzer.js",
30
- "./enhance/projectmemory-patterns": "./enhance/projectmemory-patterns.js",
31
- "./enhance/prompt-analyzer": "./enhance/prompt-analyzer.js",
32
- "./enhance/prompt-patterns": "./enhance/prompt-patterns.js",
33
- "./enhance/reporter": "./enhance/reporter.js",
34
- "./enhance/security-patterns": "./enhance/security-patterns.js",
35
- "./enhance/suppression": "./enhance/suppression.js",
36
- "./enhance/tool-patterns": "./enhance/tool-patterns.js",
37
- "./sources/custom-handler": "./sources/custom-handler.js",
38
- "./sources/policy-questions": "./sources/policy-questions.js",
39
- "./sources/source-cache": "./sources/source-cache.js"
40
- },
41
7
  "engines": {
42
8
  "node": ">=18.0.0"
43
9
  },
@@ -6,11 +6,7 @@
6
6
  * Functions gracefully degrade when tools are not available.
7
7
  *
8
8
  * Supported languages: javascript, typescript, python, rust, go
9
- */
10
-
11
- const { truncate } = require('../cross-platform');
12
-
13
- /**
9
+ *
14
10
  * @module patterns/cli-enhancers
15
11
  * @author Avi Fenesh
16
12
  * @license MIT
@@ -384,7 +380,7 @@ function runDuplicateDetection(repoPath, options = {}) {
384
380
  secondLine: dup.secondFile?.start || 0,
385
381
  lines: dup.lines || 0,
386
382
  tokens: dup.tokens || 0,
387
- fragment: truncate(dup.fragment || '', 100)
383
+ fragment: dup.fragment?.substring(0, 100) || ''
388
384
  });
389
385
  }
390
386
  }
@@ -7,11 +7,7 @@
7
7
  * - Phase 3 (LLM handoff): certainty-tagged findings for agent review
8
8
  *
9
9
  * Inherits modes from deslop: report (analyze only) vs apply (fix issues)
10
- */
11
-
12
- const { truncate } = require('../cross-platform');
13
-
14
- /**
10
+ *
15
11
  * @module patterns/pipeline
16
12
  * @author Avi Fenesh
17
13
  * @license MIT
@@ -360,7 +356,7 @@ function runPhase1(repoPath, targetFiles, language, fileContents) {
360
356
  certainty: CERTAINTY.HIGH,
361
357
  description: pattern.description,
362
358
  autoFix: pattern.autoFix,
363
- content: truncate(line.trim(), 100),
359
+ content: line.trim().substring(0, 100),
364
360
  phase: 1
365
361
  });
366
362
  }
@@ -661,7 +657,7 @@ async function runMultiPassAnalyzers(repoPath, targetFiles, fileContents) {
661
657
  certainty: CERTAINTY.MEDIUM,
662
658
  description: `${shotgunPattern.description}: ${v.files.length} files change together ${v.count} times`,
663
659
  autoFix: shotgunPattern.autoFix,
664
- content: truncate(v.files.join(', '), 100),
660
+ content: v.files.join(', ').substring(0, 100),
665
661
  phase: 1,
666
662
  details: { files: v.files, changeCount: v.count }
667
663
  });
@@ -8,8 +8,6 @@
8
8
  * @license MIT
9
9
  */
10
10
 
11
- const { truncate } = require('../cross-platform');
12
-
13
11
  /**
14
12
  * Analyze JSDoc-to-function ratio to detect excessive documentation
15
13
  *
@@ -1881,7 +1879,7 @@ function analyzeDeadCode(content, options = {}) {
1881
1879
  line: j + 1, // 1-indexed
1882
1880
  terminationType: terminationType,
1883
1881
  terminationLine: i + 1,
1884
- content: truncate(nextTrimmed, 50),
1882
+ content: nextTrimmed.substring(0, 50) + (nextTrimmed.length > 50 ? '...' : ''),
1885
1883
  severity: 'high'
1886
1884
  });
1887
1885
 
@@ -11,7 +11,6 @@
11
11
  */
12
12
 
13
13
  const fs = require('fs');
14
- const { truncate } = require('../cross-platform');
15
14
  const path = require('path');
16
15
  const { exec } = require('child_process');
17
16
  const { promisify } = require('util');
@@ -85,7 +84,7 @@ function withTimeout(promise, timeoutMs = DEFAULT_ASYNC_TIMEOUT_MS, operation =
85
84
  * @returns {Promise<{stdout: string, stderr: string}>}
86
85
  */
87
86
  async function execWithTimeout(cmd, options = {}, timeoutMs = DEFAULT_ASYNC_TIMEOUT_MS) {
88
- return withTimeout(execAsync(cmd, options), timeoutMs, `exec: ${truncate(cmd, 50)}`);
87
+ return withTimeout(execAsync(cmd, options), timeoutMs, `exec: ${cmd.substring(0, 50)}`);
89
88
  }
90
89
 
91
90
  // Maximum cached file size constant