agentivium-core 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.
- agentivium_core-0.2.0/.claude/settings.json +28 -0
- agentivium_core-0.2.0/.claude/skills/debug-issue/skill.md +27 -0
- agentivium_core-0.2.0/.claude/skills/explore-codebase/skill.md +28 -0
- agentivium_core-0.2.0/.claude/skills/refactor-safely/skill.md +28 -0
- agentivium_core-0.2.0/.claude/skills/review-changes/skill.md +29 -0
- agentivium_core-0.2.0/.cursor/mcp.json +13 -0
- agentivium_core-0.2.0/.gemini/hooks/crg-session-start.sh +15 -0
- agentivium_core-0.2.0/.gemini/hooks/crg-update.sh +10 -0
- agentivium_core-0.2.0/.gemini/settings.json +40 -0
- agentivium_core-0.2.0/.gemini/settings.json.bak +12 -0
- agentivium_core-0.2.0/.gemini/skills/debug-issue/SKILL.md +27 -0
- agentivium_core-0.2.0/.gemini/skills/explore-codebase/SKILL.md +28 -0
- agentivium_core-0.2.0/.gemini/skills/refactor-safely/SKILL.md +28 -0
- agentivium_core-0.2.0/.gemini/skills/review-changes/SKILL.md +29 -0
- agentivium_core-0.2.0/.gitignore +10 -0
- agentivium_core-0.2.0/.kiro/settings/mcp.json +13 -0
- agentivium_core-0.2.0/.mcp.json +13 -0
- agentivium_core-0.2.0/.opencode.json +14 -0
- agentivium_core-0.2.0/.qoder/mcp.json +13 -0
- agentivium_core-0.2.0/.qoder/settings.json +28 -0
- agentivium_core-0.2.0/CHANGELOG.md +24 -0
- agentivium_core-0.2.0/LICENSE +21 -0
- agentivium_core-0.2.0/PKG-INFO +145 -0
- agentivium_core-0.2.0/README.md +103 -0
- agentivium_core-0.2.0/agentivium_core/__init__.py +50 -0
- agentivium_core-0.2.0/agentivium_core/errors/__init__.py +16 -0
- agentivium_core-0.2.0/agentivium_core/errors/base.py +18 -0
- agentivium_core-0.2.0/agentivium_core/eval/__init__.py +6 -0
- agentivium_core-0.2.0/agentivium_core/eval/record.py +17 -0
- agentivium_core-0.2.0/agentivium_core/intent/__init__.py +6 -0
- agentivium_core-0.2.0/agentivium_core/intent/base.py +28 -0
- agentivium_core-0.2.0/agentivium_core/llm/__init__.py +25 -0
- agentivium_core-0.2.0/agentivium_core/llm/client.py +30 -0
- agentivium_core-0.2.0/agentivium_core/llm/message.py +13 -0
- agentivium_core-0.2.0/agentivium_core/llm/prompt.py +27 -0
- agentivium_core-0.2.0/agentivium_core/llm/request.py +19 -0
- agentivium_core-0.2.0/agentivium_core/llm/response.py +24 -0
- agentivium_core-0.2.0/agentivium_core/llm/structured.py +37 -0
- agentivium_core-0.2.0/agentivium_core/llm/trace.py +24 -0
- agentivium_core-0.2.0/agentivium_core/planner/__init__.py +7 -0
- agentivium_core-0.2.0/agentivium_core/planner/action.py +23 -0
- agentivium_core-0.2.0/agentivium_core/planner/base.py +20 -0
- agentivium_core-0.2.0/agentivium_core/policy/__init__.py +7 -0
- agentivium_core-0.2.0/agentivium_core/policy/base.py +20 -0
- agentivium_core-0.2.0/agentivium_core/policy/result.py +33 -0
- agentivium_core-0.2.0/agentivium_core/py.typed +1 -0
- agentivium_core-0.2.0/agentivium_core/tools/__init__.py +6 -0
- agentivium_core-0.2.0/agentivium_core/tools/base.py +19 -0
- agentivium_core-0.2.0/agentivium_core/trace/__init__.py +6 -0
- agentivium_core-0.2.0/agentivium_core/trace/execution.py +28 -0
- agentivium_core-0.2.0/docs/api.md +115 -0
- agentivium_core-0.2.0/docs/concepts.md +46 -0
- agentivium_core-0.2.0/docs/design-guideline.md +967 -0
- agentivium_core-0.2.0/docs/examples.md +68 -0
- agentivium_core-0.2.0/docs/extension_guide.md +45 -0
- agentivium_core-0.2.0/pyproject.toml +53 -0
- agentivium_core-0.2.0/tests/llm/test_client.py +13 -0
- agentivium_core-0.2.0/tests/llm/test_llm_trace.py +31 -0
- agentivium_core-0.2.0/tests/llm/test_message.py +17 -0
- agentivium_core-0.2.0/tests/llm/test_prompt.py +30 -0
- agentivium_core-0.2.0/tests/llm/test_request_response.py +21 -0
- agentivium_core-0.2.0/tests/llm/test_structured.py +34 -0
- agentivium_core-0.2.0/tests/test_eval.py +24 -0
- agentivium_core-0.2.0/tests/test_intent.py +39 -0
- agentivium_core-0.2.0/tests/test_planner.py +28 -0
- agentivium_core-0.2.0/tests/test_policy.py +60 -0
- agentivium_core-0.2.0/tests/test_public_api.py +12 -0
- agentivium_core-0.2.0/tests/test_tools.py +12 -0
- agentivium_core-0.2.0/tests/test_trace.py +24 -0
- agentivium_core-0.2.0/uv.lock +551 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PostToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Edit|Write|Bash",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "cat >/dev/null || true; git rev-parse --git-dir >/dev/null 2>&1 && code-review-graph update --skip-flows --repo \"/home/u001006/agentivium-core\" || true",
|
|
10
|
+
"timeout": 30
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"SessionStart": [
|
|
16
|
+
{
|
|
17
|
+
"matcher": "",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "cat >/dev/null || true; git rev-parse --git-dir >/dev/null 2>&1 && code-review-graph status --repo \"/home/u001006/agentivium-core\" || echo 'Not a git repo, skipping'",
|
|
22
|
+
"timeout": 10
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Debug Issue
|
|
3
|
+
description: Systematically debug issues using graph-powered code navigation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Debug Issue
|
|
7
|
+
|
|
8
|
+
Use the knowledge graph to systematically trace and debug issues.
|
|
9
|
+
|
|
10
|
+
### Steps
|
|
11
|
+
|
|
12
|
+
1. Use `semantic_search_nodes` to find code related to the issue.
|
|
13
|
+
2. Use `query_graph` with `callers_of` and `callees_of` to trace call chains.
|
|
14
|
+
3. Use `get_flow` to see full execution paths through suspected areas.
|
|
15
|
+
4. Run `detect_changes` to check if recent changes caused the issue.
|
|
16
|
+
5. Use `get_impact_radius` on suspected files to see what else is affected.
|
|
17
|
+
|
|
18
|
+
### Tips
|
|
19
|
+
|
|
20
|
+
- Check both callers and callees to understand the full context.
|
|
21
|
+
- Look at affected flows to find the entry point that triggers the bug.
|
|
22
|
+
- Recent changes are the most common source of new issues.
|
|
23
|
+
|
|
24
|
+
## Token Efficiency Rules
|
|
25
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
26
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
27
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Explore Codebase
|
|
3
|
+
description: Navigate and understand codebase structure using the knowledge graph
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Explore Codebase
|
|
7
|
+
|
|
8
|
+
Use the code-review-graph MCP tools to explore and understand the codebase.
|
|
9
|
+
|
|
10
|
+
### Steps
|
|
11
|
+
|
|
12
|
+
1. Run `list_graph_stats` to see overall codebase metrics.
|
|
13
|
+
2. Run `get_architecture_overview` for high-level community structure.
|
|
14
|
+
3. Use `list_communities` to find major modules, then `get_community` for details.
|
|
15
|
+
4. Use `semantic_search_nodes` to find specific functions or classes.
|
|
16
|
+
5. Use `query_graph` with patterns like `callers_of`, `callees_of`, `imports_of` to trace relationships.
|
|
17
|
+
6. Use `list_flows` and `get_flow` to understand execution paths.
|
|
18
|
+
|
|
19
|
+
### Tips
|
|
20
|
+
|
|
21
|
+
- Start broad (stats, architecture) then narrow down to specific areas.
|
|
22
|
+
- Use `children_of` on a file to see all its functions and classes.
|
|
23
|
+
- Use `find_large_functions` to identify complex code.
|
|
24
|
+
|
|
25
|
+
## Token Efficiency Rules
|
|
26
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
27
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
28
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Refactor Safely
|
|
3
|
+
description: Plan and execute safe refactoring using dependency analysis
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Refactor Safely
|
|
7
|
+
|
|
8
|
+
Use the knowledge graph to plan and execute refactoring with confidence.
|
|
9
|
+
|
|
10
|
+
### Steps
|
|
11
|
+
|
|
12
|
+
1. Use `refactor_tool` with mode="suggest" for community-driven refactoring suggestions.
|
|
13
|
+
2. Use `refactor_tool` with mode="dead_code" to find unreferenced code.
|
|
14
|
+
3. For renames, use `refactor_tool` with mode="rename" to preview all affected locations.
|
|
15
|
+
4. Use `apply_refactor_tool` with the refactor_id to apply renames.
|
|
16
|
+
5. After changes, run `detect_changes` to verify the refactoring impact.
|
|
17
|
+
|
|
18
|
+
### Safety Checks
|
|
19
|
+
|
|
20
|
+
- Always preview before applying (rename mode gives you an edit list).
|
|
21
|
+
- Check `get_impact_radius` before major refactors.
|
|
22
|
+
- Use `get_affected_flows` to ensure no critical paths are broken.
|
|
23
|
+
- Run `find_large_functions` to identify decomposition targets.
|
|
24
|
+
|
|
25
|
+
## Token Efficiency Rules
|
|
26
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
27
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
28
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Review Changes
|
|
3
|
+
description: Perform a structured code review using change detection and impact
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Review Changes
|
|
7
|
+
|
|
8
|
+
Perform a thorough, risk-aware code review using the knowledge graph.
|
|
9
|
+
|
|
10
|
+
### Steps
|
|
11
|
+
|
|
12
|
+
1. Run `detect_changes` to get risk-scored change analysis.
|
|
13
|
+
2. Run `get_affected_flows` to find impacted execution paths.
|
|
14
|
+
3. For each high-risk function, run `query_graph` with pattern="tests_for" to check test coverage.
|
|
15
|
+
4. Run `get_impact_radius` to understand the blast radius.
|
|
16
|
+
5. For any untested changes, suggest specific test cases.
|
|
17
|
+
|
|
18
|
+
### Output Format
|
|
19
|
+
|
|
20
|
+
Provide findings grouped by risk level (high/medium/low) with:
|
|
21
|
+
- What changed and why it matters
|
|
22
|
+
- Test coverage status
|
|
23
|
+
- Suggested improvements
|
|
24
|
+
- Overall merge recommendation
|
|
25
|
+
|
|
26
|
+
## Token Efficiency Rules
|
|
27
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
28
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
29
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# code-review-graph: session start status (Gemini CLI hook)
|
|
3
|
+
# Must output ONLY JSON on stdout. Logs go to stderr. Never blocks the session.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
cat > /dev/null || true
|
|
7
|
+
|
|
8
|
+
msg="$(code-review-graph status --repo "/home/u001006/agentivium-core" 2>&1 | head -n 1 || true)"
|
|
9
|
+
|
|
10
|
+
CRG_MSG="$msg" python3 -c '
|
|
11
|
+
import json,os
|
|
12
|
+
m=os.environ.get("CRG_MSG","")
|
|
13
|
+
print(json.dumps({"systemMessage":m,"suppressOutput":True}))
|
|
14
|
+
' 2>/dev/null || echo '{"suppressOutput": true}'
|
|
15
|
+
exit 0
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# code-review-graph: incremental update after write/replace (Gemini CLI hook)
|
|
3
|
+
# Must output ONLY JSON on stdout. Low-noise: no systemMessage.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
cat > /dev/null || true
|
|
7
|
+
|
|
8
|
+
code-review-graph update --skip-flows --repo "/home/u001006/agentivium-core" >/dev/null 2>&1 || true
|
|
9
|
+
echo '{"suppressOutput": true}'
|
|
10
|
+
exit 0
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"code-review-graph": {
|
|
4
|
+
"command": "uvx",
|
|
5
|
+
"args": [
|
|
6
|
+
"code-review-graph",
|
|
7
|
+
"serve"
|
|
8
|
+
],
|
|
9
|
+
"cwd": "/home/u001006/agentivium-core"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"hooks": {
|
|
13
|
+
"SessionStart": [
|
|
14
|
+
{
|
|
15
|
+
"matcher": "",
|
|
16
|
+
"hooks": [
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"command": "bash .gemini/hooks/crg-session-start.sh",
|
|
20
|
+
"name": "code-review-graph status",
|
|
21
|
+
"timeout": 10000
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"AfterTool": [
|
|
27
|
+
{
|
|
28
|
+
"matcher": "write_file|replace",
|
|
29
|
+
"hooks": [
|
|
30
|
+
{
|
|
31
|
+
"type": "command",
|
|
32
|
+
"command": "bash .gemini/hooks/crg-update.sh",
|
|
33
|
+
"name": "code-review-graph update",
|
|
34
|
+
"timeout": 30000
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug-issue
|
|
3
|
+
description: Systematically debug issues using graph-powered code navigation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Debug Issue
|
|
7
|
+
|
|
8
|
+
Use the knowledge graph to systematically trace and debug issues.
|
|
9
|
+
|
|
10
|
+
### Steps
|
|
11
|
+
|
|
12
|
+
1. Use `semantic_search_nodes` to find code related to the issue.
|
|
13
|
+
2. Use `query_graph` with `callers_of` and `callees_of` to trace call chains.
|
|
14
|
+
3. Use `get_flow` to see full execution paths through suspected areas.
|
|
15
|
+
4. Run `detect_changes` to check if recent changes caused the issue.
|
|
16
|
+
5. Use `get_impact_radius` on suspected files to see what else is affected.
|
|
17
|
+
|
|
18
|
+
### Tips
|
|
19
|
+
|
|
20
|
+
- Check both callers and callees to understand the full context.
|
|
21
|
+
- Look at affected flows to find the entry point that triggers the bug.
|
|
22
|
+
- Recent changes are the most common source of new issues.
|
|
23
|
+
|
|
24
|
+
## Token Efficiency Rules
|
|
25
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
26
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
27
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explore-codebase
|
|
3
|
+
description: Navigate and understand codebase structure using the knowledge graph
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Explore Codebase
|
|
7
|
+
|
|
8
|
+
Use the code-review-graph MCP tools to explore and understand the codebase.
|
|
9
|
+
|
|
10
|
+
### Steps
|
|
11
|
+
|
|
12
|
+
1. Run `list_graph_stats` to see overall codebase metrics.
|
|
13
|
+
2. Run `get_architecture_overview` for high-level community structure.
|
|
14
|
+
3. Use `list_communities` to find major modules, then `get_community` for details.
|
|
15
|
+
4. Use `semantic_search_nodes` to find specific functions or classes.
|
|
16
|
+
5. Use `query_graph` with patterns like `callers_of`, `callees_of`, `imports_of` to trace relationships.
|
|
17
|
+
6. Use `list_flows` and `get_flow` to understand execution paths.
|
|
18
|
+
|
|
19
|
+
### Tips
|
|
20
|
+
|
|
21
|
+
- Start broad (stats, architecture) then narrow down to specific areas.
|
|
22
|
+
- Use `children_of` on a file to see all its functions and classes.
|
|
23
|
+
- Use `find_large_functions` to identify complex code.
|
|
24
|
+
|
|
25
|
+
## Token Efficiency Rules
|
|
26
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
27
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
28
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactor-safely
|
|
3
|
+
description: Plan and execute safe refactoring using dependency analysis
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Refactor Safely
|
|
7
|
+
|
|
8
|
+
Use the knowledge graph to plan and execute refactoring with confidence.
|
|
9
|
+
|
|
10
|
+
### Steps
|
|
11
|
+
|
|
12
|
+
1. Use `refactor_tool` with mode="suggest" for community-driven refactoring suggestions.
|
|
13
|
+
2. Use `refactor_tool` with mode="dead_code" to find unreferenced code.
|
|
14
|
+
3. For renames, use `refactor_tool` with mode="rename" to preview all affected locations.
|
|
15
|
+
4. Use `apply_refactor_tool` with the refactor_id to apply renames.
|
|
16
|
+
5. After changes, run `detect_changes` to verify the refactoring impact.
|
|
17
|
+
|
|
18
|
+
### Safety Checks
|
|
19
|
+
|
|
20
|
+
- Always preview before applying (rename mode gives you an edit list).
|
|
21
|
+
- Check `get_impact_radius` before major refactors.
|
|
22
|
+
- Use `get_affected_flows` to ensure no critical paths are broken.
|
|
23
|
+
- Run `find_large_functions` to identify decomposition targets.
|
|
24
|
+
|
|
25
|
+
## Token Efficiency Rules
|
|
26
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
27
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
28
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-changes
|
|
3
|
+
description: Perform a structured code review using change detection and impact
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Review Changes
|
|
7
|
+
|
|
8
|
+
Perform a thorough, risk-aware code review using the knowledge graph.
|
|
9
|
+
|
|
10
|
+
### Steps
|
|
11
|
+
|
|
12
|
+
1. Run `detect_changes` to get risk-scored change analysis.
|
|
13
|
+
2. Run `get_affected_flows` to find impacted execution paths.
|
|
14
|
+
3. For each high-risk function, run `query_graph` with pattern="tests_for" to check test coverage.
|
|
15
|
+
4. Run `get_impact_radius` to understand the blast radius.
|
|
16
|
+
5. For any untested changes, suggest specific test cases.
|
|
17
|
+
|
|
18
|
+
### Output Format
|
|
19
|
+
|
|
20
|
+
Provide findings grouped by risk level (high/medium/low) with:
|
|
21
|
+
- What changed and why it matters
|
|
22
|
+
- Test coverage status
|
|
23
|
+
- Suggested improvements
|
|
24
|
+
- Overall merge recommendation
|
|
25
|
+
|
|
26
|
+
## Token Efficiency Rules
|
|
27
|
+
- ALWAYS start with `get_minimal_context(task="<your task>")` before any other graph tool.
|
|
28
|
+
- Use `detail_level="minimal"` on all calls. Only escalate to "standard" when minimal is insufficient.
|
|
29
|
+
- Target: complete any review/debug/refactor task in ≤5 tool calls and ≤800 total output tokens.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PostToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Edit|Write|Bash",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "cat >/dev/null || true; git rev-parse --git-dir >/dev/null 2>&1 && code-review-graph update --skip-flows --repo \"/home/u001006/agentivium-core\" || true",
|
|
10
|
+
"timeout": 30
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"SessionStart": [
|
|
16
|
+
{
|
|
17
|
+
"matcher": "",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "cat >/dev/null || true; git rev-parse --git-dir >/dev/null 2>&1 && code-review-graph status --repo \"/home/u001006/agentivium-core\" || echo 'Not a git repo, skipping'",
|
|
22
|
+
"timeout": 10
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The project follows [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [0.2.0] - 2026-07-07
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added provider-neutral `agentivium_core.llm` contracts.
|
|
12
|
+
- Added `LLMMessage`, `LLMRequest`, `LLMUsage`, and `LLMResponse`.
|
|
13
|
+
- Added `LLMClient` plus `MockLLMClient` for tests and demos.
|
|
14
|
+
- Added `PromptTemplate`, `StructuredOutputSpec`, and `StructuredOutputParser`.
|
|
15
|
+
- Added `LLMCallTrace` and extended `ExecutionTrace` with `llm_calls`.
|
|
16
|
+
|
|
17
|
+
## [0.1.0] - 2026-07-06
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Domain-neutral intent, policy, planner, and tool contracts.
|
|
22
|
+
- Versioned intent and execution trace schemas.
|
|
23
|
+
- Structured validation, action plan, and evaluation records.
|
|
24
|
+
- Base exceptions, documentation, and unit tests.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agentivium AI
|
|
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.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentivium-core
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Core abstractions for Agentivium agent-native systems.
|
|
5
|
+
Author: Agentivium AI
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Agentivium AI
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Classifier: Development Status :: 3 - Alpha
|
|
29
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
30
|
+
Classifier: Programming Language :: Python :: 3
|
|
31
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
32
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
34
|
+
Classifier: Typing :: Typed
|
|
35
|
+
Requires-Python: >=3.10
|
|
36
|
+
Requires-Dist: pydantic<3,>=2.0
|
|
37
|
+
Provides-Extra: dev
|
|
38
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
39
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
41
|
+
Description-Content-Type: text/markdown
|
|
42
|
+
|
|
43
|
+
# Agentivium Core
|
|
44
|
+
|
|
45
|
+
`agentivium-core` defines the small, domain-neutral contracts shared by
|
|
46
|
+
Agentivium agent-native systems. It provides typed schemas and abstract
|
|
47
|
+
interfaces for intent parsing, policy validation, planning, tool adaptation,
|
|
48
|
+
provider-neutral LLM calls, execution tracing, and evaluation.
|
|
49
|
+
|
|
50
|
+
It is not an agent runtime, a provider-specific LLM wrapper, or a domain
|
|
51
|
+
implementation. Schedulers, provider clients, policies, and orchestration
|
|
52
|
+
belong in extension packages.
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install agentivium-core
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For local development:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install -e ".[dev]"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Extend the core
|
|
67
|
+
|
|
68
|
+
Domain packages subclass schemas and implement interfaces:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from agentivium_core.intent import IntentIR, IntentParser
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class MyIntentIR(IntentIR):
|
|
75
|
+
domain: str = "my_domain"
|
|
76
|
+
task: str
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class MyIntentParser(IntentParser):
|
|
80
|
+
def parse(
|
|
81
|
+
self,
|
|
82
|
+
request: str,
|
|
83
|
+
context: dict[str, object] | None = None,
|
|
84
|
+
) -> MyIntentIR:
|
|
85
|
+
return MyIntentIR(raw_request=request, task=request)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The dependency direction stays one-way: domain packages import
|
|
89
|
+
`agentivium_core`; the core never imports a domain package.
|
|
90
|
+
|
|
91
|
+
## Public API
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
from agentivium_core.intent import IntentIR, IntentParser
|
|
95
|
+
from agentivium_core.planner import ActionPlan, Planner
|
|
96
|
+
from agentivium_core.policy import (
|
|
97
|
+
PolicyValidator,
|
|
98
|
+
ValidationIssue,
|
|
99
|
+
ValidationResult,
|
|
100
|
+
)
|
|
101
|
+
from agentivium_core.tools import ToolAdapter
|
|
102
|
+
from agentivium_core.trace import ExecutionTrace
|
|
103
|
+
from agentivium_core.eval import EvaluationRecord
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Provider-neutral LLM abstraction
|
|
107
|
+
|
|
108
|
+
`agentivium-core` defines `LLMClient`, `LLMRequest`, `LLMResponse`,
|
|
109
|
+
`PromptTemplate`, `StructuredOutputSpec`, and `LLMCallTrace` so downstream
|
|
110
|
+
packages can use LLMs without coupling core to OpenAI, Anthropic, Gemini,
|
|
111
|
+
Ollama, vLLM, llama.cpp, or any other provider.
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from agentivium_core.llm import (
|
|
115
|
+
LLMClient,
|
|
116
|
+
LLMRequest,
|
|
117
|
+
LLMResponse,
|
|
118
|
+
PromptTemplate,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class MyLocalLLMClient(LLMClient):
|
|
123
|
+
def generate(self, request: LLMRequest) -> LLMResponse:
|
|
124
|
+
return LLMResponse(content='{"intent": "example"}', model="local")
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
template = PromptTemplate(
|
|
128
|
+
name="intent_parser",
|
|
129
|
+
system="You extract structured intent.",
|
|
130
|
+
user_template="Request: {request}",
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
messages = template.render({"request": "Run a small MPI job."})
|
|
134
|
+
client = MyLocalLLMClient()
|
|
135
|
+
response = client.generate(LLMRequest(messages=messages))
|
|
136
|
+
print(response.content)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Production provider clients live in domain or provider packages. Core only
|
|
140
|
+
defines the contracts and a `MockLLMClient` for tests and demos.
|
|
141
|
+
|
|
142
|
+
See the [concepts](docs/concepts.md), [API reference](docs/api.md),
|
|
143
|
+
[extension guide](docs/extension_guide.md), and
|
|
144
|
+
[examples](docs/examples.md). The complete v0.1 rationale and boundaries are
|
|
145
|
+
preserved in the original [design guideline](docs/design-guideline.md).
|