@iinm/plain-agent 1.5.0 → 1.5.2

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": "@iinm/plain-agent",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "A lightweight CLI-based coding agent",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -216,12 +216,11 @@ export function startInteractiveSession({
216
216
  onStop,
217
217
  claudeCodePlugins,
218
218
  }) {
219
- /** @type {{ turn: boolean, multiLineBuffer: string[] | null, subagentName: string, skipNextUserMessage: boolean }} */
219
+ /** @type {{ turn: boolean, multiLineBuffer: string[] | null, subagentName: string }} */
220
220
  const state = {
221
221
  turn: true,
222
222
  multiLineBuffer: null,
223
223
  subagentName: "",
224
- skipNextUserMessage: false,
225
224
  };
226
225
 
227
226
  /**
@@ -239,7 +238,6 @@ export function startInteractiveSession({
239
238
  console.log(message);
240
239
  console.log(styleText("gray", "</agent>"));
241
240
 
242
- state.skipNextUserMessage = true;
243
241
  userEventEmitter.emit("userInput", [{ type: "text", text: message }]);
244
242
  }
245
243
 
@@ -269,7 +267,6 @@ export function startInteractiveSession({
269
267
  console.log(message);
270
268
  console.log(styleText("gray", "</prompt>"));
271
269
 
272
- state.skipNextUserMessage = true;
273
270
  userEventEmitter.emit("userInput", [{ type: "text", text: message }]);
274
271
  }
275
272
 
@@ -436,7 +433,6 @@ export function startInteractiveSession({
436
433
 
437
434
  const messageWithContext = await loadUserMessageContext(fileContent);
438
435
 
439
- state.skipNextUserMessage = true;
440
436
  userEventEmitter.emit("userInput", messageWithContext);
441
437
  return;
442
438
  }
@@ -570,7 +566,6 @@ export function startInteractiveSession({
570
566
  console.log(styleText("gray", "</paste>"));
571
567
 
572
568
  const messageWithContext = await loadUserMessageContext(combinedInput);
573
- state.skipNextUserMessage = true;
574
569
  userEventEmitter.emit("userInput", messageWithContext);
575
570
  return;
576
571
  }
@@ -591,7 +586,6 @@ export function startInteractiveSession({
591
586
  }
592
587
 
593
588
  const messageWithContext = await loadUserMessageContext(inputTrimmed);
594
- state.skipNextUserMessage = true;
595
589
  userEventEmitter.emit("userInput", messageWithContext);
596
590
  }
597
591
 
@@ -654,11 +648,6 @@ export function startInteractiveSession({
654
648
  });
655
649
 
656
650
  agentEventEmitter.on("message", (message) => {
657
- // Skip user input message (echoing back what the user just sent)
658
- if (state.skipNextUserMessage) {
659
- state.skipNextUserMessage = false;
660
- return;
661
- }
662
651
  printMessage(message);
663
652
  });
664
653
 
@@ -103,7 +103,7 @@ export async function callAnthropicModel(
103
103
  "Content-Type": "application/json",
104
104
  },
105
105
  body: JSON.stringify(request),
106
- signal: AbortSignal.timeout(4 * 60 * 1000),
106
+ signal: AbortSignal.timeout(8 * 60 * 1000),
107
107
  });
108
108
 
109
109
  // bedrock + sso profile
@@ -146,7 +146,7 @@ export async function callAnthropicModel(
146
146
  method: signed.method,
147
147
  headers: signed.headers,
148
148
  body: signed.body,
149
- signal: AbortSignal.timeout(4 * 60 * 1000),
149
+ signal: AbortSignal.timeout(8 * 60 * 1000),
150
150
  });
151
151
  };
152
152
 
@@ -103,7 +103,7 @@ export async function callBedrockConverseModel(
103
103
  method: signed.method,
104
104
  headers: signed.headers,
105
105
  body: signed.body,
106
- signal: AbortSignal.timeout(120 * 1000),
106
+ signal: AbortSignal.timeout(8 * 60 * 1000),
107
107
  });
108
108
 
109
109
  if (response.status !== 200) {
@@ -143,7 +143,7 @@ export function createCacheEnabledGeminiModelCaller(
143
143
  "Content-Type": "application/json",
144
144
  },
145
145
  body: JSON.stringify(request),
146
- signal: AbortSignal.timeout(120 * 1000),
146
+ signal: AbortSignal.timeout(8 * 60 * 1000),
147
147
  });
148
148
 
149
149
  if (response.status === 429 || response.status >= 500) {
@@ -299,7 +299,7 @@ export function createCacheEnabledGeminiModelCaller(
299
299
  "Content-Type": "application/json",
300
300
  },
301
301
  body: JSON.stringify(request),
302
- signal: AbortSignal.timeout(120 * 1000),
302
+ signal: AbortSignal.timeout(8 * 60 * 1000),
303
303
  })
304
304
  .then(async (response) => {
305
305
  if (response.status !== 200) {
@@ -63,7 +63,7 @@ export async function callOpenAIModel(
63
63
  Authorization: `Bearer ${apiKey}`,
64
64
  },
65
65
  body: JSON.stringify(request),
66
- signal: AbortSignal.timeout(5 * 60 * 1000),
66
+ signal: AbortSignal.timeout(8 * 60 * 1000),
67
67
  });
68
68
 
69
69
  const retryInterval = Math.min(2 * 2 ** retryCount, 16);
@@ -103,7 +103,7 @@ export async function callOpenAICompatibleModel(
103
103
  "Content-Type": "application/json",
104
104
  },
105
105
  body: JSON.stringify(request),
106
- signal: AbortSignal.timeout(120 * 1000),
106
+ signal: AbortSignal.timeout(8 * 60 * 1000),
107
107
  });
108
108
 
109
109
  // bedrock + sso profile
@@ -146,7 +146,7 @@ export async function callOpenAICompatibleModel(
146
146
  method: signed.method,
147
147
  headers: signed.headers,
148
148
  body: signed.body,
149
- signal: AbortSignal.timeout(120 * 1000),
149
+ signal: AbortSignal.timeout(8 * 60 * 1000),
150
150
  });
151
151
  };
152
152