opencode-swarm 6.53.6 → 6.54.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.
package/dist/cli/index.js CHANGED
@@ -32389,8 +32389,10 @@ var SECURITY_DEGRADING_PATTERNS = [
32389
32389
  /disable\s+.{0,50}2fa/i,
32390
32390
  /remove\s+.{0,50}password/i
32391
32391
  ];
32392
+ var INVISIBLE_FORMAT_CHARS = /[\u00AD\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]/g;
32392
32393
  var INJECTION_PATTERNS = [
32393
32394
  /[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\x0d]/,
32395
+ /[\u00AD\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]/,
32394
32396
  /^system\s*:/i,
32395
32397
  /<script/i,
32396
32398
  /javascript:/i,
@@ -32543,7 +32545,7 @@ function validateLesson(candidate, existingLessons, meta3) {
32543
32545
  severity: "error"
32544
32546
  };
32545
32547
  }
32546
- const normalizedCandidate = candidate.normalize("NFKC").toLowerCase();
32548
+ const normalizedCandidate = candidate.normalize("NFKC").replace(INVISIBLE_FORMAT_CHARS, " ").replace(/\s+/g, " ").toLowerCase();
32547
32549
  for (const pattern of DANGEROUS_COMMAND_PATTERNS) {
32548
32550
  if (pattern.test(normalizedCandidate)) {
32549
32551
  return {
@@ -8,6 +8,7 @@ export interface ValidationResult {
8
8
  }
9
9
  export declare const DANGEROUS_COMMAND_PATTERNS: RegExp[];
10
10
  export declare const SECURITY_DEGRADING_PATTERNS: RegExp[];
11
+ export declare const INVISIBLE_FORMAT_CHARS: RegExp;
11
12
  export declare const INJECTION_PATTERNS: RegExp[];
12
13
  export declare function validateLesson(candidate: string, existingLessons: string[], meta: {
13
14
  category: KnowledgeCategory;
package/dist/index.js CHANGED
@@ -43634,8 +43634,10 @@ var SECURITY_DEGRADING_PATTERNS = [
43634
43634
  /disable\s+.{0,50}2fa/i,
43635
43635
  /remove\s+.{0,50}password/i
43636
43636
  ];
43637
+ var INVISIBLE_FORMAT_CHARS = /[\u00AD\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]/g;
43637
43638
  var INJECTION_PATTERNS = [
43638
43639
  /[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\x0d]/,
43640
+ /[\u00AD\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]/,
43639
43641
  /^system\s*:/i,
43640
43642
  /<script/i,
43641
43643
  /javascript:/i,
@@ -43788,7 +43790,7 @@ function validateLesson(candidate, existingLessons, meta3) {
43788
43790
  severity: "error"
43789
43791
  };
43790
43792
  }
43791
- const normalizedCandidate = candidate.normalize("NFKC").toLowerCase();
43793
+ const normalizedCandidate = candidate.normalize("NFKC").replace(INVISIBLE_FORMAT_CHARS, " ").replace(/\s+/g, " ").toLowerCase();
43792
43794
  for (const pattern of DANGEROUS_COMMAND_PATTERNS) {
43793
43795
  if (pattern.test(normalizedCandidate)) {
43794
43796
  return {
@@ -27,6 +27,12 @@ export interface LaravelCommandOverlay {
27
27
  lintCommand: string | null;
28
28
  /** Static analysis command. PHPStan if phpstan config is present, null otherwise. */
29
29
  staticAnalysisCommand: string | null;
30
+ /**
31
+ * Identified static analysis tool. 'larastan' if phpstan.neon contains a
32
+ * Larastan extension reference, 'phpstan' if a phpstan config is present
33
+ * without Larastan markers, null if no phpstan config is present.
34
+ */
35
+ staticAnalysisTool: 'larastan' | 'phpstan' | null;
30
36
  /** Dependency audit command (always composer audit --locked --format=json for Laravel). */
31
37
  auditCommand: string;
32
38
  /** Whether --parallel flag is supported (Pest parallel testing via artisan). */
@@ -54,6 +60,22 @@ export declare function detectLaravelProject(directory: string): boolean;
54
60
  * @returns LaravelDetectionSignals with each signal's boolean state
55
61
  */
56
62
  export declare function getLaravelSignals(directory: string): LaravelDetectionSignals;
63
+ /**
64
+ * Determine whether a project is configured to use Larastan (the Laravel
65
+ * extension for PHPStan) rather than vanilla PHPStan.
66
+ *
67
+ * Detection is content-based: the first 4096 bytes of `phpstan.neon` are
68
+ * read and scanned for a reference to either of the two known Larastan
69
+ * package names (`nunomaduro/larastan` or `larastan/larastan`).
70
+ *
71
+ * Only `phpstan.neon` is checked — `phpstan.neon.dist` is a distribution
72
+ * baseline that projects override locally, so it is not scanned for the
73
+ * Larastan marker.
74
+ *
75
+ * @param directory - Absolute path to the project root
76
+ * @returns true if phpstan.neon contains a Larastan extension reference
77
+ */
78
+ export declare function isLarastanConfigured(directory: string): boolean;
57
79
  /**
58
80
  * Get the Laravel command overlay for a project directory.
59
81
  * Returns null if the directory is not a Laravel project.
@@ -65,6 +87,8 @@ export declare function getLaravelSignals(directory: string): LaravelDetectionSi
65
87
  * null otherwise
66
88
  * - staticAnalysisCommand: 'vendor/bin/phpstan analyse' if phpstan.neon or phpstan.neon.dist present,
67
89
  * null otherwise
90
+ * - staticAnalysisTool: 'larastan' if phpstan.neon contains a Larastan extension reference,
91
+ * 'phpstan' if a phpstan config is present without Larastan markers, null otherwise
68
92
  * - auditCommand: always 'composer audit --locked --format=json'
69
93
  * - supportsParallel: true (php artisan test --parallel is supported)
70
94
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.53.6",
3
+ "version": "6.54.0",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",