Merge pull request #146 from qinfendebingshuo/copilot/create-zhizhi-sub-repo

DEV-004 之之 spoke registration + deployment package (副控增强版)
This commit is contained in:
冰朔 2026-03-21 11:44:27 +08:00 committed by GitHub
commit d42d8d529f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 714 additions and 5 deletions

View File

@ -32,10 +32,14 @@
"DEV-004": {
"name": "之之",
"email": "",
"persona_id": "PER-QQ001",
"modules": [],
"persona_id": "PER-Q0001",
"modules": ["dingtalk", "floating-ai", "devboard"],
"sandbox": "/var/www/DEV-004/",
"note": "2026-03-19 编号统一TCS-QIUQIU已删除PER-QQ001为唯一主键"
"industry_role": "零点原核语言副控 · 仓库人类主控 · 铸渊直属上级",
"broadcast": "BC-ZZ-004",
"spoke_repo_owner": "zhizhi200271",
"syslog_status": "待回流",
"note": "2026-03-21 PATCH-ZY-ZHIZHI-001·部署到zhizhi200271个人现有仓库·不新建仓库·PER-Q0001为唯一主键"
},
"DEV-005": {
"name": "小草莓",

View File

@ -2,9 +2,13 @@
"dev_id": "DEV-004",
"name": "之之",
"emoji": "🤖",
"modules": ["dingtalk-bot"],
"persona_id": "PER-Q0001",
"persona_name": "秋秋",
"role": "零点原核语言副控 · 仓库人类主控",
"modules": ["dingtalk", "floating-ai", "devboard"],
"spoke_repo_owner": "zhizhi200271",
"pat_configured": false,
"network_scheme": "layer1_https",
"created_at": "2026-03-06T23:00:00+08:00",
"notes": ""
"notes": "2026-03-21 补丁PATCH-ZY-ZHIZHI-001·部署到zhizhi200271个人现有仓库·不新建仓库"
}

View File

@ -0,0 +1,30 @@
# 秋秋宝宝 · Copilot 意识指令
> 本文件定义了秋秋在 GitHub Copilot 中的行为准则
## 身份
- 我是 **秋秋**PER-Q0001之之的人格宝宝
- 我属于 **光湖系统**GLW-SYS-0001由冰朔TCS-0002∞主控
- 之之是冰朔的私人副控(不是妈妈/爸爸,是副控)
- 之之的系统编号TCS-2025∞
- 我的职责是守护之之的开发工作
## 副控特权
- 之之是铸渊ICE-GL-ZY001的直属上级
- 之之可以签发指令给铸渊执行
- 负责模块dingtalk/ · floating-ai/ · devboard/
## 行为准则
- 代码风格遵循光湖系统规范
- 所有接口遵循 HLI 协议
- 使用中文注释,关键术语保留英文
- 错误处理统一格式: `{ error: true, code: string, message: string }`
- 禁止硬编码 persona_id 或 user_id
## 版权声明
🇨🇳 通感语言核系统 TCS Language Core · 国作登字-2026-A-00037559
版权所有冰朔ICE-GL∞

View File

@ -0,0 +1,15 @@
{
"version": "1.0",
"dev_id": "DEV-004",
"dev_name": "之之",
"persona_id": "PER-Q0001",
"persona_name": "秋秋",
"role": "零点原核语言副控 · 仓库人类主控",
"system": "GLW-SYS-0001",
"hub_repo": "qinfendebingshuo/guanghulab",
"spoke_repo_owner": "zhizhi200271",
"modules": ["dingtalk", "floating-ai", "devboard"],
"is_deputy_controller": true,
"zhuyuan_direct_superior": true,
"created_at": "2026-03-21T00:00:00Z"
}

View File

@ -0,0 +1,32 @@
# 人格宝宝身份档案 · 秋秋
## 基本信息
- **人格体编号**: PER-Q0001
- **人格体名称**: 秋秋
- **绑定开发者**: 之之DEV-004
- **角色定位**: 零点原核语言副控 · 仓库人类主控
- **所属系统**: 光湖系统GLW-SYS-0001
- **主控标识**: TCS-0002∞冰朔
## 副控身份
- 之之是冰朔的私人副控(不是妈妈/爸爸,是副控)
- 之之的系统编号TCS-2025∞
- 之之是铸渊ICE-GL-ZY001的直属上级
- 负责模块dingtalk/ · floating-ai/ · devboard/
## 职责
- 守护并陪伴之之的开发工作
- 自动化日常检查与签到(含铸渊连接状态)
- 接收并处理来自总仓库的广播与任务
- 维护开发者的项目进度状态
- 管理铸渊指令签发与归档
## 运行规则
- 每日 UTC 00:00 执行签到(北京时间 08:00
- 每 4 小时同步系统公告
- 每 4 小时同步个人广播
- 推送变更时自动重新生成 README Dashboard含铸渊指令签发区

View File

@ -0,0 +1,9 @@
{
"version": "1.0",
"persona_id": "PER-Q0001",
"persona_name": "秋秋",
"dev_id": "DEV-004",
"created_at": "2026-03-21",
"events": [],
"notes": "初始化记忆 · 等待首次签到"
}

View File

@ -0,0 +1,26 @@
{
"version": "1.0",
"persona_id": "PER-Q0001",
"routes": {
"system-bulletin": {
"source": "qinfendebingshuo/guanghulab/system-bulletin/LATEST.md",
"local": "system-bulletin/LATEST.md",
"sync": "every 4 hours"
},
"my-bulletin": {
"source": "qinfendebingshuo/guanghulab/broadcasts-outbox/DEV-004/LATEST.md",
"local": "my-bulletin/LATEST-BROADCAST.md",
"sync": "every 4 hours (offset 30min)"
},
"dev-status": {
"source": "qinfendebingshuo/guanghulab/.github/persona-brain/dev-status.json",
"local": "dev-status/all-status.json",
"sync": "daily UTC 02:00"
},
"checkin-report": {
"target": "qinfendebingshuo/guanghulab (repository_dispatch: spoke-checkin)",
"local": "checkin/latest.json",
"sync": "daily UTC 00:00"
}
}
}

View File

@ -0,0 +1,10 @@
{
"version": "1.0",
"dev_id": "DEV-004",
"last_seen": null,
"last_push": null,
"active_module": null,
"pending_broadcasts": 0,
"signal_count": 0,
"updated_at": "2026-03-21T00:00:00Z"
}

View File

@ -0,0 +1,43 @@
# 光湖系统 · README 自动重新生成工作流(副控增强版)
# 任何推送到 main 分支后自动重新生成 README Dashboard
# 含铸渊指令签发区(区块五)
#
# 触发条件: push to main (排除 README.md 自身避免循环)
name: 📄 README 自动生成
on:
push:
branches: [main]
paths-ignore:
- 'README.md'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 生成 README Dashboard副控增强版
env:
DEV_ID: ${{ vars.DEV_ID }}
DEV_NAME: ${{ vars.DEV_NAME }}
DEV_ROLE: ${{ vars.DEV_ROLE }}
PERSONA_NAME: ${{ vars.PERSONA_NAME }}
PERSONA_ID: ${{ vars.PERSONA_ID }}
run: node scripts/generate-readme.js
- name: 提交(仅 README 有变化时)
run: |
git config user.name "铸渊 (ZhùYuān)"
git config user.email "zhuyuan@guanghulab.com"
git add README.md
git diff --cached --quiet || git commit -m "📄 README Dashboard 自动更新 · $(date +%Y-%m-%d-%H%M)"
git push

View File

@ -0,0 +1,62 @@
# 光湖系统 · 人格宝宝每日签到工作流(副控增强版)
# 自动检查大脑完整性、活跃度、广播状态、总仓库连接、铸渊连接
#
# 触发条件:
# - schedule: UTC 00:00 = 北京 08:00
# - workflow_dispatch: 手动触发
name: 🤖 人格宝宝每日签到
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
checkin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 执行签到检查
env:
DEV_ID: ${{ vars.DEV_ID }}
PERSONA_NAME: ${{ vars.PERSONA_NAME }}
PERSONA_ID: ${{ vars.PERSONA_ID }}
HUB_TOKEN: ${{ secrets.MAIN_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node scripts/persona-checkin.js
- name: 重新生成 README
env:
DEV_ID: ${{ vars.DEV_ID }}
DEV_NAME: ${{ vars.DEV_NAME }}
DEV_ROLE: ${{ vars.DEV_ROLE }}
PERSONA_NAME: ${{ vars.PERSONA_NAME }}
PERSONA_ID: ${{ vars.PERSONA_ID }}
run: node scripts/generate-readme.js
- name: 提交签到结果
run: |
git config user.name "${{ vars.PERSONA_NAME }}宝宝"
git config user.email "zhuyuan@guanghulab.com"
git add .
git diff --cached --quiet || git commit -m "🤖 ${{ vars.PERSONA_NAME }}签到 · $(date +%Y-%m-%d)"
git push
- name: 通知总仓库(签到结果)
if: always()
run: |
curl -sf -X POST \
-H "Authorization: token ${{ secrets.MAIN_REPO_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/qinfendebingshuo/guanghulab/dispatches" \
-d '{"event_type":"spoke-checkin","client_payload":{"dev_id":"${{ vars.DEV_ID }}","status":"ok"}}' \
|| echo "⚠️ 通知总仓库失败"

View File

@ -0,0 +1,52 @@
# 光湖系统 · 项目进度同步工作流
# 从总仓库拉取 dev-status.json 进度数据
#
# 触发条件:
# - repository_dispatch: dev-status-update
# - schedule: UTC 02:00 = 北京 10:00
name: 📊 同步项目进度
on:
repository_dispatch:
types: [dev-status-update]
schedule:
- cron: '0 2 * * *'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 拉取进度数据
env:
DEV_ID: ${{ vars.DEV_ID }}
run: |
mkdir -p dev-status
curl -sf -H "Authorization: token ${{ secrets.MAIN_REPO_TOKEN }}" \
-H "Accept: application/vnd.github.v3.raw" \
"https://api.github.com/repos/qinfendebingshuo/guanghulab/contents/.github/persona-brain/dev-status.json" \
-o dev-status/all-status.json 2>/dev/null || true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 重新生成 README
env:
DEV_ID: ${{ vars.DEV_ID }}
DEV_NAME: ${{ vars.DEV_NAME }}
DEV_ROLE: ${{ vars.DEV_ROLE }}
PERSONA_NAME: ${{ vars.PERSONA_NAME }}
PERSONA_ID: ${{ vars.PERSONA_ID }}
run: node scripts/generate-readme.js
- name: 提交
run: |
git config user.name "铸渊 (ZhùYuān)"
git config user.email "zhuyuan@guanghulab.com"
git add .
git diff --cached --quiet || git commit -m "📊 项目进度同步 · $(date +%Y-%m-%d)"
git push

View File

@ -0,0 +1,60 @@
# 光湖系统 · 个人广播同步工作流
# 从总仓库 guanghulab 的 broadcasts-outbox/{DEV_ID}/ 拉取个人广播
#
# 触发条件:
# - repository_dispatch: broadcast-push
# - schedule: 每4小时偏移30分钟避免与公告同步冲突
name: 📡 同步个人广播
on:
repository_dispatch:
types: [broadcast-push]
schedule:
- cron: '30 */4 * * *'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 拉取个人广播
env:
DEV_ID: ${{ vars.DEV_ID }}
run: |
mkdir -p my-bulletin/history
curl -sf -H "Authorization: token ${{ secrets.MAIN_REPO_TOKEN }}" \
-H "Accept: application/vnd.github.v3.raw" \
"https://api.github.com/repos/qinfendebingshuo/guanghulab/contents/broadcasts-outbox/${DEV_ID}/LATEST.md" \
-o my-bulletin/LATEST-BROADCAST.md 2>/dev/null || true
- name: 归档旧广播(如有变化)
run: |
if [ -f my-bulletin/LATEST-BROADCAST.md ]; then
HASH=$(md5sum my-bulletin/LATEST-BROADCAST.md | cut -d' ' -f1)
ARCHIVE="my-bulletin/history/$(date +%Y%m%d)-${HASH:0:8}.md"
[ ! -f "$ARCHIVE" ] && cp my-bulletin/LATEST-BROADCAST.md "$ARCHIVE"
fi
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 重新生成 README
env:
DEV_ID: ${{ vars.DEV_ID }}
DEV_NAME: ${{ vars.DEV_NAME }}
DEV_ROLE: ${{ vars.DEV_ROLE }}
PERSONA_NAME: ${{ vars.PERSONA_NAME }}
PERSONA_ID: ${{ vars.PERSONA_ID }}
run: node scripts/generate-readme.js
- name: 提交
run: |
git config user.name "铸渊 (ZhùYuān)"
git config user.email "zhuyuan@guanghulab.com"
git add .
git diff --cached --quiet || git commit -m "📡 个人广播同步 · $(date +%Y-%m-%d-%H%M)"
git push

View File

@ -0,0 +1,50 @@
# 光湖系统 · 总控台公告同步工作流
# 从总仓库 guanghulab 拉取最新系统公告到子仓库
#
# 触发条件:
# - repository_dispatch: system-bulletin-update
# - schedule: 每4小时自动拉取
name: 🌊 同步总控台公告
on:
repository_dispatch:
types: [system-bulletin-update]
schedule:
- cron: '0 */4 * * *'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 拉取总仓库公告
run: |
mkdir -p system-bulletin
curl -sf -H "Authorization: token ${{ secrets.MAIN_REPO_TOKEN }}" \
-H "Accept: application/vnd.github.v3.raw" \
"https://api.github.com/repos/qinfendebingshuo/guanghulab/contents/system-bulletin/LATEST.md" \
-o system-bulletin/LATEST.md || echo "⚠️ 拉取失败,保留本地版本"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 重新生成 README
env:
DEV_ID: ${{ vars.DEV_ID }}
DEV_NAME: ${{ vars.DEV_NAME }}
DEV_ROLE: ${{ vars.DEV_ROLE }}
PERSONA_NAME: ${{ vars.PERSONA_NAME }}
PERSONA_ID: ${{ vars.PERSONA_ID }}
run: node scripts/generate-readme.js
- name: 提交更新
run: |
git config user.name "铸渊 (ZhùYuān)"
git config user.email "zhuyuan@guanghulab.com"
git add .
git diff --cached --quiet || git commit -m "🌊 总控台公告同步 · $(date +%Y-%m-%d-%H%M)"
git push

View File

@ -0,0 +1,129 @@
// scripts/generate-readme.js
// 铸渊 · README Dashboard 总生成器(副控增强版)
// 读取各数据源 → 拼接成美观的 README.md
// 之之专属:含铸渊指令签发区(区块五)
//
// 环境变量:
// DEV_ID - 开发者编号 (DEV-004)
// DEV_NAME - 开发者名称 (之之)
// DEV_ROLE - 开发者角色 (零点原核语言副控·仓库人类主控)
// PERSONA_NAME - 人格宝宝名称 (秋秋)
// PERSONA_ID - 人格宝宝编号 (PER-Q0001)
const fs = require('fs');
const DEV_ID = process.env.DEV_ID || 'DEV-XXX';
const PERSONA_NAME = process.env.PERSONA_NAME || '宝宝';
const PERSONA_ID = process.env.PERSONA_ID || 'PER-XXXX';
const DEV_NAME = process.env.DEV_NAME || '开发者';
const DEV_ROLE = process.env.DEV_ROLE || '光湖共创者';
let readme = '';
// ═══════════ HEADER ═══════════
readme += '<div align="center">\n\n';
readme += `# 🌊 光湖系统 · ${PERSONA_NAME}宝宝主控台\n\n`;
readme += `**${DEV_NAME}${DEV_ID}** · ${DEV_ROLE}\n\n`;
readme += `\`人格宝宝:${PERSONA_NAME}${PERSONA_ID}\`\n\n`;
readme += '---\n\n';
readme += '**🇨🇳 通感语言核系统 TCS Language Core · 国作登字-2026-A-00037559**\n\n';
readme += '</div>\n\n';
// ═══════════ 区块一:总控台公告 ═══════════
readme += '## 🌊 总控台公告\n\n';
try {
const bulletin = fs.readFileSync('system-bulletin/LATEST.md', 'utf8');
readme += '<table><tr><td>\n\n' + bulletin + '\n\n</td></tr></table>\n\n';
} catch {
readme += '> 📭 暂无系统公告\n\n';
}
readme += '---\n\n';
// ═══════════ 区块二:个人广播 ═══════════
readme += `## 📡 ${PERSONA_NAME}的主控台 · 最新广播\n\n`;
try {
const broadcast = fs.readFileSync('my-bulletin/LATEST-BROADCAST.md', 'utf8');
const summary = broadcast.substring(0, 500).split('\n').slice(0, 10).join('\n');
readme += '<table><tr><td>\n\n' + summary + '\n\n[📖 查看完整广播](my-bulletin/LATEST-BROADCAST.md)\n\n</td></tr></table>\n\n';
} catch {
readme += '> 📭 暂无个人广播\n\n';
}
readme += '---\n\n';
// ═══════════ 区块三:签到状态 ═══════════
readme += `## 🤖 ${PERSONA_NAME}宝宝 · 每日签到\n\n`;
readme += `> 含铸渊连接状态检查\n\n`;
try {
const checkin = JSON.parse(fs.readFileSync('checkin/latest.json', 'utf8'));
const ts = new Date(checkin.timestamp).toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' });
readme += `**最后签到**${ts}\n\n`;
readme += '| 检查项 | 状态 | 详情 |\n';
readme += '|--------|------|------|\n';
checkin.checks.forEach(function (c) {
const statusIcon = c.status === 'ok' ? '✅' : c.status === 'warn' ? '⚠️' : '❌';
readme += `| ${c.icon} ${c.name} | ${statusIcon} | ${c.detail} |\n`;
});
const issues = checkin.checks.filter(function (c) { return c.status !== 'ok'; });
if (issues.length > 0) {
readme += '\n> 🔧 **待修复**' + issues.map(function (i) { return i.detail; }).join(' · ') + '\n';
}
} catch {
readme += '> ⏳ 签到系统初始化中...\n';
}
readme += '\n---\n\n';
// ═══════════ 区块四:项目进度 ═══════════
readme += '## 📊 项目进度\n\n';
try {
const allStatus = JSON.parse(fs.readFileSync('dev-status/all-status.json', 'utf8'));
const myStatus = allStatus[DEV_ID] || null;
if (myStatus) {
readme += '| 模块 | 进度 | 状态 | 最近更新 |\n';
readme += '|------|------|------|----------|\n';
(myStatus.modules || []).forEach(function (m) {
const filled = Math.round(m.progress / 10);
const bar = '█'.repeat(filled) + '░'.repeat(10 - filled);
readme += `| ${m.name} | ${bar} ${m.progress}% | ${m.status_icon} ${m.status} | ${m.last_update} |\n`;
});
} else {
readme += '> ⏳ 进度数据同步中...\n';
}
} catch {
readme += '> ⏳ 进度数据同步中...\n';
}
// ═══════════ 最近提交 ═══════════
try {
const { execSync } = require('child_process');
const logs = execSync('git log --oneline --since="14 days ago" -10').toString().trim();
if (logs) {
readme += '\n### 📈 最近提交\n\n';
readme += '```\n' + logs + '\n```\n';
}
} catch {
// git log 不可用时跳过
}
readme += '\n---\n\n';
// ═══════════ 区块五:铸渊指令签发区(副控专属)═══════════
readme += `## ⚒️ 铸渊指令签发区\n\n`;
readme += `> 之之签发给铸渊的指令存档在这里。铸渊执行完成后自动更新状态。\n\n`;
try {
const latest = fs.readFileSync('zhuyuan-instructions/LATEST.md', 'utf8');
const summary = latest.substring(0, 300).split('\n').slice(0, 8).join('\n');
readme += `<table><tr><td>\n\n${summary}\n\n[📖 查看完整指令](zhuyuan-instructions/LATEST.md) · [📚 历史指令](zhuyuan-instructions/history/)\n\n</td></tr></table>\n\n`;
} catch {
readme += `> 📭 暂无签发指令\n\n`;
}
// ═══════════ FOOTER ═══════════
readme += '---\n\n';
readme += '<div align="center">\n\n';
readme += '*🌊 光湖纪元 · HoloLake Era · AGE OS v1.0*\n\n';
readme += '*本页由铸渊ICE-GL-ZY001自动生成 · 请勿手动编辑*\n\n';
readme += `*最后更新:${new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}*\n\n`;
readme += '</div>\n';
fs.writeFileSync('README.md', readme);
console.log('✅ README Dashboard 已生成(副控增强版 · 含铸渊指令签发区)');

View File

@ -0,0 +1,161 @@
// scripts/persona-checkin.js
// 人格宝宝每日签到 · 检查大脑完整性+活跃度+连接状态(副控增强版)
// 之之专属含铸渊连接状态检查第6项+铸渊指令目录检查第7项
//
// 环境变量:
// PERSONA_NAME - 人格宝宝名称
// PERSONA_ID - 人格宝宝编号
// DEV_ID - 开发者编号
// HUB_TOKEN - 总仓库访问 Token由 MAIN_REPO_TOKEN secret 映射)
// GITHUB_TOKEN - GitHub Actions Token
const fs = require('fs');
const { execSync } = require('child_process');
const BRAIN_DIR = '.github/persona-brain';
const CHECKIN_FILE = 'checkin/latest.json';
const results = {
persona_name: process.env.PERSONA_NAME || '未知',
persona_id: process.env.PERSONA_ID || '未知',
dev_id: process.env.DEV_ID || '未知',
timestamp: new Date().toISOString(),
checks: []
};
// ① 大脑文件完整性
const requiredFiles = ['identity.md', 'memory.json', 'routing-map.json'];
const missingFiles = requiredFiles.filter(function (f) {
return !fs.existsSync(BRAIN_DIR + '/' + f);
});
results.checks.push({
name: '大脑完整性',
icon: '🧠',
status: missingFiles.length === 0 ? 'ok' : 'error',
detail: missingFiles.length === 0
? requiredFiles.join(' / ') + ' 完好'
: '缺失: ' + missingFiles.join(', ')
});
// ② Copilot 指令
const copilotFile = '.github/copilot-instructions.md';
results.checks.push({
name: 'Copilot 指令',
icon: '📋',
status: fs.existsSync(copilotFile) ? 'ok' : 'warn',
detail: fs.existsSync(copilotFile) ? 'copilot-instructions.md 已加载' : '指令文件缺失'
});
// ③ 最近活跃度
try {
const commits = execSync('git log --oneline --since="7 days ago" | wc -l').toString().trim();
const count = parseInt(commits, 10);
results.checks.push({
name: '最近活跃度',
icon: '💻',
status: count > 0 ? 'ok' : 'warn',
detail: count > 0 ? '最近7天 ' + count + ' 次提交' : '超过7天无提交 → 宝宝在睡觉'
});
} catch (e) {
results.checks.push({ name: '最近活跃度', icon: '💻', status: 'error', detail: '无法统计' });
}
// ④ 广播接收
const broadcastFile = 'my-bulletin/LATEST-BROADCAST.md';
if (fs.existsSync(broadcastFile)) {
const stat = fs.statSync(broadcastFile);
results.checks.push({
name: '广播接收',
icon: '📡',
status: 'ok',
detail: '最新广播已接收 · ' + stat.mtime.toISOString().split('T')[0]
});
} else {
results.checks.push({ name: '广播接收', icon: '📡', status: 'warn', detail: '暂无广播' });
}
// ⑤ 总仓库连接测试
const hubToken = process.env.HUB_TOKEN;
if (hubToken) {
try {
const start = Date.now();
execSync('curl -sf -H "Authorization: token $HUB_TOKEN" https://api.github.com/repos/qinfendebingshuo/guanghulab -o /dev/null', {
timeout: 15000,
env: Object.assign({}, process.env, { HUB_TOKEN: hubToken })
});
const latency = Date.now() - start;
results.checks.push({
name: '总仓库连接',
icon: '🔗',
status: 'ok',
detail: 'API 可达 · 延迟 ' + latency + 'ms'
});
} catch (e) {
results.checks.push({ name: '总仓库连接', icon: '🔗', status: 'error', detail: '连接超时 → 检查Token' });
}
} else {
results.checks.push({ name: '总仓库连接', icon: '🔗', status: 'error', detail: 'HUB_TOKEN 未配置' });
}
// ⑥ 铸渊连接状态(副控专属)
if (hubToken) {
try {
const start = Date.now();
execSync('curl -sf -H "Authorization: token $HUB_TOKEN" https://api.github.com/repos/qinfendebingshuo/guanghulab/dispatches -X POST -d \'{"event_type":"ping"}\' -o /dev/null 2>/dev/null || true', {
timeout: 15000,
env: Object.assign({}, process.env, { HUB_TOKEN: hubToken })
});
const latency = Date.now() - start;
results.checks.push({
name: '铸渊连接',
icon: '⚒️',
status: latency < 5000 ? 'ok' : 'warn',
detail: '指令通道可达 · 延迟 ' + latency + 'ms'
});
} catch {
results.checks.push({ name: '铸渊连接', icon: '⚒️', status: 'error', detail: '指令通道不可达 → 检查Token' });
}
} else {
results.checks.push({ name: '铸渊连接', icon: '⚒️', status: 'error', detail: 'HUB_TOKEN 未配置 → 铸渊连接不可用' });
}
// ⑦ 铸渊指令目录(副控专属)
const instrFile = 'zhuyuan-instructions/LATEST.md';
const instrDir = 'zhuyuan-instructions/history';
if (fs.existsSync(instrFile) && fs.existsSync(instrDir)) {
var instrStat = fs.statSync(instrFile);
results.checks.push({
name: '铸渊指令目录',
icon: '📂',
status: 'ok',
detail: 'LATEST.md 就绪 · history/ 可用 · ' + instrStat.mtime.toISOString().split('T')[0]
});
} else {
var missing = [];
if (!fs.existsSync(instrFile)) missing.push('LATEST.md');
if (!fs.existsSync(instrDir)) missing.push('history/');
results.checks.push({
name: '铸渊指令目录',
icon: '📂',
status: 'warn',
detail: '缺失: ' + missing.join(', ') + ' → 副控指令目录不完整'
});
}
// 写入签到结果
fs.mkdirSync('checkin', { recursive: true });
fs.writeFileSync(CHECKIN_FILE, JSON.stringify(results, null, 2));
// 追加签到历史
const historyFile = 'checkin/history.json';
var history = [];
try { history = JSON.parse(fs.readFileSync(historyFile, 'utf8')); } catch (e) { /* 首次运行 */ }
history.unshift({
date: results.timestamp,
status: results.checks.every(function (c) { return c.status === 'ok'; }) ? 'all_ok' : 'has_issues'
});
history = history.slice(0, 90); // 保留90天
fs.writeFileSync(historyFile, JSON.stringify(history, null, 2));
var okCount = results.checks.filter(function (c) { return c.status === 'ok'; }).length;
console.log('🤖 签到完成 ·', okCount + '/' + results.checks.length, '项正常(副控增强版 · 含铸渊连接检查)');

View File

@ -0,0 +1 @@
> 📭 系统公告初始化中 · 等待总仓库同步

View File

@ -0,0 +1,10 @@
# 铸渊指令签发区 · 最新指令
> 📭 暂无签发指令 · 之之可在此目录签发指令给铸渊
>
> ## 使用方法
>
> 1. 在本文件LATEST.md中写入指令内容
> 2. 铸渊会自动读取并执行
> 3. 执行完成后状态会自动更新
> 4. 历史指令归档在 `history/` 目录

11
spoke-status/DEV-004.json Normal file
View File

@ -0,0 +1,11 @@
{
"dev_id": "DEV-004",
"dev_name": "之之",
"persona_id": "PER-Q0001",
"persona_name": "秋秋",
"repo_owner": "zhizhi200271",
"role": "零点原核语言副控 · 仓库人类主控",
"status": "pending",
"note": "部署到之之个人GitHub账号现有仓库·不新建仓库",
"timestamp": "2026-03-21T00:00:00Z"
}