agentproc 0.9.0__tar.gz → 0.10.0__tar.gz
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.
- {agentproc-0.9.0 → agentproc-0.10.0}/PKG-INFO +1 -1
- {agentproc-0.9.0 → agentproc-0.10.0}/pyproject.toml +1 -1
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/_shared/stream_utils.js +4 -2
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/agy/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/aider/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codebuddy/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/cursor/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/deepseek/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/gemini-cli/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/kimi-code/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/opencode/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/pi/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/qwen-code/profile.yaml +1 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/runner.py +24 -14
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/PKG-INFO +1 -1
- {agentproc-0.9.0 → agentproc-0.10.0}/setup.cfg +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/__init__.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/cli.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/PERMISSIONS.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/_shared/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/_shared/stream_utils.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/agy/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/agy/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/agy/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/aider/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/aider/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/aider/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/permission_map.test.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codebuddy/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codebuddy/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codebuddy/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/permission_hook.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/permission_map.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/permission_map.test.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/cursor/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/cursor/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/cursor/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/deepseek/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/deepseek/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/deepseek/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/bridge.sh +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/profile.yaml +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/gemini-cli/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/gemini-cli/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/gemini-cli/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/kimi-code/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/kimi-code/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/kimi-code/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/opencode/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/opencode/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/opencode/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/pi/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/pi/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/pi/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/qwen-code/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/qwen-code/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/qwen-code/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/README.md +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/bridge.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/bridge.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/profile.yaml +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/tests/parity.json +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/tests/test_bridge_parity.js +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/tests/test_bridge_parity.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/yaml.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/SOURCES.txt +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/dependency_links.txt +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/entry_points.txt +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/requires.txt +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/top_level.txt +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_agentproc.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_bridges.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_conformance.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_diagnostics.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_hub.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_hub_bridge_conformance.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_runner.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_scenarios.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_sdk.py +0 -0
- {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_yaml.py +0 -0
|
@@ -46,15 +46,17 @@ function emitPartial(text, sessionId) {
|
|
|
46
46
|
emitObj(obj);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
function emitResult(text, sessionId) {
|
|
49
|
+
function emitResult(text, sessionId, usage) {
|
|
50
50
|
const obj = { type: 'result', text };
|
|
51
51
|
if (sessionId) obj.session_id = sessionId;
|
|
52
|
+
if (usage !== null && typeof usage === 'object' && !Array.isArray(usage)) obj.usage = usage;
|
|
52
53
|
emitObj(obj);
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
function emitError(text, sessionId) {
|
|
56
|
+
function emitError(text, sessionId, usage) {
|
|
56
57
|
const obj = { type: 'error', message: text };
|
|
57
58
|
if (sessionId) obj.session_id = sessionId;
|
|
59
|
+
if (usage !== null && typeof usage === 'object' && !Array.isArray(usage)) obj.usage = usage;
|
|
58
60
|
emitObj(obj);
|
|
59
61
|
}
|
|
60
62
|
|
|
@@ -5,6 +5,7 @@ cli_install: |
|
|
|
5
5
|
# CodeBuddy is currently distributed by Tencent; see internal docs for installation.
|
|
6
6
|
# Once installed, the binary is typically available as `codebuddy` or `cbc`.
|
|
7
7
|
agentproc:
|
|
8
|
+
executor: codebuddy
|
|
8
9
|
command: python3
|
|
9
10
|
args: ["{{PROFILE_DIR}}/bridge.py"]
|
|
10
11
|
# cwd defaults to your current directory under `agentproc hub run`.
|
|
@@ -124,6 +124,7 @@ class RunResult:
|
|
|
124
124
|
error: str = ""
|
|
125
125
|
exit_code: int = 0
|
|
126
126
|
timed_out: bool = False
|
|
127
|
+
usage: Optional[Dict[str, Any]] = None
|
|
127
128
|
|
|
128
129
|
|
|
129
130
|
@dataclass
|
|
@@ -434,21 +435,23 @@ def classify_line(line: str) -> Dict[str, Any]:
|
|
|
434
435
|
out["role"] = obj.get("role")
|
|
435
436
|
return _attach_session_id(out, obj)
|
|
436
437
|
if t == "result":
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
438
|
+
out = {
|
|
439
|
+
"kind": "result",
|
|
440
|
+
"value": obj.get("text") if isinstance(obj.get("text"), str) else "",
|
|
441
|
+
}
|
|
442
|
+
usage = obj.get("usage")
|
|
443
|
+
if isinstance(usage, dict):
|
|
444
|
+
out["usage"] = usage
|
|
445
|
+
return _attach_session_id(out, obj)
|
|
444
446
|
if t == "error":
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
447
|
+
out = {
|
|
448
|
+
"kind": "error",
|
|
449
|
+
"value": obj.get("message") if isinstance(obj.get("message"), str) else "",
|
|
450
|
+
}
|
|
451
|
+
usage = obj.get("usage")
|
|
452
|
+
if isinstance(usage, dict):
|
|
453
|
+
out["usage"] = usage
|
|
454
|
+
return _attach_session_id(out, obj)
|
|
452
455
|
if t == "permission_request":
|
|
453
456
|
return {"kind": "permission_request", "value": obj}
|
|
454
457
|
return {"kind": "malformed", "value": line}
|
|
@@ -756,6 +759,9 @@ def run(profile_raw: Dict[str, Any], options: RunOptions) -> RunResult:
|
|
|
756
759
|
elif kind == "result":
|
|
757
760
|
# At most one result; post-error result discarded.
|
|
758
761
|
if error_seen:
|
|
762
|
+
# Still capture usage if not already set.
|
|
763
|
+
if c.get("usage") and result.usage is None:
|
|
764
|
+
result.usage = c["usage"]
|
|
759
765
|
if options.on_protocol_line:
|
|
760
766
|
options.on_protocol_line(line)
|
|
761
767
|
elif result_seen:
|
|
@@ -770,12 +776,16 @@ def run(profile_raw: Dict[str, Any], options: RunOptions) -> RunResult:
|
|
|
770
776
|
result_seen = True
|
|
771
777
|
_note_session_id(c.get("session_id"))
|
|
772
778
|
result_text = c["value"]
|
|
779
|
+
if c.get("usage"):
|
|
780
|
+
result.usage = c["usage"]
|
|
773
781
|
if options.on_protocol_line:
|
|
774
782
|
options.on_protocol_line(line)
|
|
775
783
|
elif kind == "error":
|
|
776
784
|
_note_session_id(c.get("session_id"))
|
|
777
785
|
result.error = c["value"]
|
|
778
786
|
error_seen = True
|
|
787
|
+
if c.get("usage"):
|
|
788
|
+
result.usage = c["usage"]
|
|
779
789
|
if options.on_error:
|
|
780
790
|
options.on_error(c["value"])
|
|
781
791
|
if options.on_protocol_line:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/permission_map.test.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/tests/test_bridge_parity.js
RENAMED
|
File without changes
|
{agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/tests/test_bridge_parity.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|