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.
Files changed (93) hide show
  1. {agentproc-0.9.0 → agentproc-0.10.0}/PKG-INFO +1 -1
  2. {agentproc-0.9.0 → agentproc-0.10.0}/pyproject.toml +1 -1
  3. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/_shared/stream_utils.js +4 -2
  4. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/agy/profile.yaml +1 -0
  5. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/aider/profile.yaml +1 -0
  6. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/profile.yaml +1 -0
  7. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codebuddy/profile.yaml +1 -0
  8. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/profile.yaml +1 -0
  9. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/cursor/profile.yaml +1 -0
  10. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/deepseek/profile.yaml +1 -0
  11. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/gemini-cli/profile.yaml +1 -0
  12. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/kimi-code/profile.yaml +1 -0
  13. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/opencode/profile.yaml +1 -0
  14. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/pi/profile.yaml +1 -0
  15. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/qwen-code/profile.yaml +1 -0
  16. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/runner.py +24 -14
  17. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/PKG-INFO +1 -1
  18. {agentproc-0.9.0 → agentproc-0.10.0}/setup.cfg +0 -0
  19. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/__init__.py +0 -0
  20. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/cli.py +0 -0
  21. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub.py +0 -0
  22. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/PERMISSIONS.md +0 -0
  23. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/README.md +0 -0
  24. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/_shared/README.md +0 -0
  25. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/_shared/stream_utils.py +0 -0
  26. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/agy/README.md +0 -0
  27. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/agy/bridge.js +0 -0
  28. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/agy/bridge.py +0 -0
  29. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/aider/README.md +0 -0
  30. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/aider/bridge.js +0 -0
  31. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/aider/bridge.py +0 -0
  32. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/README.md +0 -0
  33. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/bridge.js +0 -0
  34. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/bridge.py +0 -0
  35. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/claude-code/permission_map.test.js +0 -0
  36. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codebuddy/README.md +0 -0
  37. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codebuddy/bridge.js +0 -0
  38. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codebuddy/bridge.py +0 -0
  39. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/README.md +0 -0
  40. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/bridge.js +0 -0
  41. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/bridge.py +0 -0
  42. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/permission_hook.py +0 -0
  43. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/permission_map.js +0 -0
  44. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/codex/permission_map.test.js +0 -0
  45. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/cursor/README.md +0 -0
  46. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/cursor/bridge.js +0 -0
  47. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/cursor/bridge.py +0 -0
  48. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/deepseek/README.md +0 -0
  49. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/deepseek/bridge.js +0 -0
  50. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/deepseek/bridge.py +0 -0
  51. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/README.md +0 -0
  52. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/bridge.js +0 -0
  53. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/bridge.py +0 -0
  54. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/bridge.sh +0 -0
  55. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/echo-agent/profile.yaml +0 -0
  56. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/gemini-cli/README.md +0 -0
  57. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/gemini-cli/bridge.js +0 -0
  58. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/gemini-cli/bridge.py +0 -0
  59. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/kimi-code/README.md +0 -0
  60. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/kimi-code/bridge.js +0 -0
  61. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/kimi-code/bridge.py +0 -0
  62. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/opencode/README.md +0 -0
  63. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/opencode/bridge.js +0 -0
  64. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/opencode/bridge.py +0 -0
  65. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/pi/README.md +0 -0
  66. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/pi/bridge.js +0 -0
  67. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/pi/bridge.py +0 -0
  68. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/qwen-code/README.md +0 -0
  69. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/qwen-code/bridge.js +0 -0
  70. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/qwen-code/bridge.py +0 -0
  71. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/README.md +0 -0
  72. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/bridge.js +0 -0
  73. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/bridge.py +0 -0
  74. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/profile.yaml +0 -0
  75. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/tests/parity.json +0 -0
  76. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/tests/test_bridge_parity.js +0 -0
  77. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/hub_data/recursive/tests/test_bridge_parity.py +0 -0
  78. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc/yaml.py +0 -0
  79. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/SOURCES.txt +0 -0
  80. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/dependency_links.txt +0 -0
  81. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/entry_points.txt +0 -0
  82. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/requires.txt +0 -0
  83. {agentproc-0.9.0 → agentproc-0.10.0}/src/agentproc.egg-info/top_level.txt +0 -0
  84. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_agentproc.py +0 -0
  85. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_bridges.py +0 -0
  86. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_conformance.py +0 -0
  87. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_diagnostics.py +0 -0
  88. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_hub.py +0 -0
  89. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_hub_bridge_conformance.py +0 -0
  90. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_runner.py +0 -0
  91. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_scenarios.py +0 -0
  92. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_sdk.py +0 -0
  93. {agentproc-0.9.0 → agentproc-0.10.0}/tests/test_yaml.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentproc
3
- Version: 0.9.0
3
+ Version: 0.10.0
4
4
  Summary: AgentProc Protocol SDK + CLI — connect any Agent CLI to a messaging platform
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/jeffkit/agentproc
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentproc"
7
- version = "0.9.0"
7
+ version = "0.10.0"
8
8
  description = "AgentProc Protocol SDK + CLI — connect any Agent CLI to a messaging platform"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -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
 
@@ -4,6 +4,7 @@ cli: agy
4
4
  cli_install: |
5
5
  # See the agy project for installation instructions.
6
6
  agentproc:
7
+ executor: agy
7
8
  command: python3
8
9
  args: ["{{PROFILE_DIR}}/bridge.py"]
9
10
  # cwd defaults to your current directory under `agentproc hub run`.
@@ -5,6 +5,7 @@ cli_install: |
5
5
  pip install aider-chat
6
6
  # or: brew install aider
7
7
  agentproc:
8
+ executor: aider
8
9
  command: python3
9
10
  args: ["{{PROFILE_DIR}}/bridge.py"]
10
11
  # cwd defaults to your current directory under `agentproc hub run`.
@@ -4,6 +4,7 @@ cli: claude
4
4
  cli_install: |
5
5
  npm install -g @anthropic-ai/claude-code
6
6
  agentproc:
7
+ executor: claude-code
7
8
  command: python3
8
9
  args: ["{{PROFILE_DIR}}/bridge.py"]
9
10
  # cwd is intentionally left unset. `agentproc hub run` defaults it to your
@@ -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`.
@@ -4,6 +4,7 @@ cli: codex
4
4
  cli_install: |
5
5
  npm install -g @openai/codex
6
6
  agentproc:
7
+ executor: codex
7
8
  command: python3
8
9
  args: ["{{PROFILE_DIR}}/bridge.py"]
9
10
  # cwd defaults to your current directory under `agentproc hub run`.
@@ -8,6 +8,7 @@ cli_install: |
8
8
  # Or download from https://cursor.com/downloads
9
9
  # Then log in: agent login
10
10
  agentproc:
11
+ executor: cursor
11
12
  command: python3
12
13
  args: ["{{PROFILE_DIR}}/bridge.py"]
13
14
  # cwd is intentionally left unset. `agentproc hub run` defaults it to your
@@ -8,6 +8,7 @@ cli_install: |
8
8
  # deepseek login
9
9
  # Or set DEEPSEEK_API_KEY environment variable.
10
10
  agentproc:
11
+ executor: deepseek
11
12
  command: python3
12
13
  args: ["{{PROFILE_DIR}}/bridge.py"]
13
14
  # cwd defaults to your current directory under `agentproc hub run`.
@@ -4,6 +4,7 @@ cli: gemini
4
4
  cli_install: |
5
5
  npm install -g @google/gemini-cli
6
6
  agentproc:
7
+ executor: gemini-cli
7
8
  command: python3
8
9
  args: ["{{PROFILE_DIR}}/bridge.py"]
9
10
  # cwd is intentionally left unset. `agentproc hub run` defaults it to your
@@ -8,6 +8,7 @@ cli_install: |
8
8
  # Then authenticate:
9
9
  # kimi login
10
10
  agentproc:
11
+ executor: kimi-code
11
12
  command: python3
12
13
  args: ["{{PROFILE_DIR}}/bridge.py"]
13
14
  # cwd is intentionally left unset. `agentproc hub run` defaults it to your
@@ -5,6 +5,7 @@ cli_install: |
5
5
  npm install -g opencode-ai
6
6
  # or: curl -fsSL https://opencode.ai/install | bash
7
7
  agentproc:
8
+ executor: opencode
8
9
  command: python3
9
10
  args: ["{{PROFILE_DIR}}/bridge.py"]
10
11
  # cwd is intentionally left unset. `agentproc hub run` defaults it to your
@@ -4,6 +4,7 @@ cli: pi
4
4
  cli_install: |
5
5
  npm install -g @earendil-works/pi-coding-agent
6
6
  agentproc:
7
+ executor: pi
7
8
  command: python3
8
9
  args: ["{{PROFILE_DIR}}/bridge.py"]
9
10
  # cwd defaults to your current directory under `agentproc hub run`.
@@ -4,6 +4,7 @@ cli: qwen
4
4
  cli_install: |
5
5
  npm install -g @qwen-code/qwen-code
6
6
  agentproc:
7
+ executor: qwen-code
7
8
  command: python3
8
9
  args: ["{{PROFILE_DIR}}/bridge.py"]
9
10
  # 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
- return _attach_session_id(
438
- {
439
- "kind": "result",
440
- "value": obj.get("text") if isinstance(obj.get("text"), str) else "",
441
- },
442
- obj,
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
- return _attach_session_id(
446
- {
447
- "kind": "error",
448
- "value": obj.get("message") if isinstance(obj.get("message"), str) else "",
449
- },
450
- obj,
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentproc
3
- Version: 0.9.0
3
+ Version: 0.10.0
4
4
  Summary: AgentProc Protocol SDK + CLI — connect any Agent CLI to a messaging platform
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/jeffkit/agentproc
File without changes
File without changes
File without changes
File without changes