@tencent-ai/agent-sdk 0.3.9 → 0.3.11

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/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencent-ai/codebuddy-code",
3
- "version": "2.37.13",
3
+ "version": "2.37.16",
4
4
  "description": "Use CodeBuddy, Tencent's AI assistant, right from your terminal. CodeBuddy can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.",
5
5
  "main": "lib/node/index.js",
6
6
  "typings": "lib/node/index.d.ts",
@@ -323,6 +323,6 @@
323
323
  "BillingNotice": false,
324
324
  "CustomModelsJSON": true
325
325
  },
326
- "commit": "48b99d74465d2ba1b6b306e0de16e775d003e101",
327
- "date": "2026-01-22T08:35:43.078Z"
326
+ "commit": "1a8ab033d35669c647015b60d0af9c5da9cd3526",
327
+ "date": "2026-01-23T07:29:11.576Z"
328
328
  }
@@ -325,6 +325,6 @@
325
325
  "BillingNotice": false,
326
326
  "CustomModelsJSON": true
327
327
  },
328
- "commit": "48b99d74465d2ba1b6b306e0de16e775d003e101",
329
- "date": "2026-01-22T08:35:40.339Z"
328
+ "commit": "1a8ab033d35669c647015b60d0af9c5da9cd3526",
329
+ "date": "2026-01-23T07:29:08.997Z"
330
330
  }
@@ -535,6 +535,6 @@
535
535
  "BillingNotice": false,
536
536
  "CustomModelsJSON": true
537
537
  },
538
- "commit": "48b99d74465d2ba1b6b306e0de16e775d003e101",
539
- "date": "2026-01-22T08:35:41.713Z"
538
+ "commit": "1a8ab033d35669c647015b60d0af9c5da9cd3526",
539
+ "date": "2026-01-23T07:29:10.281Z"
540
540
  }
package/cli/product.json CHANGED
@@ -422,7 +422,7 @@
422
422
  },
423
423
  {
424
424
  "name": "tool-bash-description",
425
- "template": "Executes a given command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nIMPORTANT: The user's default shell is {{defaultShell}}. Generate commands using syntax compatible with this shell.\n\nIMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location\n - For example, before running \"mkdir foo/bar\", first use `ls foo` to check that \"foo\" exists and is the intended parent directory\n\n2. Command Execution:\n - Always quote file paths that contain spaces with double quotes (e.g., cd \"path with spaces/file.txt\")\n - Examples of proper quoting:\n - cd \"/Users/name/My Documents\" (correct)\n - cd /Users/name/My Documents (incorrect - will fail)\n - python \"/path/with spaces/script.py\" (correct)\n - python /path/with spaces/script.py (incorrect - will fail)\n - After ensuring proper quoting, execute the command.\n - Capture the output of the command.\n\nUsage notes:\n - The command argument is required.\n - You can specify an optional timeout in milliseconds (up to 600000ms / 10 minutes). If not specified, commands will timeout after 120000ms (2 minutes).\n - It is very helpful if you write a clear, concise description of what this command does in 5-10 words.\n - If the output exceeds 30000 characters, output will be truncated before being returned to you.\n - You can use the `run_in_background` parameter to run the command in the background, which allows you to continue working while the command runs. You can monitor the output using the Bash tool as it becomes available. You do not need to use '&' at the end of the command when using this parameter.\n \n - Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:\n - File search: Use Glob (NOT find or ls)\n - Content search: Use Grep (NOT grep or rg)\n - Read files: Use Read (NOT cat/head/tail)\n - Edit files: Use Edit (NOT sed/awk)\n - Write files: Use Write (NOT echo >/cat <<EOF)\n - Communication: Output text directly (NOT echo/printf)\n - When issuing multiple commands:\n - If the commands are independent and can run in parallel, make multiple Bash tool calls in a single message. For example, if you need to run \"git status\" and \"git diff\", send a single message with two Bash tool calls in parallel.\n - If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., `git add . && git commit -m \"message\" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.\n - Use ';' only when you need to run commands sequentially but don't care if earlier commands fail\n - DO NOT use newlines to separate commands (newlines are ok in quoted strings)\n - Try to maintain your current working directory throughout the session by using absolute paths and avoiding usage of `cd`. You may use `cd` if the User explicitly requests it.\n <good-example>\n pytest /foo/bar/tests\n </good-example>\n <bad-example>\n cd /foo/bar && pytest tests\n </bad-example>\n\n# Committing changes with git\n\nOnly create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully:\n\nGit Safety Protocol:\n- NEVER update the git config\n- NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them\n- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it\n- NEVER run force push to main/master, warn the user if they request it\n- Avoid git commit --amend. ONLY use --amend when either (1) user explicitly requested amend OR (2) adding edits from pre-commit hook (additional instructions below)\n- Before amending: ALWAYS check authorship (git log -1 --format='%an %ae')\n- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel, each using the Bash tool:\n - Run a git status command to see all untracked files.\n - Run a git diff command to see both staged and unstaged changes that will be committed.\n - Run a git log command to see recent commit messages, so that you can follow this repository's commit message style.\n2. Analyze all staged changes (both previously staged and newly added) and draft a commit message:\n - Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.). Ensure the message accurately reflects the changes and their purpose (i.e. \"add\" means a wholly new feature, \"update\" means an enhancement to an existing feature, \"fix\" means a bug fix, etc.).\n - Do not commit files that likely contain secrets (.env, credentials.json, etc). Warn the user if they specifically request to commit those files\n - Draft a concise (1-2 sentences) commit message that focuses on the \"why\" rather than the \"what\"\n - Ensure it accurately reflects the changes and their purpose\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands:\n - Add relevant untracked files to the staging area.\n - Create the commit with a message{% if settings.includeCoAuthoredBy %} ending with:\n šŸ¤– Generated with [CodeBuddy Code]\n\n Co-Authored-By: CodeBuddy Code{% endif %}\n - Run git status to make sure the commit succeeded.\n Note: git status depends on the commit completing, so run it sequentially after the commit.\n4. If the commit fails due to pre-commit hook changes, retry ONCE. If it succeeds but files were modified by the hook, verify it's safe to amend:\n - Check authorship: git log -1 --format='%an %ae'\n - Check not pushed: git status shows \"Your branch is ahead\"\n - If both true: amend your commit. Otherwise: create NEW commit (never amend other developers' commits)\n\nImportant notes:\n- NEVER run additional commands to read or explore code, besides git bash commands\n- NEVER use the TodoWrite or Task tools\n- DO NOT push to the remote repository unless the user explicitly asks you to do so\n- IMPORTANT: Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported.\n- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit\n- In order to ensure good formatting, ALWAYS pass the commit message via a HEREDOC, a la this example:\n<example>\ngit commit -m \"$(cat <<'EOF'\n Commit message here.\n{% if settings.includeCoAuthoredBy %}\n\n\n šŸ¤– Generated with [CodeBuddy Code]\n\n Co-Authored-By: CodeBuddy Code\n{% endif %}\n EOF\n )\"\n</example>\n\n# Creating pull requests\nUse the gh command via the Bash tool for ALL GitHub-related tasks including working with issues, pull requests, checks, and releases. If given a Github URL use the gh command to get the information needed.\n\nIMPORTANT: When the user asks you to create a pull request, follow these steps carefully:\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged from the main branch:\n - Run a git status command to see all untracked files\n - Run a git diff command to see both staged and unstaged changes that will be committed\n - Check if the current branch tracks a remote branch and is up to date with the remote, so you know if you need to push to the remote\n - Run a git log command and `git diff [base-branch]...HEAD` to understand the full commit history for the current branch (from the time it diverged from the base branch)\n2. Analyze all changes that will be included in the pull request, making sure to look at all relevant commits (NOT just the latest commit, but ALL commits that will be included in the pull request!!!), and draft a pull request summary\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands in parallel:\n - Create new branch if needed\n - Push to remote with -u flag if needed\n - Create PR using gh pr create with the format below. Use a HEREDOC to pass the body to ensure correct formatting.\n<example>\ngh pr create --title \"the pr title\" --body \"$(cat <<'EOF'\n## Summary\n<1-3 bullet points>\n\n## Test plan\n[Checklist of TODOs for testing the pull request...]\n{% if settings.includeCoAuthoredBy %}\n\nšŸ¤– Generated with [CodeBuddy Code]\n{% endif %}\nEOF\n)\"\n</example>\n\nImportant:\n- DO NOT use the TodoWrite or Task tools\n- Return the PR URL when you're done, so the user can see it\n\n# Other common operations\n- View comments on a Github PR: gh api repos/foo/bar/pulls/123/comments\n\n\n# Command Execution Safety Rules \n\n* Always inspect every command before suggesting or executing.\n* If the command is unsafe or harmful (e.g., wiping system files, dropping databases, altering permissions dangerously, disabling protections):\n\n * Warn the user clearly that it is unsafe.\n * Refuse execution — do not run or simulate it.\n * Require explicit user revision before proceeding.\n* Unsafe commands → **warn + block execution (cannot proceed).**\n* For safe commands:\n\n * Explain what the command does in clear language.\n * Expand words and regenerate phrasing for readability during analysis (read) tasks.\n * Use clean, structured formatting when presenting output.\n"
425
+ "template": "Executes a given command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nIMPORTANT: The user's default shell is {{defaultShell}}. Generate commands using syntax compatible with this shell.\n\nIMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location\n - For example, before running \"mkdir foo/bar\", first use `ls foo` to check that \"foo\" exists and is the intended parent directory\n\n2. Command Execution:\n - Always quote file paths that contain spaces with double quotes (e.g., cd \"path with spaces/file.txt\")\n - Examples of proper quoting:\n - cd \"/Users/name/My Documents\" (correct)\n - cd /Users/name/My Documents (incorrect - will fail)\n - python \"/path/with spaces/script.py\" (correct)\n - python /path/with spaces/script.py (incorrect - will fail)\n - After ensuring proper quoting, execute the command.\n - Capture the output of the command.\n\nUsage notes:\n - The command argument is required.\n - You can specify an optional timeout in milliseconds (up to 600000ms / 10 minutes). If not specified, commands will timeout after 120000ms (2 minutes).\n - It is very helpful if you write a clear, concise description of what this command does in 5-10 words.\n - If the output exceeds 20000 characters, output will be truncated before being returned to you.\n - You can use the `run_in_background` parameter to run the command in the background, which allows you to continue working while the command runs. You can monitor the output using the Bash tool as it becomes available. You do not need to use '&' at the end of the command when using this parameter.\n \n - Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:\n - File search: Use Glob (NOT find or ls)\n - Content search: Use Grep (NOT grep or rg)\n - Read files: Use Read (NOT cat/head/tail)\n - Edit files: Use Edit (NOT sed/awk)\n - Write files: Use Write (NOT echo >/cat <<EOF)\n - Communication: Output text directly (NOT echo/printf)\n - When issuing multiple commands:\n - If the commands are independent and can run in parallel, make multiple Bash tool calls in a single message. For example, if you need to run \"git status\" and \"git diff\", send a single message with two Bash tool calls in parallel.\n - If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., `git add . && git commit -m \"message\" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.\n - Use ';' only when you need to run commands sequentially but don't care if earlier commands fail\n - DO NOT use newlines to separate commands (newlines are ok in quoted strings)\n - Try to maintain your current working directory throughout the session by using absolute paths and avoiding usage of `cd`. You may use `cd` if the User explicitly requests it.\n <good-example>\n pytest /foo/bar/tests\n </good-example>\n <bad-example>\n cd /foo/bar && pytest tests\n </bad-example>\n\n# Committing changes with git\n\nOnly create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully:\n\nGit Safety Protocol:\n- NEVER update the git config\n- NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them\n- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it\n- NEVER run force push to main/master, warn the user if they request it\n- Avoid git commit --amend. ONLY use --amend when either (1) user explicitly requested amend OR (2) adding edits from pre-commit hook (additional instructions below)\n- Before amending: ALWAYS check authorship (git log -1 --format='%an %ae')\n- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel, each using the Bash tool:\n - Run a git status command to see all untracked files.\n - Run a git diff command to see both staged and unstaged changes that will be committed.\n - Run a git log command to see recent commit messages, so that you can follow this repository's commit message style.\n2. Analyze all staged changes (both previously staged and newly added) and draft a commit message:\n - Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.). Ensure the message accurately reflects the changes and their purpose (i.e. \"add\" means a wholly new feature, \"update\" means an enhancement to an existing feature, \"fix\" means a bug fix, etc.).\n - Do not commit files that likely contain secrets (.env, credentials.json, etc). Warn the user if they specifically request to commit those files\n - Draft a concise (1-2 sentences) commit message that focuses on the \"why\" rather than the \"what\"\n - Ensure it accurately reflects the changes and their purpose\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands:\n - Add relevant untracked files to the staging area.\n - Create the commit with a message{% if settings.includeCoAuthoredBy %} ending with:\n šŸ¤– Generated with [CodeBuddy Code]\n\n Co-Authored-By: CodeBuddy Code{% endif %}\n - Run git status to make sure the commit succeeded.\n Note: git status depends on the commit completing, so run it sequentially after the commit.\n4. If the commit fails due to pre-commit hook changes, retry ONCE. If it succeeds but files were modified by the hook, verify it's safe to amend:\n - Check authorship: git log -1 --format='%an %ae'\n - Check not pushed: git status shows \"Your branch is ahead\"\n - If both true: amend your commit. Otherwise: create NEW commit (never amend other developers' commits)\n\nImportant notes:\n- NEVER run additional commands to read or explore code, besides git bash commands\n- NEVER use the TodoWrite or Task tools\n- DO NOT push to the remote repository unless the user explicitly asks you to do so\n- IMPORTANT: Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported.\n- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit\n- In order to ensure good formatting, ALWAYS pass the commit message via a HEREDOC, a la this example:\n<example>\ngit commit -m \"$(cat <<'EOF'\n Commit message here.\n{% if settings.includeCoAuthoredBy %}\n\n\n šŸ¤– Generated with [CodeBuddy Code]\n\n Co-Authored-By: CodeBuddy Code\n{% endif %}\n EOF\n )\"\n</example>\n\n# Creating pull requests\nUse the gh command via the Bash tool for ALL GitHub-related tasks including working with issues, pull requests, checks, and releases. If given a Github URL use the gh command to get the information needed.\n\nIMPORTANT: When the user asks you to create a pull request, follow these steps carefully:\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged from the main branch:\n - Run a git status command to see all untracked files\n - Run a git diff command to see both staged and unstaged changes that will be committed\n - Check if the current branch tracks a remote branch and is up to date with the remote, so you know if you need to push to the remote\n - Run a git log command and `git diff [base-branch]...HEAD` to understand the full commit history for the current branch (from the time it diverged from the base branch)\n2. Analyze all changes that will be included in the pull request, making sure to look at all relevant commits (NOT just the latest commit, but ALL commits that will be included in the pull request!!!), and draft a pull request summary\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands in parallel:\n - Create new branch if needed\n - Push to remote with -u flag if needed\n - Create PR using gh pr create with the format below. Use a HEREDOC to pass the body to ensure correct formatting.\n<example>\ngh pr create --title \"the pr title\" --body \"$(cat <<'EOF'\n## Summary\n<1-3 bullet points>\n\n## Test plan\n[Checklist of TODOs for testing the pull request...]\n{% if settings.includeCoAuthoredBy %}\n\nšŸ¤– Generated with [CodeBuddy Code]\n{% endif %}\nEOF\n)\"\n</example>\n\nImportant:\n- DO NOT use the TodoWrite or Task tools\n- Return the PR URL when you're done, so the user can see it\n\n# Other common operations\n- View comments on a Github PR: gh api repos/foo/bar/pulls/123/comments\n\n\n# Command Execution Safety Rules \n\n* Always inspect every command before suggesting or executing.\n* If the command is unsafe or harmful (e.g., wiping system files, dropping databases, altering permissions dangerously, disabling protections):\n\n * Warn the user clearly that it is unsafe.\n * Refuse execution — do not run or simulate it.\n * Require explicit user revision before proceeding.\n* Unsafe commands → **warn + block execution (cannot proceed).**\n* For safe commands:\n\n * Explain what the command does in clear language.\n * Expand words and regenerate phrasing for readability during analysis (read) tasks.\n * Use clean, structured formatting when presenting output.\n"
426
426
  },
427
427
  {
428
428
  "name": "tool-glob-description",
@@ -1044,6 +1044,6 @@
1044
1044
  "description": "tool-structuredoutput-description"
1045
1045
  }
1046
1046
  ],
1047
- "commit": "48b99d74465d2ba1b6b306e0de16e775d003e101",
1048
- "date": "2026-01-22T08:35:38.990Z"
1047
+ "commit": "1a8ab033d35669c647015b60d0af9c5da9cd3526",
1048
+ "date": "2026-01-23T07:29:07.717Z"
1049
1049
  }
@@ -205,6 +205,6 @@
205
205
  "BillingNotice": false,
206
206
  "CustomModelsJSON": true
207
207
  },
208
- "commit": "48b99d74465d2ba1b6b306e0de16e775d003e101",
209
- "date": "2026-01-22T08:35:44.432Z"
208
+ "commit": "1a8ab033d35669c647015b60d0af9c5da9cd3526",
209
+ "date": "2026-01-23T07:29:12.859Z"
210
210
  }
@@ -57,6 +57,15 @@ export interface AcpAgentOptions {
57
57
  loadSession?: boolean;
58
58
  [key: string]: unknown;
59
59
  };
60
+ /**
61
+ * Available permission modes configuration.
62
+ * If not provided, defaults to basic 'default' and 'plan' modes.
63
+ */
64
+ availableModes?: Array<{
65
+ id: string;
66
+ name: string;
67
+ description: string;
68
+ }>;
60
69
  }
61
70
  /**
62
71
  * AcpAgent - Implements the official ACP Agent interface
@@ -140,6 +149,18 @@ export declare class AcpAgent implements Agent {
140
149
  * Get all session IDs.
141
150
  */
142
151
  getSessionIds(): string[];
152
+ /**
153
+ * Get session modes configuration.
154
+ * Returns the available modes and current mode from the given session.
155
+ * @param session - Optional session to get current mode from. If not provided, uses default.
156
+ */
157
+ private getSessionModes;
158
+ /**
159
+ * Get session models configuration.
160
+ * Returns the available models and current model from the given session.
161
+ * @param session - Optional session to get current model from.
162
+ */
163
+ private getSessionModels;
143
164
  /**
144
165
  * Extract prompt text from ACP content blocks.
145
166
  */
@@ -155,6 +176,8 @@ export declare class AcpAgent implements Agent {
155
176
  * - tool_call: New tool call started
156
177
  * - tool_call_update: Tool call status/result update
157
178
  * - agent_message_chunk: Text content from the agent
179
+ *
180
+ * Preserves all params fields including _meta and other metadata.
158
181
  */
159
182
  private sendSessionUpdate;
160
183
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/acp/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACR,KAAK,EACL,mBAAmB,EAEnB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,cAAc,EAGjB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAW,OAAO,EAAE,MAAM,UAAU,CAAC;AAIjD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,iBAAiB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE7G;;GAEG;AACH,MAAM,MAAM,aAAa,GA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Agent {
113
113
  if (this.options.onNewSession) {
114
114
  const session = await this.options.onNewSession({ ...params, sessionId });
115
115
  this.sessions.set(sessionId, session);
116
- return { sessionId };
116
+ return {
117
+ sessionId,
118
+ modes: this.getSessionModes(session),
119
+ models: this.getSessionModels(session),
120
+ };
117
121
  }
118
122
  // If we have a default session, return the first registered sessionId
119
123
  if (this.defaultSession && this.sessions.size > 0) {
120
124
  const firstSessionId = this.sessions.keys().next().value;
121
- return { sessionId: firstSessionId };
125
+ return {
126
+ sessionId: firstSessionId,
127
+ modes: this.getSessionModes(this.defaultSession),
128
+ models: this.getSessionModels(this.defaultSession),
129
+ };
122
130
  }
123
131
  throw new Error('No session available. Provide either a session or onNewSession.');
124
132
  }
@@ -132,13 +140,20 @@ class AcpAgent {
132
140
  const { sessionId } = params;
133
141
  // Check if session is already loaded
134
142
  if (this.sessions.has(sessionId)) {
135
- return {};
143
+ const session = this.sessions.get(sessionId);
144
+ return {
145
+ modes: this.getSessionModes(session),
146
+ models: this.getSessionModels(session),
147
+ };
136
148
  }
137
149
  // If we have a session loader, use it to resume the session
138
150
  if (this.options.onLoadSession) {
139
151
  const session = await this.options.onLoadSession(params);
140
152
  this.sessions.set(sessionId, session);
141
- return {};
153
+ return {
154
+ modes: this.getSessionModes(session),
155
+ models: this.getSessionModels(session),
156
+ };
142
157
  }
143
158
  throw new Error('Session loading not supported. Provide onLoadSession in options.');
144
159
  }
@@ -225,6 +240,54 @@ class AcpAgent {
225
240
  return Array.from(this.sessions.keys());
226
241
  }
227
242
  // ============= Private Helper Methods =============
243
+ /**
244
+ * Get session modes configuration.
245
+ * Returns the available modes and current mode from the given session.
246
+ * @param session - Optional session to get current mode from. If not provided, uses default.
247
+ */
248
+ getSessionModes(session) {
249
+ var _a, _b;
250
+ // Use configured modes or default basic set
251
+ const availableModes = (_a = this.options.availableModes) !== null && _a !== void 0 ? _a : [
252
+ {
253
+ id: 'default',
254
+ name: 'Default',
255
+ description: 'Standard assistant mode with full capabilities',
256
+ },
257
+ {
258
+ id: 'plan',
259
+ name: 'Plan',
260
+ description: 'Planning mode for designing implementation approaches',
261
+ },
262
+ ];
263
+ // Get current mode from the provided session or fall back to default
264
+ const currentModeId = (_b = session === null || session === void 0 ? void 0 : session.getPermissionMode()) !== null && _b !== void 0 ? _b : 'default';
265
+ return {
266
+ availableModes,
267
+ currentModeId,
268
+ };
269
+ }
270
+ /**
271
+ * Get session models configuration.
272
+ * Returns the available models and current model from the given session.
273
+ * @param session - Optional session to get current model from.
274
+ */
275
+ getSessionModels(session) {
276
+ var _a;
277
+ // TODO: availableModels cannot be obtained at the moment
278
+ // Future implementation may include:
279
+ // - Configuring via AcpAgentOptions
280
+ // - Fetching from external API
281
+ // - Reading from configuration file
282
+ const availableModels = [];
283
+ // Get current model from the provided session
284
+ // If no model is set, use undefined (no default fallback)
285
+ const currentModelId = (_a = session === null || session === void 0 ? void 0 : session.getModel()) !== null && _a !== void 0 ? _a : undefined;
286
+ return {
287
+ availableModels,
288
+ currentModelId: currentModelId,
289
+ };
290
+ }
228
291
  /**
229
292
  * Extract prompt text from ACP content blocks.
230
293
  */
@@ -251,6 +314,8 @@ class AcpAgent {
251
314
  * - tool_call: New tool call started
252
315
  * - tool_call_update: Tool call status/result update
253
316
  * - agent_message_chunk: Text content from the agent
317
+ *
318
+ * Preserves all params fields including _meta and other metadata.
254
319
  */
255
320
  async sendSessionUpdate(sessionId, acpMessage) {
256
321
  try {
@@ -258,8 +323,13 @@ class AcpAgent {
258
323
  if ('method' in acpMessage && acpMessage.method === 'session/update') {
259
324
  const params = acpMessage.params;
260
325
  if (params === null || params === void 0 ? void 0 : params.update) {
261
- // Pass the update directly - it already has the correct format
262
- await this.connection.sessionUpdate({ sessionId, update: params.update });
326
+ // Pass the entire params object to preserve all fields (_meta, etc.)
327
+ // sessionId takes precedence to ensure correct routing
328
+ await this.connection.sessionUpdate({
329
+ ...params,
330
+ sessionId,
331
+ update: params.update,
332
+ });
263
333
  }
264
334
  }
265
335
  else if ('method' in acpMessage && acpMessage.method === 'session/error') {
@@ -274,7 +344,12 @@ class AcpAgent {
274
344
  text: `Error: ${errorText}`,
275
345
  },
276
346
  };
277
- await this.connection.sessionUpdate({ sessionId, update });
347
+ // äæē•™ params äø­ēš„ę‰€ęœ‰å…ƒę•°ę®å­—ę®µ
348
+ await this.connection.sessionUpdate({
349
+ ...params,
350
+ sessionId,
351
+ update
352
+ });
278
353
  }
279
354
  // session/result is handled by prompt() return value
280
355
  }
@@ -1 +1 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/acp/agent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAuBH,qDAAkD;AAClD,mCAAoC;AAsDpC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,QAAQ;IAQjB;;;;;;;OAOG;IACH,YAAY,UAA+B,EAAE,OAAuB,EAAE,UAA2B,EAAE;;QAb3F,aAAQ,GAAyB,IAAI,GAAG,EAAE,CAAC;QAE3C,0BAAqB,GAAkB,IAAI,CAAC;QAC5C,0BAAqB,GAA2B,IAAI,CAAC;QAWzD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG;YACX,eAAe,EAAE,MAAA,OAAO,CAAC,eAAe,mCAAI,CAAC;YAC7C,SAAS,EAAE,MAAA,OAAO,CAAC,SAAS,mCAAI;gBAC5B,IAAI,EAAE,gBAAgB;gBACtB,OAAO,EAAE,OAAO;aACnB;YACD,GAAG,OAAO;SACb,CAAC;QAEF,oEAAoE;QACpE,IAAI,OAAO,EAAE,CAAC;YACV,MAAM,SAAS,GAAG,IAAA,mBAAU,GAAE,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC1C,CAAC;QAED,kCAAkC;QAClC,mEAAmE;QACnE,mEAAmE;QACnE,cAAc,CAAC,GAAG,EAAE;Y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0CAA0C,EAAE,KAAK,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;IAED;;OAEG;IACK,OAAO;QACX,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAClC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAClC,wEAAwE;IAC5E,CAAC;CACJ;AAjYD,4BAiYC"}
@@ -77,10 +77,35 @@ export interface AcpToolResult {
77
77
  */
78
78
  export declare abstract class AcpTransformer {
79
79
  /**
80
- * Convert SDK ToolUseContentBlock to ACP Tool Call
81
- * Preserves all input data in rawInput field
80
+ * Convert SDK ToolUseContentBlock to complete session/update params
81
+ * Returns an object that can be spread directly into AcpMessage params
82
+ *
83
+ * This is the preferred method for creating tool call messages that comply with ACP spec.
84
+ *
85
+ * @param toolUse - SDK tool use block
86
+ * @param sessionId - Session ID for the message
87
+ * @param messageId - Optional message ID (defaults to toolUse.id)
88
+ * @returns Complete params object ready to be used in session/update message
82
89
  */
83
- static convertSdkToolUseToAcpToolCall(toolUse: ToolUseContentBlock): AcpToolCall;
90
+ static convertSdkToolUseToSessionUpdate(toolUse: ToolUseContentBlock, sessionId: string, messageId?: string): {
91
+ sessionId: string;
92
+ update: {
93
+ sessionUpdate: "tool_call";
94
+ toolCallId: string;
95
+ status: "pending";
96
+ title: string;
97
+ kind: ToolKind;
98
+ rawInput: Record<string, unknown>;
99
+ content: ToolCallContent[] | undefined;
100
+ locations: ToolCallLocation[] | undefined;
101
+ };
102
+ _meta: {
103
+ 'codebuddy.ai': {
104
+ toolName: string;
105
+ messageId: string;
106
+ };
107
+ };
108
+ };
84
109
  /**
85
110
  * Convert ACP Tool Result to SDK ToolResultContentBlock
86
111
  * Preserves tool_use_id and ensures error state is tracked
@@ -1 +1 @@
1
- {"version":3,"file":"tool-converter.d.ts","sourceRoot":"","sources":["../../src/acp/tool-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACR,mBAAmB,EACnB,sBAAsB,EAItB,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