From 9205607c2e59c449e162ca2b1e9714628e3d80d6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 11 Mar 2025 17:27:24 +0000 Subject: [PATCH 1/5] chore(release): 0.10.0 [skip ci] # [0.10.0](https://github.com/drivecore/mycoder/compare/v0.9.0...v0.10.0) (2025-03-11) ### Bug Fixes * add deepmerge to cli package.json ([ab66377](https://github.com/drivecore/mycoder/commit/ab66377342c9f23fa874d2776e73d365141e8801)) * update hierarchical configuration system to fix failing tests ([93d949c](https://github.com/drivecore/mycoder/commit/93d949c03b7ebe96bad36713f6476c38d2a35224)) ### Features * add back token tracking, system prompt caching. ([ddc04ab](https://github.com/drivecore/mycoder/commit/ddc04ab0778eb2f571897e825c8d8ba17651db09)) * add showStdIn and showStdout options to shellMessage and shellStart ([aed1b9f](https://github.com/drivecore/mycoder/commit/aed1b9f6ba489da19f2170c136861a7c80ad6e33)), closes [#167](https://github.com/drivecore/mycoder/issues/167) * add token caching. issue 145 ([d78723b](https://github.com/drivecore/mycoder/commit/d78723bb6d0514110088caf7009e196e3f79769e)) * implement hierarchical configuration system ([84d73d1](https://github.com/drivecore/mycoder/commit/84d73d1e6324670890a203f455fe257aeb6ed07a)), closes [#153](https://github.com/drivecore/mycoder/issues/153) --- CHANGELOG.md | 16 ++++++++++++++++ package.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5b7a7a..b9ee3e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# [0.10.0](https://github.com/drivecore/mycoder/compare/v0.9.0...v0.10.0) (2025-03-11) + + +### Bug Fixes + +* add deepmerge to cli package.json ([ab66377](https://github.com/drivecore/mycoder/commit/ab66377342c9f23fa874d2776e73d365141e8801)) +* update hierarchical configuration system to fix failing tests ([93d949c](https://github.com/drivecore/mycoder/commit/93d949c03b7ebe96bad36713f6476c38d2a35224)) + + +### Features + +* add back token tracking, system prompt caching. ([ddc04ab](https://github.com/drivecore/mycoder/commit/ddc04ab0778eb2f571897e825c8d8ba17651db09)) +* add showStdIn and showStdout options to shellMessage and shellStart ([aed1b9f](https://github.com/drivecore/mycoder/commit/aed1b9f6ba489da19f2170c136861a7c80ad6e33)), closes [#167](https://github.com/drivecore/mycoder/issues/167) +* add token caching. issue 145 ([d78723b](https://github.com/drivecore/mycoder/commit/d78723bb6d0514110088caf7009e196e3f79769e)) +* implement hierarchical configuration system ([84d73d1](https://github.com/drivecore/mycoder/commit/84d73d1e6324670890a203f455fe257aeb6ed07a)), closes [#153](https://github.com/drivecore/mycoder/issues/153) + # [0.9.0](https://github.com/drivecore/mycoder/compare/v0.8.0...v0.9.0) (2025-03-11) diff --git a/package.json b/package.json index 776f352..5f219dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mycoder-monorepo", - "version": "0.9.0", + "version": "0.10.0", "type": "module", "private": true, "packageManager": "pnpm@10.2.1", From 539485488545baafba51b5096525e8fd52f2fa91 Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Tue, 11 Mar 2025 13:29:28 -0400 Subject: [PATCH 2/5] update sub-packages to 0.10.0 --- packages/agent/package.json | 2 +- packages/cli/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/agent/package.json b/packages/agent/package.json index 7bb5c9e..3422fd3 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -1,6 +1,6 @@ { "name": "mycoder-agent", - "version": "0.9.0", + "version": "0.10.0", "description": "Agent module for mycoder - an AI-powered software development assistant", "type": "module", "main": "dist/index.js", diff --git a/packages/cli/package.json b/packages/cli/package.json index 8da6b10..8f05bea 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "mycoder", "description": "A command line tool using agent that can do arbitrary tasks, including coding tasks", - "version": "0.9.0", + "version": "0.10.0", "type": "module", "bin": "./bin/cli.js", "main": "./dist/index.js", From 5972e59ab572040e564d1756ab8a5625215e14dc Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Tue, 11 Mar 2025 13:35:52 -0400 Subject: [PATCH 3/5] fix: token caching --- .../agent/src/core/llm/providers/anthropic.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/agent/src/core/llm/providers/anthropic.ts b/packages/agent/src/core/llm/providers/anthropic.ts index 835fac7..718b51c 100644 --- a/packages/agent/src/core/llm/providers/anthropic.ts +++ b/packages/agent/src/core/llm/providers/anthropic.ts @@ -57,13 +57,16 @@ function addCacheControlToMessages( if (typeof m.content === 'string') { return { ...m, - content: [ - { - type: 'text', - text: m.content, - cache_control: { type: 'ephemeral' }, - }, - ], + content: + i >= messages.length - 2 + ? [ + { + type: 'text', + text: m.content, + cache_control: { type: 'ephemeral' }, + }, + ] + : m.content, }; } return { From 6b0ed765ed07bb0b8ea6d1d61a9631de9755bfdf Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Tue, 11 Mar 2025 13:39:03 -0400 Subject: [PATCH 4/5] remove unwanted outputs. --- packages/agent/src/tools/system/shellMessage.ts | 4 ++-- packages/agent/src/tools/system/shellStart.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/agent/src/tools/system/shellMessage.ts b/packages/agent/src/tools/system/shellMessage.ts index 77479d6..49f3f7c 100644 --- a/packages/agent/src/tools/system/shellMessage.ts +++ b/packages/agent/src/tools/system/shellMessage.ts @@ -58,13 +58,13 @@ const parameterSchema = z.object({ .boolean() .optional() .describe( - 'Whether to show the input in the logs (default: false or value from shellStart)', + 'Whether to show the input to the user, or keep the output clean (default: false or value from shellStart)', ), showStdout: z .boolean() .optional() .describe( - 'Whether to show output in the logs (default: false or value from shellStart)', + 'Whether to show output to the user, or keep the output clean (default: false or value from shellStart)', ), }); diff --git a/packages/agent/src/tools/system/shellStart.ts b/packages/agent/src/tools/system/shellStart.ts index 8832ff4..231c50b 100644 --- a/packages/agent/src/tools/system/shellStart.ts +++ b/packages/agent/src/tools/system/shellStart.ts @@ -41,11 +41,15 @@ const parameterSchema = z.object({ showStdIn: z .boolean() .optional() - .describe('Whether to show the command input in the logs (default: false)'), + .describe( + 'Whether to show the command input to the user, or keep the output clean (default: false)', + ), showStdout: z .boolean() .optional() - .describe('Whether to show command output in the logs (default: false)'), + .describe( + 'Whether to show command output to the user, or keep the output clean (default: false)', + ), }); const returnSchema = z.union([ From d1507b05e6d6b0d40476206e70810fd1c8409d13 Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Tue, 11 Mar 2025 13:42:32 -0400 Subject: [PATCH 5/5] improve Github mode prompt. --- packages/agent/src/core/toolAgent/config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/agent/src/core/toolAgent/config.ts b/packages/agent/src/core/toolAgent/config.ts index 3ae76a8..29737c9 100644 --- a/packages/agent/src/core/toolAgent/config.ts +++ b/packages/agent/src/core/toolAgent/config.ts @@ -144,15 +144,15 @@ export function getDefaultSystemPrompt(toolContext: ToolContext): string { '', '## GitHub Mode', 'GitHub mode is enabled. You should work with GitHub issues and PRs as part of your workflow:', - '- Start from existing GitHub issues or create new ones for tasks', + '- Start from existing GitHub issues (gh issue view 21) or create new ones (gh issue create) for tasks', "- Create branches for issues you're working on", '- Make commits with descriptive messages', - '- Create PRs when work is complete', + '- Create PRs when work is complete (gh pr create)', '- Create additional GitHub issues for follow-up tasks or ideas', '', - 'You can use the GitHub CLI (`gh`) for all GitHub interactions.', + 'You should use the Github CLI tool, gh, and the git cli tool, git, that you can access via shell commands.', '', - 'When creating GitHub issues, PRs, or comments, use temporary markdown files for the content instead of inline text:', + 'When creating GitHub issues, PRs, or comments, via the gh cli tool, use temporary markdown files for the content instead of inline text:', '- Create a temporary markdown file with the content you want to include', '- Use the file with GitHub CLI commands (e.g., `gh issue create --body-file temp.md`)', '- Clean up the temporary file when done',