agent-sh 0.12.4 → 0.12.5

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.
@@ -124,7 +124,10 @@ export class ContextManager {
124
124
  return null;
125
125
  const lastSeq = this.exchanges[this.exchanges.length - 1].id;
126
126
  // Outputs already carry head+tail+spillPath stubs from capture time.
127
- const body = fresh.map((ex) => this.formatExchangeTruncated(ex)).join("\n");
127
+ const parts = fresh.map((ex) => this.formatExchangeTruncated(ex)).filter((s) => s.length > 0);
128
+ if (parts.length === 0)
129
+ return null;
130
+ const body = parts.join("\n");
128
131
  return {
129
132
  text: `<shell-events>\n${body}</shell-events>`,
130
133
  lastSeq,
@@ -171,7 +174,9 @@ export class ContextManager {
171
174
  return s;
172
175
  }
173
176
  case "agent_query":
174
- return `#${ex.id} [you] > ${ex.query}\n`;
177
+ // Suppress: query already appears as the turn's user message.
178
+ // Kept in `exchanges` so search() can find it by id.
179
+ return "";
175
180
  }
176
181
  }
177
182
  formatExchangeFull(ex) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-sh",
3
- "version": "0.12.4",
3
+ "version": "0.12.5",
4
4
  "description": "A shell-first terminal where AI is one keystroke away",
5
5
  "type": "module",
6
6
  "main": "dist/core.js",