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.
- {humancli-0.1.0 → humancli-0.2.0}/PKG-INFO +1 -1
- {humancli-0.1.0 → humancli-0.2.0}/pyproject.toml +1 -1
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/__init__.py +1 -1
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_errors.py +1 -1
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_output.py +21 -7
- {humancli-0.1.0 → humancli-0.2.0}/uv.lock +1 -1
- {humancli-0.1.0 → humancli-0.2.0}/.agents/AGENTS.md +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/.agents/skills/release/SKILL.md +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/.github/workflows/ci.yml +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/.github/workflows/release.yml +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/.gitignore +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/.python-version +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/LICENSE +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/README.md +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_agents.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_app.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_context.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_help.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_parser.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_schema.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_types.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/_wizard.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/prompt.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/py.typed +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/src/agentcli/testing.py +0 -0
- {humancli-0.1.0 → humancli-0.2.0}/tests/test_agentcli.py +0 -0
|
@@ -13,13 +13,13 @@ class ErrorInfo:
|
|
|
13
13
|
code: str
|
|
14
14
|
message: str
|
|
15
15
|
retryable: bool = False
|
|
16
|
-
|
|
16
|
+
suggested_commands: list[str] | None = None
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
@dataclass
|
|
20
20
|
class Meta:
|
|
21
21
|
command: str
|
|
22
|
-
|
|
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(
|
|
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
|
-
|
|
52
|
+
suggested_commands=error.cta,
|
|
51
53
|
)
|
|
52
54
|
else:
|
|
53
55
|
info = ErrorInfo(code="UNKNOWN", message=str(error), retryable=False)
|
|
54
|
-
return Envelope(
|
|
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,
|
|
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(
|
|
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
|
|
|
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
|