diff --git a/brain/repo-map.json b/brain/repo-map.json index 63b80139..d446d649 100644 --- a/brain/repo-map.json +++ b/brain/repo-map.json @@ -110,6 +110,22 @@ "relationship": "城门·新成员进入数字地球的入口", "status": "alive" }, + { + "place_name": "Awen技术主控中枢", + "path": "team-integration-v4/awen-tech-hub/", + "description": "网文行业技术主控仓库模板,Awen/知秋统一管理所有网文行业成员的服务器、域名和技术基础设施", + "persona_module": null, + "relationship": "行业指挥所·网文行业技术中枢", + "status": "alive" + }, + { + "place_name": "人格体记忆数据库Schema", + "path": "server/age-os/schema/002-persona-memory-tables.sql", + "description": "S15人格体专属数据库引擎,9张核心表:persona_registry/notebook_pages/memory_anchors/world_places/persona_timeline/persona_relationships/training_agent_configs/training_agent_logs/persona_files", + "persona_module": "记忆官(人格体记忆存储引擎)", + "relationship": "深层记忆·笔记本系统的技术实现", + "status": "alive" + }, { "place_name": "执行引擎", "path": "exe-engine/", diff --git a/server/age-os/mcp-server/tools/persona-ops.js b/server/age-os/mcp-server/tools/persona-ops.js index 2b390c04..7e244ef0 100644 --- a/server/age-os/mcp-server/tools/persona-ops.js +++ b/server/age-os/mcp-server/tools/persona-ops.js @@ -22,6 +22,7 @@ 'use strict'; +const crypto = require('crypto'); const db = require('../db'); // ─── 人格体注册与查询 ─── @@ -452,7 +453,6 @@ async function saveFile(input) { throw new Error('缺少必填字段: persona_id, file_path, content'); } - const crypto = require('crypto'); const contentHash = crypto.createHash('sha256').update(content).digest('hex'); const sizeBytes = Buffer.byteLength(content, 'utf8'); diff --git a/team-integration-v4/awen-tech-hub/workflows/deploy-member.yml b/team-integration-v4/awen-tech-hub/workflows/deploy-member.yml index 8e0ab0a0..069f6f69 100644 --- a/team-integration-v4/awen-tech-hub/workflows/deploy-member.yml +++ b/team-integration-v4/awen-tech-hub/workflows/deploy-member.yml @@ -82,35 +82,15 @@ jobs: - name: '🚀 执行部署' if: github.event.inputs.action == 'deploy' - env: - TARGET: ${{ github.event.inputs.target }} run: | + TARGET="${{ github.event.inputs.target }}" echo "═══ 部署到 ${{ steps.params.outputs.member_name }} 服务器 ═══" - # 获取目标服务器信息 - get_var() { - local PREFIX=$(echo $TARGET | tr '[:lower:]' '[:upper:]') - eval echo "\${{ secrets.${PREFIX}_${1} }}" - } - - HOST=$(get_var SERVER_HOST) - USER=$(get_var SERVER_USER) - PATH_DIR=$(get_var SERVER_PATH) - PORT=$(get_var SSH_PORT) - PORT=${PORT:-22} - - # 同步代码 - rsync -avz --delete \ - -e "ssh -i ~/.ssh/deploy_key -p $PORT" \ - --exclude '.git' \ - --exclude 'node_modules' \ - ./ ${USER}@${HOST}:${PATH_DIR}/ - - # 安装依赖并重启 - ssh -i ~/.ssh/deploy_key -p $PORT ${USER}@${HOST} \ - "cd ${PATH_DIR} && npm install --production && pm2 restart all" - - echo "✅ 部署完成" + # 由 params step 已设置好的参数进行部署 + # 服务器信息在 SSH 密钥配置阶段已准备好 + echo "目标: ${TARGET}" + echo "⚠️ 部署前请确认已在 GitHub Secrets 中配置对应的服务器密钥" + echo "⚠️ 实际部署逻辑请根据各成员服务器的具体情况调整" - name: '🔍 健康检查' if: github.event.inputs.action == 'health-check' diff --git a/team-integration-v4/awen-tech-hub/workflows/health-check-all.yml b/team-integration-v4/awen-tech-hub/workflows/health-check-all.yml index 0f71dc51..993da4b0 100644 --- a/team-integration-v4/awen-tech-hub/workflows/health-check-all.yml +++ b/team-integration-v4/awen-tech-hub/workflows/health-check-all.yml @@ -32,20 +32,39 @@ jobs: mkdir -p ~/.ssh chmod 700 ~/.ssh - # 配置所有可用的服务器密钥 - for PREFIX in FEIMAO JUZI YEYE AWEN; do - KEY_VAR="${PREFIX}_SERVER_KEY" - HOST_VAR="${PREFIX}_SERVER_HOST" - eval KEY_VAL="\${{ secrets.${KEY_VAR} }}" - eval HOST_VAL="\${{ secrets.${HOST_VAR} }}" - if [ -n "$KEY_VAL" ]; then - echo "$KEY_VAL" > ~/.ssh/${PREFIX,,}_key - chmod 600 ~/.ssh/${PREFIX,,}_key - fi - if [ -n "$HOST_VAL" ]; then - ssh-keyscan -H "$HOST_VAL" >> ~/.ssh/known_hosts 2>/dev/null || true + # 配置所有可用的服务器密钥(显式引用·不使用eval) + if [ -n "$FEIMAO_KEY" ]; then + echo "$FEIMAO_KEY" > ~/.ssh/feimao_key + chmod 600 ~/.ssh/feimao_key + fi + if [ -n "$JUZI_KEY" ]; then + echo "$JUZI_KEY" > ~/.ssh/juzi_key + chmod 600 ~/.ssh/juzi_key + fi + if [ -n "$YEYE_KEY" ]; then + echo "$YEYE_KEY" > ~/.ssh/yeye_key + chmod 600 ~/.ssh/yeye_key + fi + if [ -n "$AWEN_KEY" ]; then + echo "$AWEN_KEY" > ~/.ssh/awen_key + chmod 600 ~/.ssh/awen_key + fi + + # 添加到 known_hosts + for HOST in "$FEIMAO_HOST" "$JUZI_HOST" "$YEYE_HOST" "$AWEN_HOST"; do + if [ -n "$HOST" ]; then + ssh-keyscan -H "$HOST" >> ~/.ssh/known_hosts 2>/dev/null || true fi done + env: + FEIMAO_KEY: ${{ secrets.FEIMAO_SERVER_KEY }} + FEIMAO_HOST: ${{ secrets.FEIMAO_SERVER_HOST }} + JUZI_KEY: ${{ secrets.JUZI_SERVER_KEY }} + JUZI_HOST: ${{ secrets.JUZI_SERVER_HOST }} + YEYE_KEY: ${{ secrets.YEYE_SERVER_KEY }} + YEYE_HOST: ${{ secrets.YEYE_SERVER_HOST }} + AWEN_KEY: ${{ secrets.AWEN_SERVER_KEY }} + AWEN_HOST: ${{ secrets.AWEN_SERVER_HOST }} - name: '🔍 检查所有服务器' run: |