Skip to content

Commit 51903e6

Browse files
RoyLinRoyLin
authored andcommitted
Release v1.5.3
1 parent bfba9f4 commit 51903e6

34 files changed

Lines changed: 1898 additions & 544 deletions

.github/workflows/publish-node.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,4 @@ jobs:
124124
working-directory: sdk/node
125125
env:
126126
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
127-
run: npm publish --access public --ignore-scripts || true
127+
run: npm publish --access public --ignore-scripts

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
# ───────────────────────────────────────────────
7070
publish-crate:
7171
name: Publish to crates.io
72-
needs: ci
72+
needs: [ci, ci-windows]
7373
runs-on: ubuntu-latest
7474
steps:
7575
- uses: actions/checkout@v4
@@ -87,14 +87,14 @@ jobs:
8787
working-directory: core
8888
env:
8989
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
90-
run: cargo publish --allow-dirty || true
90+
run: cargo publish --allow-dirty
9191

9292
# ───────────────────────────────────────────────
9393
# Build and publish Node native SDK (reusable)
9494
# ───────────────────────────────────────────────
9595
publish-node:
9696
name: Node SDK
97-
needs: ci
97+
needs: [ci, ci-windows]
9898
uses: ./.github/workflows/publish-node.yml
9999
secrets: inherit
100100

@@ -103,7 +103,7 @@ jobs:
103103
# ───────────────────────────────────────────────
104104
publish-python:
105105
name: Python SDK
106-
needs: ci
106+
needs: [ci, ci-windows]
107107
uses: ./.github/workflows/publish-python.yml
108108
secrets: inherit
109109

@@ -112,7 +112,7 @@ jobs:
112112
# ───────────────────────────────────────────────
113113
github-release:
114114
name: GitHub Release
115-
needs: ci
115+
needs: [publish-crate, publish-node, publish-python]
116116
runs-on: ubuntu-latest
117117
steps:
118118
- uses: actions/checkout@v4

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "a3s-code-core"
3-
version = "1.5.2"
3+
version = "1.5.3"
44
edition = "2021"
55
authors = ["A3S Lab Team"]
66
license = "MIT"
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
use a3s_code_core::orchestrator::{AgentOrchestrator, OrchestratorEvent, SubAgentConfig};
2+
use a3s_code_core::Agent;
3+
use std::sync::Arc;
4+
use tempfile::tempdir;
5+
6+
#[tokio::main]
7+
async fn main() -> anyhow::Result<()> {
8+
let temp = tempdir()?;
9+
let workspace = temp.path().join("workspace");
10+
let skills_dir = temp.path().join("skills");
11+
std::fs::create_dir_all(&workspace)?;
12+
std::fs::create_dir_all(&skills_dir)?;
13+
14+
let skill_path = skills_dir.join("scoring-video-adapter.md");
15+
std::fs::write(
16+
&skill_path,
17+
r#"---
18+
name: scoring-video-adapter
19+
description: "Subagent skill invocation smoke test"
20+
kind: tool
21+
---
22+
# Scoring Video Adapter
23+
24+
You are a smoke test skill.
25+
Reply with exactly: SKILL_OK
26+
"#,
27+
)?;
28+
29+
let config_path = temp.path().join("agent_kimi_env.hcl");
30+
std::fs::write(
31+
&config_path,
32+
r#"default_model = "openai/kimi-k2.5"
33+
34+
providers {
35+
name = "openai"
36+
api_key = env("KIMI_API_KEY")
37+
base_url = env("KIMI_BASE_URL")
38+
39+
models {
40+
id = "kimi-k2.5"
41+
name = "KIMI K2.5"
42+
}
43+
}
44+
45+
storage_backend = "memory"
46+
max_tool_rounds = 8
47+
"#,
48+
)?;
49+
50+
let agent = Arc::new(Agent::create(config_path.display().to_string()).await?);
51+
let orchestrator = AgentOrchestrator::from_agent(agent);
52+
let handle = orchestrator
53+
.spawn_subagent(
54+
SubAgentConfig::new(
55+
"general",
56+
"You must call the Skill tool for scoring-video-adapter. \
57+
Use the tool rather than answering directly. \
58+
Set skill_name to scoring-video-adapter. \
59+
After the tool returns, output only the final answer.",
60+
)
61+
.with_description("Kimi subagent skill smoke test")
62+
.with_workspace(workspace.display().to_string())
63+
.with_skill_dirs(vec![skills_dir.display().to_string()])
64+
.with_permissive(true)
65+
.with_max_steps(6),
66+
)
67+
.await?;
68+
69+
let mut events = handle.events();
70+
let event_task = tokio::spawn(async move {
71+
let mut saw_skill_tool = false;
72+
let mut saw_skill_ok = false;
73+
74+
while let Some(event) =
75+
tokio::time::timeout(std::time::Duration::from_secs(60), events.recv()).await?
76+
{
77+
match event {
78+
OrchestratorEvent::ToolExecutionStarted { tool_name, .. } => {
79+
println!("EVENT tool_start {}", tool_name);
80+
if tool_name == "Skill" {
81+
saw_skill_tool = true;
82+
}
83+
}
84+
OrchestratorEvent::ToolExecutionCompleted {
85+
tool_name, result, ..
86+
} => {
87+
println!(
88+
"EVENT tool_end {} => {}",
89+
tool_name,
90+
result.replace('\n', " ")
91+
);
92+
if tool_name == "Skill" && result.contains("SKILL_OK") {
93+
saw_skill_ok = true;
94+
}
95+
}
96+
OrchestratorEvent::SubAgentCompleted {
97+
success, output, ..
98+
} => {
99+
println!(
100+
"EVENT subagent_completed success={} output={}",
101+
success,
102+
output.replace('\n', " ")
103+
);
104+
break;
105+
}
106+
_ => {}
107+
}
108+
}
109+
110+
Ok::<(bool, bool), anyhow::Error>((saw_skill_tool, saw_skill_ok))
111+
});
112+
113+
let output = tokio::time::timeout(std::time::Duration::from_secs(90), handle.wait()).await??;
114+
let (saw_skill_tool, saw_skill_ok) = event_task.await??;
115+
116+
println!("FINAL_OUTPUT={}", output.replace('\n', " "));
117+
println!("SAW_SKILL_TOOL={}", saw_skill_tool);
118+
println!("SAW_SKILL_OK={}", saw_skill_ok);
119+
120+
if !saw_skill_tool {
121+
anyhow::bail!("Skill tool was not called");
122+
}
123+
if !output.contains("SKILL_OK") {
124+
anyhow::bail!("Final output did not contain SKILL_OK: {}", output);
125+
}
126+
127+
Ok(())
128+
}

0 commit comments

Comments
 (0)