@wrongstack/plugins 1.0.13 → 1.0.15

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 CHANGED
@@ -699,7 +699,7 @@ once you're confident in the rewrite.
699
699
  ### 22 — `loop-breaker`
700
700
 
701
701
  **Tools**: `loop_breaker_status`
702
- **Hooks**: `PreToolUse`
702
+ **Hooks**: `PreToolUse`, `PostToolUse`, `UserPromptSubmit`
703
703
 
704
704
  Detects repeated tool calls before they execute. It tracks exact-repeat
705
705
  streaks and A-B-A-B oscillations, then either blocks the call or injects a
@@ -711,6 +711,7 @@ warning depending on `mode`.
711
711
  "loop-breaker": {
712
712
  "enabled": true,
713
713
  "mode": "block", // "block" | "warn"
714
+ "maxSteps": 0, // unlimited; set a positive value to opt into a cap
714
715
  "repeatThreshold": 3,
715
716
  "oscillationThreshold": 2
716
717
  }
@@ -33,7 +33,7 @@ var state = {
33
33
  hookUnregister: null
34
34
  };
35
35
  var DEFAULTS = {
36
- enabled: false,
36
+ enabled: true,
37
37
  includeExtensions: [".tsx", ".jsx", ".html", ".vue"],
38
38
  maxFindings: 50,
39
39
  severity: "warn",
package/dist/auto-doc.js CHANGED
@@ -339,6 +339,10 @@ var plugin = {
339
339
  },
340
340
  permission: "auto",
341
341
  mutating: true,
342
+ // It rewrites project source files, so it declares the same capability
343
+ // as the built-in writers: the agent-state write gate and capability
344
+ // allowlists key on `fs.write`, not on `mutating`.
345
+ capabilities: ["fs.write"],
342
346
  category: "Project",
343
347
  async execute(input) {
344
348
  const inp = input;
@@ -33,7 +33,7 @@ var state = {
33
33
  lastResult: null
34
34
  };
35
35
  var DEFAULTS = {
36
- enabled: false,
36
+ enabled: true,
37
37
  fileExtensions: [".tsx", ".jsx", ".vue"],
38
38
  minLength: 2,
39
39
  maxContextStrings: 10,
@@ -32,7 +32,7 @@ var state = {
32
32
  hookUnregister: null
33
33
  };
34
34
  var DEFAULTS = {
35
- enabled: false,
35
+ enabled: true,
36
36
  extensions: [".ts", ".tsx", ".js", ".jsx"],
37
37
  maxFiles: 50
38
38
  };
package/dist/cron.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import { ToolValidationError } from "@wrongstack/core/types";
3
3
  var COORDINATION_CRON_CAPABILITY = "coordination.cron";
4
4
  var API_VERSION = "^0.1.10";
5
+ var MAX_TIMER_DELAY_MS = 2147483647;
5
6
  var state = {
6
7
  jobs: /* @__PURE__ */ new Map(),
7
8
  timers: /* @__PURE__ */ new Map(),
@@ -147,7 +148,9 @@ var plugin = {
147
148
  name: { type: "string", description: "Unique name for this cron job" },
148
149
  intervalMs: {
149
150
  type: "number",
150
- description: "Interval between runs in milliseconds (minimum 1000)"
151
+ minimum: 1e3,
152
+ maximum: MAX_TIMER_DELAY_MS,
153
+ description: `Interval between runs in milliseconds (1000 to ${MAX_TIMER_DELAY_MS})`
151
154
  },
152
155
  action: {
153
156
  type: "string",
@@ -179,6 +182,12 @@ var plugin = {
179
182
  field: "intervalMs"
180
183
  });
181
184
  }
185
+ if (intervalMs > MAX_TIMER_DELAY_MS) {
186
+ throw new ToolValidationError({
187
+ message: `intervalMs must be <= ${MAX_TIMER_DELAY_MS} (about 24.8 days)`,
188
+ field: "intervalMs"
189
+ });
190
+ }
182
191
  if (typeof action !== "string" || action.trim() === "") {
183
192
  throw new ToolValidationError({
184
193
  message: "action is required and must be a non-empty string",
@@ -34,7 +34,7 @@ var state = {
34
34
  hookUnregister: null
35
35
  };
36
36
  var DEFAULTS = {
37
- enabled: false,
37
+ enabled: true,
38
38
  extensions: [".ts", ".tsx", ".js", ".jsx"],
39
39
  defaultDepth: 3,
40
40
  maxDepth: 10,
@@ -190,7 +190,7 @@ var plugin = {
190
190
  properties: {
191
191
  enabled: {
192
192
  type: "boolean",
193
- default: false,
193
+ default: true,
194
194
  description: "Master switch."
195
195
  },
196
196
  extensions: {
@@ -53,7 +53,7 @@ var hookIndexBudgets = {
53
53
  maxFileBytes: 2 * 1024 * 1024
54
54
  };
55
55
  var DEFAULTS = {
56
- enabled: false,
56
+ enabled: true,
57
57
  minLines: 8,
58
58
  threshold: 0.8,
59
59
  extensions: [".ts", ".tsx", ".js", ".jsx"],
@@ -269,7 +269,7 @@ var plugin = {
269
269
  configSchema: {
270
270
  type: "object",
271
271
  properties: {
272
- enabled: { type: "boolean", default: false, description: "Master switch." },
272
+ enabled: { type: "boolean", default: true, description: "Master switch." },
273
273
  minLines: {
274
274
  type: "number",
275
275
  minimum: 2,
@@ -39,7 +39,7 @@ var DEFAULT_PATTERNS = [
39
39
  String.raw`flags(?:\.|\?\.)([A-Za-z_$][A-Za-z0-9_$]*)`
40
40
  ];
41
41
  var DEFAULTS = {
42
- enabled: false,
42
+ enabled: true,
43
43
  extensions: [".ts", ".tsx", ".js", ".jsx"],
44
44
  patterns: [],
45
45
  maxFindings: 50
@@ -452,8 +452,9 @@ var plugin = {
452
452
  try {
453
453
  commitScope = await stageFiles(files);
454
454
  } catch (err) {
455
+ const detail = err instanceof Error ? err.message : String(err);
455
456
  throw new Error(
456
- `Failed to stage files: ${err instanceof Error ? err.message : String(err)}`,
457
+ detail.startsWith("Failed to stage files") ? detail : `Failed to stage files: ${detail}`,
457
458
  { cause: err }
458
459
  );
459
460
  }