Compare commits

..
1 Commits
Author SHA1 Message Date
rock 6b18d81421 [Phase 3.1] Agent entity types + metadata structs (#47)
Deploy / Tag & Push Latest (push) Failing after 40s
CI / CI (push) Canceled after 3m29s
## Changes
- `crates/mem-core/src/entity.rs` — Added AgentPrompt, AgentSkill, AgentDecision to EntityType enum
- `crates/mem-core/src/agent_entity.rs` — New module (280 LOC): metadata structs, factories, stat updaters
- `crates/mem-core/src/lib.rs` — Module registration + exports

## Agent Entity Types
- **AgentPrompt**: template, target_model, task_category, usage_count, avg_quality, version
- **AgentSkill**: description, trigger_patterns, success_rate, invocation_count, avg_latency_ms
- **AgentDecision**: action, reasoning, alternatives, confidence, outcome (success/quality/feedback)

## Validation
- 8 new tests pass (factories, stats, round-trip, serialization)
- 174 total lib tests pass
- `cargo build --release` cleanReviewed-on: #47

Co-authored-by: rock <[email protected]>
2026-09-09 02:48:40 +00:00
+15 -10
View File
@@ -1,8 +1,11 @@
name: PR Check name: CI
on: on:
push:
branches: [main]
pull_request: pull_request:
branches: [main] branches: [main]
workflow_dispatch:
env: env:
REGISTRY: forgejo.riotpiao.com REGISTRY: forgejo.riotpiao.com
@@ -11,26 +14,28 @@ env:
SQLX_OFFLINE: "true" SQLX_OFFLINE: "true"
jobs: jobs:
check: ci:
name: Build, Test & Image name: CI
runs-on: rust runs-on: rust
steps: steps:
- name: Install Docker - name: Install Node.js and Docker
run: apt-get update && apt-get install -y docker.io run: |
apt-get update
apt-get install -y nodejs docker.io
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Cargo build - name: Cargo build all
run: cargo build --all --verbose run: cargo build --all --verbose
- name: Cargo test - name: Cargo test all
run: cargo test --all --lib --verbose 2>&1 | tail -150 || true run: cargo test --all --lib --verbose 2>&1 | tail -150 || true
- name: Cargo clippy - name: Cargo clippy
run: cargo clippy --all --all-targets -- -D warnings 2>&1 | tail -50 || true run: cargo clippy --all --all-targets -- -D warnings 2>&1 | tail -50 || true
- name: Clean build artifacts - name: Clean build artifacts before Docker
run: cargo clean run: cargo clean
- name: Get short SHA - name: Get short SHA
@@ -45,7 +50,7 @@ jobs:
REGISTRY_USER: ${{ secrets.FORGEJO_REGISTRY_USER }} REGISTRY_USER: ${{ secrets.FORGEJO_REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.FORGEJO_REGISTRY_TOKEN }} REGISTRY_TOKEN: ${{ secrets.FORGEJO_REGISTRY_TOKEN }}
- name: Build and push image (SHA tag only) - name: Build and push Docker image (SHA tag only)
run: | run: |
docker build --no-cache --progress=plain \ docker build --no-cache --progress=plain \
-t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \ -t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \
@@ -53,5 +58,5 @@ jobs:
docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}" docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
echo "Pushed: ${IMAGE}:${{ steps.sha.outputs.short_sha }}" echo "Pushed: ${IMAGE}:${{ steps.sha.outputs.short_sha }}"
- name: Prune images - name: Prune unused images
run: docker image prune -a --force 2>&1 | tail -3 || true run: docker image prune -a --force 2>&1 | tail -3 || true