From eaba031b82f715f7308d87b5989070e2ed426757 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Fri, 3 Apr 2026 11:25:53 +0200 Subject: [PATCH] fix multiline script output matching in PS-AGENT-OUTPUT/ERROR patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .* doesn't match newlines without Singleline flag — script stdout/stderr from AgentExecutor.log spans multiple lines and was never captured. Changed to [\s\S]*? to match across newlines. Co-Authored-By: Claude Opus 4.6 (1M context) --- rules/dist/ime-log-patterns.json | 4 ++-- rules/ime-log-patterns/PS-AGENT-ERROR.json | 2 +- rules/ime-log-patterns/PS-AGENT-OUTPUT.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rules/dist/ime-log-patterns.json b/rules/dist/ime-log-patterns.json index 965e2bdb..497372e8 100644 --- a/rules/dist/ime-log-patterns.json +++ b/rules/dist/ime-log-patterns.json @@ -551,7 +551,7 @@ { "patternId": "PS-AGENT-ERROR", "category": "always", - "pattern": "error from script =(?.*)", + "pattern": "error from script =(?[\\s\\S]*)", "action": "scriptOutput", "parameters": { "scriptType": "platform", @@ -574,7 +574,7 @@ { "patternId": "PS-AGENT-OUTPUT", "category": "always", - "pattern": "write output done\\. output = (?.*), error = (?.*)", + "pattern": "write output done\\. output = (?[\\s\\S]*?), error = (?[\\s\\S]*)", "action": "scriptOutput", "parameters": { "scriptType": "platform" diff --git a/rules/ime-log-patterns/PS-AGENT-ERROR.json b/rules/ime-log-patterns/PS-AGENT-ERROR.json index dc31ff36..6430d3df 100644 --- a/rules/ime-log-patterns/PS-AGENT-ERROR.json +++ b/rules/ime-log-patterns/PS-AGENT-ERROR.json @@ -2,7 +2,7 @@ "$schema": "../schema/ime-log-pattern.schema.json", "patternId": "PS-AGENT-ERROR", "category": "always", - "pattern": "error from script =(?.*)", + "pattern": "error from script =(?[\\s\\S]*)", "action": "scriptOutput", "parameters": { "scriptType": "platform", "outputType": "stderr" }, "description": "Captures error output from AgentExecutor.log when a platform script produces stderr content.", diff --git a/rules/ime-log-patterns/PS-AGENT-OUTPUT.json b/rules/ime-log-patterns/PS-AGENT-OUTPUT.json index 705a8ab9..01695170 100644 --- a/rules/ime-log-patterns/PS-AGENT-OUTPUT.json +++ b/rules/ime-log-patterns/PS-AGENT-OUTPUT.json @@ -2,7 +2,7 @@ "$schema": "../schema/ime-log-pattern.schema.json", "patternId": "PS-AGENT-OUTPUT", "category": "always", - "pattern": "write output done\\. output = (?.*), error = (?.*)", + "pattern": "write output done\\. output = (?[\\s\\S]*?), error = (?[\\s\\S]*)", "action": "scriptOutput", "parameters": { "scriptType": "platform" }, "description": "Captures both stdout and stderr from AgentExecutor.log when a platform script completes. The output group contains stdout, the error group contains stderr.",