arkaos 2.1.1 → 2.1.2
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.
- package/VERSION +1 -1
- package/core/knowledge/__pycache__/ingest.cpython-313.pyc +0 -0
- package/core/knowledge/ingest.py +16 -0
- package/core/personas/__pycache__/__init__.cpython-313.pyc +0 -0
- package/core/personas/__pycache__/manager.cpython-313.pyc +0 -0
- package/core/personas/__pycache__/schema.cpython-313.pyc +0 -0
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.1.
|
|
1
|
+
2.1.2
|
|
Binary file
|
package/core/knowledge/ingest.py
CHANGED
|
@@ -119,6 +119,22 @@ class IngestEngine:
|
|
|
119
119
|
|
|
120
120
|
progress(100, f"Done — {count} chunks indexed")
|
|
121
121
|
|
|
122
|
+
# Record token usage in budget
|
|
123
|
+
try:
|
|
124
|
+
from core.budget.manager import BudgetManager
|
|
125
|
+
from pathlib import Path as BudgetPath
|
|
126
|
+
budget_mgr = BudgetManager(storage_path=BudgetPath.home() / ".arkaos" / "budget-usage.json")
|
|
127
|
+
tokens_est = len(text) // 4 # ~1 token per 4 chars
|
|
128
|
+
budget_mgr.record_usage(
|
|
129
|
+
agent_id="kb-indexer",
|
|
130
|
+
tokens=tokens_est,
|
|
131
|
+
tier=2,
|
|
132
|
+
department="kb",
|
|
133
|
+
description=f"ingest-{source_type}: {source[:60]}",
|
|
134
|
+
)
|
|
135
|
+
except Exception:
|
|
136
|
+
pass
|
|
137
|
+
|
|
122
138
|
return IngestResult(
|
|
123
139
|
source=source,
|
|
124
140
|
source_type=source_type,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED