## 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]>
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: forgejo.riotpiao.com
|
|
IMAGE: forgejo.riotpiao.com/riotpiao-poimen/poimen-memory
|
|
DOCKER_HOST: tcp://localhost:2375
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Tag & Push Latest
|
|
runs-on: rust
|
|
steps:
|
|
- name: Install Docker
|
|
run: apt-get update && apt-get install -y docker.io
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get short SHA
|
|
id: sha
|
|
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Registry login
|
|
run: |
|
|
echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" \
|
|
--username "${REGISTRY_USER}" --password-stdin
|
|
env:
|
|
REGISTRY_USER: ${{ secrets.FORGEJO_REGISTRY_USER }}
|
|
REGISTRY_TOKEN: ${{ secrets.FORGEJO_REGISTRY_TOKEN }}
|
|
|
|
- name: Pull SHA image and tag as latest
|
|
run: |
|
|
docker pull "${IMAGE}:${{ steps.sha.outputs.short_sha }}" && \
|
|
docker tag "${IMAGE}:${{ steps.sha.outputs.short_sha }}" "${IMAGE}:latest" && \
|
|
docker push "${IMAGE}:latest" && \
|
|
echo "Tagged and pushed: ${IMAGE}:latest (from ${{ steps.sha.outputs.short_sha }})"
|
|
|
|
- name: Prune images
|
|
run: docker image prune -a --force 2>&1 | tail -3 || true
|