humancli 0.1.0__tar.gz → 0.2.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 (26) hide show
  1. {humancli-0.1.0 → humancli-0.2.0}/PKG-INFO +1 -1
  2. {humancli-0.1.0 → humancli-0.2.0}/pyproject.toml +1 -1
  3. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/__init__.py +1 -1
  4. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_errors.py +1 -1
  5. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_output.py +21 -7
  6. {humancli-0.1.0 → humancli-0.2.0}/uv.lock +1 -1
  7. {humancli-0.1.0 → humancli-0.2.0}/.agents/AGENTS.md +0 -0
  8. {humancli-0.1.0 → humancli-0.2.0}/.agents/skills/release/SKILL.md +0 -0
  9. {humancli-0.1.0 → humancli-0.2.0}/.github/workflows/ci.yml +0 -0
  10. {humancli-0.1.0 → humancli-0.2.0}/.github/workflows/release.yml +0 -0
  11. {humancli-0.1.0 → humancli-0.2.0}/.gitignore +0 -0
  12. {humancli-0.1.0 → humancli-0.2.0}/.python-version +0 -0
  13. {humancli-0.1.0 → humancli-0.2.0}/LICENSE +0 -0
  14. {humancli-0.1.0 → humancli-0.2.0}/README.md +0 -0
  15. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_agents.py +0 -0
  16. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_app.py +0 -0
  17. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_context.py +0 -0
  18. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_help.py +0 -0
  19. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_parser.py +0 -0
  20. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_schema.py +0 -0
  21. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_types.py +0 -0
  22. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_wizard.py +0 -0
  23. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/prompt.py +0 -0
  24. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/py.typed +0 -0
  25. {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/testing.py +0 -0
  26. {humancli-0.1.0 → humancli-0.2.0}/tests/test_agentcli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: humancli
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Python CLIs for agents and humans
5
5
  Project-URL: Repository, https://github.com/elyase/agentcli
6
6
  Project-URL: Issues, https://github.com/elyase/agentcli/issues
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "humancli"
3
- version = "0.1.0"
3
+ version = "0.2.0"
4
4
  description = "Python CLIs for agents and humans"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -5,7 +5,7 @@ from ._context import Context
5
5
  from ._errors import AgentCliError, ConfigError, ParseError, ValidationError
6
6
  from ._types import Param, Result
7
7
 
8
- __version__ = "0.1.0"
8
+ __version__ = "0.2.0"
9
9
 
10
10
  __all__ = [
11
11
  "AgentCliError",
@@ -37,7 +37,7 @@ class AgentCliError(Exception):
37
37
  code=self.code,
38
38
  message=self.message,
39
39
  retryable=self.retryable,
40
- cta=self.cta,
40
+ suggested_commands=self.cta,
41
41
  )
42
42
 
43
43
 
@@ -13,13 +13,13 @@ class ErrorInfo:
13
13
  code: str
14
14
  message: str
15
15
  retryable: bool = False
16
- cta: list[str] | None = None
16
+ suggested_commands: list[str] | None = None
17
17
 
18
18
 
19
19
  @dataclass
20
20
  class Meta:
21
21
  command: str
22
- cta: list[str] | None = None
22
+ suggested_commands: list[str] | None = None
23
23
  duration_ms: float | None = None
24
24
  streamed: bool = False
25
25
 
@@ -38,7 +38,9 @@ def make_success_envelope(
38
38
  command: str,
39
39
  cta: list[str] | None = None,
40
40
  ) -> Envelope:
41
- return Envelope(ok=True, data=data, meta=Meta(command=command, cta=cta))
41
+ return Envelope(
42
+ ok=True, data=data, meta=Meta(command=command, suggested_commands=cta)
43
+ )
42
44
 
43
45
 
44
46
  def make_error_envelope(error: Exception, *, command: str) -> Envelope:
@@ -47,11 +49,15 @@ def make_error_envelope(error: Exception, *, command: str) -> Envelope:
47
49
  code=error.code,
48
50
  message=error.message,
49
51
  retryable=error.retryable,
50
- cta=error.cta,
52
+ suggested_commands=error.cta,
51
53
  )
52
54
  else:
53
55
  info = ErrorInfo(code="UNKNOWN", message=str(error), retryable=False)
54
- return Envelope(ok=False, error=info, meta=Meta(command=command, cta=info.cta))
56
+ return Envelope(
57
+ ok=False,
58
+ error=info,
59
+ meta=Meta(command=command, suggested_commands=info.suggested_commands),
60
+ )
55
61
 
56
62
 
57
63
  def make_envelope(
@@ -70,13 +76,21 @@ def make_envelope(
70
76
  ok=True,
71
77
  data=data,
72
78
  meta=Meta(
73
- command=command, cta=cta, duration_ms=duration_ms, streamed=streamed
79
+ command=command,
80
+ suggested_commands=cta,
81
+ duration_ms=duration_ms,
82
+ streamed=streamed,
74
83
  ),
75
84
  )
76
85
  return Envelope(
77
86
  ok=False,
78
87
  error=error,
79
- meta=Meta(command=command, cta=cta, duration_ms=duration_ms, streamed=streamed),
88
+ meta=Meta(
89
+ command=command,
90
+ suggested_commands=cta,
91
+ duration_ms=duration_ms,
92
+ streamed=streamed,
93
+ ),
80
94
  )
81
95
 
82
96
 
@@ -249,7 +249,7 @@ wheels = [
249
249
 
250
250
  [[package]]
251
251
  name = "humancli"
252
- version = "0.1.0"
252
+ version = "0.2.0"
253
253
  source = { editable = "." }
254
254
  dependencies = [
255
255
  { name = "docstring-parser" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes