Skip to content

Commit 769e3cd

Browse files
committed
chore: bump all SDK versions to 2.3.0
Update version references across core, Node SDK, and Python SDK to align with the v2.3.0 release tag. The previous release workflow ran against 2.2.0 versions causing npm publish to be silently skipped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8fed77b commit 769e3cd

116 files changed

Lines changed: 19176 additions & 13497 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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.

README.md

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ from a3s_code import Agent
6969
agent = Agent.create("agent.acl")
7070
session = agent.session("/my-project")
7171

72-
result = session.send("Find where authentication errors are handled and summarize the flow")
72+
result = session.send({
73+
"prompt": "Find where authentication errors are handled and summarize the flow",
74+
})
7375
print(result.text)
7476
```
7577

@@ -81,7 +83,9 @@ import { Agent } from '@a3s-lab/code';
8183
const agent = await Agent.create('agent.acl');
8284
const session = agent.session('/my-project');
8385

84-
const result = await session.send('Find where authentication errors are handled and summarize the flow');
86+
const result = await session.send({
87+
prompt: 'Find where authentication errors are handled and summarize the flow',
88+
});
8589
console.log(result.text);
8690

8791
session.close();
@@ -140,6 +144,7 @@ Default core tools:
140144
| Files | `read`, `write`, `edit`, `patch` |
141145
| Search | `grep`, `glob`, `ls` |
142146
| Shell | `bash` |
147+
| Programmatic | `program` |
143148
| Delegation | `task`, `parallel_task` |
144149
| Skills | `search_skills`, `Skill` |
145150

@@ -188,26 +193,53 @@ script can call every registered tool except `program`; use `allowedTools` or
188193
structured summaries, findings, artifact references, and suggested next actions.
189194
Raw output belongs in trace storage.
190195

196+
### 5. AHP-Supervised Background Advice
197+
198+
A3S Code keeps the core session runtime focused on the main agent. Background
199+
advice, context supplements, and proposed PTC scripts are caller-owned AHP
200+
harness behaviors rather than a separate in-core advisory runtime.
201+
202+
Attach an AHP hook executor to forward lifecycle hooks and durable run events to
203+
the harness:
204+
205+
```python
206+
from a3s_code import Agent, HttpTransport, SessionOptions
207+
208+
agent = Agent.create("agent.acl")
209+
opts = SessionOptions()
210+
opts.ahp_transport = HttpTransport("http://localhost:8080/ahp")
211+
session = agent.session(".", opts)
212+
result = session.send("Refactor the auth module")
213+
```
214+
215+
The harness can observe run lifecycle, task, verification, tool, confirmation,
216+
idle, and error events; it can maintain its own background workers and publish
217+
advice through the host UI or by explicitly calling session APIs. Proposed PTC
218+
scripts remain proposals until the caller runs them through the normal
219+
`program`, permission, confirmation, and trace paths.
220+
191221
Node and Python expose the same session controls as the Rust core:
192222

193223
```js
194224
agent.session('/repo', { planningMode: 'disabled' }) // auto | enabled | disabled
195-
await session.delegateTask({
225+
await session.task({
196226
agent: 'explore',
197227
description: 'Find auth files',
198228
prompt: 'Inspect auth-related files and return evidence.',
199229
})
200230
console.log(session.toolDefinitions())
231+
await session.git({ command: 'status' })
201232
```
202233

203234
```python
204235
session = agent.session("/repo", planning_mode="enabled")
205-
session.delegate_task(
206-
agent="verification",
207-
description="Check release risk",
208-
prompt="Validate the current changes and summarize blockers.",
209-
)
236+
session.task({
237+
"agent": "verification",
238+
"description": "Check release risk",
239+
"prompt": "Validate the current changes and summarize blockers.",
240+
})
210241
session.tool_definitions()
242+
session.git({"command": "status"})
211243
```
212244

213245
Planning is explicit and observable. In `auto` mode the runtime performs
@@ -225,6 +257,7 @@ const latest = runs.at(-1)
225257
if (latest) {
226258
console.log(await session.runSnapshot(latest.id))
227259
console.log(await session.runEvents(latest.id))
260+
console.log(await session.activeTools())
228261
await session.cancelRun(latest.id)
229262
}
230263
```
@@ -236,6 +269,7 @@ latest = runs[-1] if runs else None
236269
if latest:
237270
print(session.run_snapshot(latest["id"]))
238271
print(session.run_events(latest["id"]))
272+
print(session.active_tools())
239273
session.cancel_run(latest["id"])
240274
```
241275

@@ -514,6 +548,17 @@ mcp_servers = [
514548

515549
MCP tools are selected per turn instead of being listed wholesale in the system prompt.
516550

551+
SDK callers can also attach MCP servers to a live session with object-shaped
552+
configs:
553+
554+
```js
555+
await session.addMcp({
556+
name: 'github',
557+
transport: { type: 'stdio', command: 'npx', args: ['-y', '@modelcontextprotocol/server-github'] },
558+
timeoutMs: 30000,
559+
})
560+
```
561+
517562
---
518563

519564
## Slash Commands
@@ -527,7 +572,6 @@ Sessions support slash commands:
527572
| `/cost` | Show token usage |
528573
| `/clear` | Clear conversation history |
529574
| `/compact` | Manually trigger context compaction |
530-
| `/btw <question>` | Ask a side question without polluting history |
531575

532576
---
533577

@@ -576,6 +620,7 @@ cargo build -p a3s-code-node
576620

577621
Full reference and guides: [a3s.dev/docs/code](https://a3s.dev/docs/code)
578622

623+
- [SDK API Design Contract](manual/SDK_API_DESIGN.md)
579624
- [Sessions](https://a3s.dev/docs/code/sessions)
580625
- [AHP Protocol](https://a3s.dev/docs/code/ahp)
581626
- [Tools](https://a3s.dev/docs/code/tools)

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 = "2.2.0"
3+
version = "2.3.0"
44
edition = "2021"
55
authors = ["A3S Lab Team"]
66
license = "MIT"

core/prompts/common/btw_system.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)