maos-agent 0.1.0__tar.gz → 0.1.1__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 maosproject.io
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maos-agent
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: The Observability & Resilience SDK for Maos AI Agents
5
5
  Project-URL: Homepage, https://github.com/maosproject-dev/maos-agent
6
6
  Project-URL: Bug Tracker, https://github.com/maosproject-dev/maos-agent/issues
7
7
  Author-email: Maos AI <support@maosproject.io>
8
+ License-File: LICENSE
8
9
  Classifier: License :: OSI Approved :: MIT License
9
10
  Classifier: Operating System :: OS Independent
10
11
  Classifier: Programming Language :: Python :: 3
@@ -144,4 +145,4 @@ We welcome contributions! Please see [CONTRIBUTING.md](https://www.google.com/se
144
145
 
145
146
  ---
146
147
 
147
- **Built by [Maos AI](https://www.google.com/search?q=https://maosproject.io) — The Control Plane for Autonomous Compute.**
148
+ **Built by [Maosproject Platform](https://www.google.com/search?q=https://maosproject.io) — The Control Plane for Autonomous Compute.**
@@ -129,4 +129,4 @@ We welcome contributions! Please see [CONTRIBUTING.md](https://www.google.com/se
129
129
 
130
130
  ---
131
131
 
132
- **Built by [Maos AI](https://www.google.com/search?q=https://maosproject.io) — The Control Plane for Autonomous Compute.**
132
+ **Built by [Maosproject Platform](https://www.google.com/search?q=https://maosproject.io) — The Control Plane for Autonomous Compute.**
@@ -31,23 +31,9 @@ class TaskContext:
31
31
  duration = time.time() - self.start_time
32
32
  status = "error" if exc_type else "success"
33
33
 
34
- # 1. Record Success/Fail Counter
35
34
  self.metrics.record_task_success(self.name, status)
36
-
37
- # 2. Record Duration
38
- # We manually observe the histogram since we managed the time
39
- from .metrics import TASK_DURATION
40
- TASK_DURATION.labels(
41
- task_type=self.name,
42
- **self.metrics.labels
43
- ).observe(duration)
44
-
45
- # 3. Record Steps (The "Loop of Death" check)
46
- from .metrics import STEPS_PER_GOAL
47
- STEPS_PER_GOAL.labels(
48
- task_type=self.name,
49
- **self.metrics.labels
50
- ).observe(self.steps)
35
+ self.metrics.record_steps(self.name, self.steps)
36
+ self.metrics.record_duration(self.name, duration)
51
37
 
52
38
  if exc_type:
53
39
  self.logger.error(f"Task '{self.name}' failed: {exc_val}")
@@ -45,9 +45,9 @@ class MetricsManager:
45
45
  # Start the Prometheus exporter server automatically
46
46
  try:
47
47
  start_http_server(port)
48
- print(f"[Maos] Metrics server started on port {port}")
48
+ print(f"[Maosproject] Metrics server started on port {port}")
49
49
  except Exception as e:
50
- print(f"[Maos] Warning: Could not start metrics server: {e}")
50
+ print(f"[Maosproject] Warning: Could not start metrics server: {e}")
51
51
 
52
52
  def record_tool(self, tool_name: str, status: str = "success"):
53
53
  TOOL_CALLS.labels(tool_name=tool_name, status=status, **self.labels).inc()
@@ -58,6 +58,8 @@ class MetricsManager:
58
58
  def record_task_success(self, task_type: str, status: str):
59
59
  TASK_SUCCESS.labels(task_type=task_type, status=status, **self.labels).inc()
60
60
 
61
- def task_timer(self, task_type: str):
62
- """Returns a context manager to time a task."""
63
- return TASK_DURATION.labels(task_type=task_type, **self.labels).time()
61
+ def record_duration(self, task_type: str, seconds: float):
62
+ TASK_DURATION.labels(task_type=task_type, **self.labels).observe(seconds)
63
+
64
+ def record_steps(self, task_type: str, count: int):
65
+ STEPS_PER_GOAL.labels(task_type=task_type, **self.labels).observe(count)
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "maos-agent"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  authors = [
9
9
  { name="Maos AI", email="support@maosproject.io" },
10
10
  ]
File without changes
File without changes
File without changes
File without changes
File without changes