Skip to content

fix(skill): use FC temp OSS for skill code packages#18

Open
117503445 wants to merge 6 commits into
mainfrom
create-agentrun-skill
Open

fix(skill): use FC temp OSS for skill code packages#18
117503445 wants to merge 6 commits into
mainfrom
create-agentrun-skill

Conversation

@117503445

Copy link
Copy Markdown
Collaborator

Summary

  • Change ar skill create --code-dir to upload the skill ZIP to FC TempBucket OSS and create a SKILL/CODE_PACKAGE tool.
  • Implement FC 2016 tempBucketToken signing with Authorization: FC ... instead of POP/CommonRequest auth.
  • Send codeConfiguration.ossBucketName/ossObjectName/language/command and stop sending inline zipFile for normal create.
  • Add placeholder main.py injection for skill directories that do not contain an entrypoint.
  • Add unit/integration coverage and update English/Chinese docs.

Real verification

Ran a real 149 cn-hangzhou smoke test with the patched CLI:

tool_name: codeclaw-cli-fc-temp-skill-20260702195801
tool_id: 7af864e0-37c0-493d-b032-a167ee820334
status: READY

Review notes

Ran three Paseo sub-agent reviews with non-Codex providers:

  • claude/opus: found missing-account-id error handling gap; fixed and added regression test.
  • claude/qwen3.7-max: suggested normalizing Date header lookup; fixed.
  • claude/glm-5.2: suggested FC signature golden test; added.

Tests

ruff check src/ tests/
ruff format --check src/ tests/
mypy src/agentrun_cli
pytest tests/unit tests/integration --cov=agentrun_cli --cov-fail-under=95

Result: 584 passed, total coverage 95.27%.

Signed-off-by: 117503445 <t117503445@gmail.com>
Copilot AI review requested due to automatic review settings July 2, 2026 14:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the ar skill create --code-dir workflow to upload skill code as a ZIP to Function Compute (FC) TempBucket OSS and create the skill as a CODE_PACKAGE tool, rather than sending an inline zipFile. It also adds FC 2016-style request signing and improves skill packaging behavior by injecting a placeholder main.py when missing.

Changes:

  • Implement FC TempBucket token retrieval + OSS upload flow, and pass ossBucketName/ossObjectName/language/command in codeConfiguration for skill creation.
  • Add FC 2016 Authorization: FC ... signing and helper utilities (_fc_authorization, endpoint/object-name helpers).
  • Add unit/integration tests and update both English/Chinese skill docs to reflect the new code-package behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/agentrun_cli/commands/skill_cmd.py Switch skill create to FC TempBucket OSS code-package flow; add signing/token/upload helpers; inject placeholder main.py when needed.
tests/unit/test_skill_cmd.py Add unit coverage for ZIP placeholder injection and FC TempBucket signing/token/upload helpers; update create tests for CODE_PACKAGE body.
tests/integration/test_skill_cmd.py Update integration coverage to assert CODE_PACKAGE request body and mock the FC TempBucket upload.
pyproject.toml Add oss2 dependency required for OSS upload.
docs/en/skill.md Document FC TempBucket upload + CODE_PACKAGE tool creation and placeholder main.py injection behavior.
docs/zh/skill.md Same documentation update as English version (bilingual parity).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/agentrun_cli/commands/skill_cmd.py
Comment thread src/agentrun_cli/commands/skill_cmd.py
Comment thread src/agentrun_cli/commands/skill_cmd.py Outdated
Comment thread src/agentrun_cli/commands/skill_cmd.py Outdated
Comment thread src/agentrun_cli/commands/skill_cmd.py Outdated
117503445 added 2 commits July 2, 2026 22:42
Signed-off-by: 117503445 <t117503445@gmail.com>
Signed-off-by: 117503445 <t117503445@gmail.com>
Comment thread src/agentrun_cli/commands/skill_cmd.py
Comment thread src/agentrun_cli/commands/skill_cmd.py
117503445 added 3 commits July 4, 2026 17:02
Signed-off-by: 117503445 <t117503445@gmail.com>
Signed-off-by: 117503445 <t117503445@gmail.com>
Signed-off-by: 117503445 <t117503445@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants