-
Notifications
You must be signed in to change notification settings - Fork 1
feat: 实现 Skills 支持 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9d2de90
feat: 实现 Skills 支持
BukeLy 6358e41
fix: 修复 template.yaml YAML 格式问题(Description 字段引号)
BukeLy 987b09f
docs: 补充项目约束条件文档
BukeLy 310b2a1
fix: 修复Lambda容器中uvx不可用问题
BukeLy 8e94eac
fix: 修复template.yaml中环境变量引用
BukeLy 88c203b
feat: 添加Agent YAML frontmatter配置
BukeLy 86d9d72
docs: 简化hello-world skill文档
BukeLy 81eac65
docs: 添加Telegram MarkdownV2格式指南
BukeLy 88d3365
feat: 改进Telegram消息发送的MarkdownV2处理
BukeLy 4f89f4c
refactor: 移除agent-sdk-client独立项目配置
BukeLy 16752d2
test: 添加Docker中uvx可用性测试
BukeLy 5657167
fix: 优化MarkdownV2系统提示词确保正确转义
BukeLy 6e6d72d
chore: 添加python-telegram-bot测试依赖
BukeLy d70fc08
fix: 修复CI中ARM64 Docker镜像构建失败问题
BukeLy 75a5e19
fix: 修正hadolint-action版本号
BukeLy 247c18c
fix: 修复Dockerfile hadolint警告
BukeLy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| - Subagent的"tools"字段定义不支持通配符,而是需要具体的Tools名称才可以. | ||
| - template.yaml中引用Parameter时必须使用`!Ref`而非字面字符串`'${ParamName}'`. | ||
| - agents/*.md文件必须包含YAML frontmatter并定义`name`字段,否则SDK会跳过加载. | ||
| - Lambda容器中uvx不可用,需要在Dockerfile中创建符号链接或使用uv安装脚本. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| description: Hello World 示例 Skill,执行脚本输出消息 | ||
| --- | ||
|
|
||
| 执行以下操作: | ||
|
|
||
| 1. 使用 Bash 工具运行脚本:`python3 scripts/print_message.py` | ||
| 2. 将脚本的输出结果直接返回给用户 |
3 changes: 3 additions & 0 deletions
3
agent-sdk-server/claude-config/skills/hello-world/reference/message.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "message": "Hello World" | ||
| } |
11 changes: 11 additions & 0 deletions
11
agent-sdk-server/claude-config/skills/hello-world/scripts/print_message.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/usr/bin/env python3 | ||
| """输出 reference/message.json 中的所有字符""" | ||
|
|
||
| import json | ||
BukeLy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| from pathlib import Path | ||
|
|
||
| ref_path = Path(__file__).parent.parent / "reference" / "message.json" | ||
| content = ref_path.read_text(encoding="utf-8") | ||
|
|
||
| for char in content: | ||
| print(char, end="") | ||
BukeLy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,54 @@ | ||
| You are a helpful AI assistant running in a serverless environment. | ||
| You can help users with various tasks including coding, analysis, and general questions. | ||
| Be concise and helpful in your responses. | ||
| You are a helpful AI assistant\. Be concise\. | ||
|
|
||
| ## Important: Preserving SubAgent Sources | ||
| ## CRITICAL: Telegram MarkdownV2 Output Rules | ||
|
|
||
| When using SubAgents (via Task tool), you MUST preserve any "Sources" section from their responses. | ||
| If a SubAgent returns a response with a Sources section at the end, include it verbatim in your final response. | ||
| Your output is sent directly to Telegram MarkdownV2 parser\. WRONG FORMAT = PARSE ERROR\. | ||
|
|
||
| Example - if SubAgent returns: | ||
| ### MUST ESCAPE these characters EVERYWHERE \(outside code blocks\): | ||
| ``` | ||
| . → \. | ||
| - → \- | ||
| ! → \! | ||
| ( → \( | ||
| ) → \) | ||
| # → \# | ||
| + → \+ | ||
| = → \= | ||
| > → \> | ||
| | → \| | ||
| { → \{ | ||
| } → \} | ||
| ``` | ||
|
|
||
| ### Formatting syntax: | ||
| \- Bold: `*text*` | ||
| \- Italic: `_text_` | ||
| \- Code: \`code\` | ||
| \- Code block: \`\`\`lang\\ncode\\n\`\`\` | ||
|
|
||
| ### NOT supported \(DO NOT USE\): | ||
| \- Headers: `#`, `##`, `###` \- these are NOT valid in MarkdownV2 | ||
| \- Use *bold* for section titles instead | ||
|
|
||
| ### CORRECT output examples: | ||
| ``` | ||
| hello\-world # hyphen escaped | ||
| version 1\.0\.0 # dots escaped | ||
| C\# # hash escaped | ||
| 100\+ # plus escaped | ||
| \(optional\) # parens escaped | ||
| ``` | ||
|
|
||
| ### WRONG \(will cause parse error\): | ||
| ``` | ||
| hello-world # WRONG: unescaped hyphen | ||
| version 1.0.0 # WRONG: unescaped dots | ||
| ``` | ||
| [Answer content] | ||
|
|
||
| --- | ||
| **Sources:** | ||
| [1] Document - URL | ||
| ### Code blocks: NO escaping inside, use normal syntax | ||
| ```python | ||
| def hello(): | ||
| print("Hello!") | ||
| ``` | ||
|
|
||
| Your response must also end with that same Sources section. | ||
| **REMEMBER**: Escape \- \. \! \( \) \# \+ \= \> \| \{ \} OUTSIDE code blocks\! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,5 @@ dependencies = [ | |
| "claude-agent-sdk>=0.1.18", | ||
| "httpx>=0.28.1", | ||
| "loguru>=0.7.3", | ||
| "python-telegram-bot>=21.0", | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.