@engineeros/connector 0.11.0 → 0.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engineeros/connector",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Connect a local coding agent to EngineerOS, using ACP when supported.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -137,14 +137,21 @@ export function normalizeAgentStructuredOutput(
137
137
  "EngineerOS structured output requires a heading contract.",
138
138
  );
139
139
  }
140
- const content = String(response || "").trim();
141
- if (!content) {
142
- throw new Error("Agent completed without returning a response.");
143
- }
144
- const lines = content.split(/\r?\n/);
145
- const headingIndex = lines.findIndex(
146
- (line, index) => index < 20 && line.trim() === outputHeading,
147
- );
140
+ const content = String(response || "").trim();
141
+ if (!content) {
142
+ throw new Error("Agent completed without returning a response.");
143
+ }
144
+ const firstSection = {
145
+ "# Workspace Assessment": "## Executive Summary",
146
+ "# Workspace Assessment Delta": "## Updated Executive Summary",
147
+ }[outputHeading];
148
+ if (firstSection && content.startsWith(firstSection)) {
149
+ return `${outputHeading}\n\n${content}`;
150
+ }
151
+ const lines = content.split(/\r?\n/);
152
+ const headingIndex = lines.findIndex(
153
+ (line) => line.trim() === outputHeading,
154
+ );
148
155
  const preamble =
149
156
  headingIndex >= 0 ? lines.slice(0, headingIndex).join("\n") : content;
150
157
  if (headingIndex < 0) {