@iinm/plain-agent 1.10.18 → 1.10.19

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.
@@ -7,4 +7,4 @@ Create a commit.
7
7
  - Check the commit message format: git ["log", "--no-merges", "--oneline", "-n", "10"]
8
8
  - Create a concise and descriptive commit message that follows the project's commit convention.
9
9
  - Create a commit:
10
- exec_command: git ["commit", "-m", "<commit message>", "-m", "", "-m", "Co-authored-by: Plain Agent <plain-agent+<model-name>@localhost>"]
10
+ exec_command: git ["commit", "-m", "<commit message>", "-m", "", "-m", "Co-authored-by: <model-name> <<model-name>@localhost>"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iinm/plain-agent",
3
- "version": "1.10.18",
3
+ "version": "1.10.19",
4
4
  "description": "A lightweight coding agent for the terminal.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/main.mjs CHANGED
@@ -261,6 +261,27 @@ export async function main(argv = process.argv) {
261
261
  modelNameWithVariant = resumedState.modelName;
262
262
  }
263
263
 
264
+ const [modelName, modelVariant] = modelNameWithVariant.split("+");
265
+ const modelDef = (appConfig.models ?? []).find(
266
+ (entry) => entry.name === modelName && entry.variant === modelVariant,
267
+ );
268
+ if (!modelDef) {
269
+ throw new Error(
270
+ `Model "${modelNameWithVariant}" not found in configuration.`,
271
+ );
272
+ }
273
+
274
+ const platform = (appConfig.platforms ?? []).find(
275
+ (entry) =>
276
+ entry.name === modelDef.platform.name &&
277
+ entry.variant === modelDef.platform.variant,
278
+ );
279
+ if (!platform) {
280
+ throw new Error(
281
+ `Platform ${modelDef.platform.name} variant=${modelDef.platform.variant} not found in configuration.`,
282
+ );
283
+ }
284
+
264
285
  const pluginPaths = resolvePluginPaths(appConfig.claudeCodePlugins ?? []);
265
286
  const [prompts, agentRoles] = await Promise.all([
266
287
  loadPrompts(pluginPaths),
@@ -269,7 +290,7 @@ export async function main(argv = process.argv) {
269
290
 
270
291
  const prompt = createPrompt({
271
292
  username: USER_NAME,
272
- modelName: modelNameWithVariant,
293
+ modelName,
273
294
  workingDir: process.cwd(),
274
295
  today: new Date().toISOString().split("T")[0],
275
296
  sessionId,
@@ -290,27 +311,6 @@ export async function main(argv = process.argv) {
290
311
  createSwitchToMainAgentTool(),
291
312
  ];
292
313
 
293
- const [modelName, modelVariant] = modelNameWithVariant.split("+");
294
- const modelDef = (appConfig.models ?? []).find(
295
- (entry) => entry.name === modelName && entry.variant === modelVariant,
296
- );
297
- if (!modelDef) {
298
- throw new Error(
299
- `Model "${modelNameWithVariant}" not found in configuration.`,
300
- );
301
- }
302
-
303
- const platform = (appConfig.platforms ?? []).find(
304
- (entry) =>
305
- entry.name === modelDef.platform.name &&
306
- entry.variant === modelDef.platform.variant,
307
- );
308
- if (!platform) {
309
- throw new Error(
310
- `Platform ${modelDef.platform.name} variant=${modelDef.platform.variant} not found in configuration.`,
311
- );
312
- }
313
-
314
314
  if (appConfig.tools?.webSearch) {
315
315
  const webSearchConfig = appConfig.tools.webSearch;
316
316
  if (webSearchConfig.provider === "command") {