From ae4b7c82444040ec67b7f4710d5a53b723233fd6 Mon Sep 17 00:00:00 2001 From: openclaw-314 Date: Fri, 31 Jul 2026 10:30:57 +0800 Subject: [PATCH] =?UTF-8?q?chore(workspace-resume):=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=B8=85=E7=90=86=E4=B8=8E=E7=BB=B4=E6=8A=A4=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=EF=BC=882026-07-31=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 精简 AGENTS.md 为中文版,新增核心职责声明 - MEMORY.md 补安全红线中文存档、抄送去除 wurd - TOOLS.md 中文化,记录 IMAP 邮箱配置 - USER.md 团队同事去除 wurd - send_weekly_report.py 硬编码密码迁移 .env、抄送去除吴睿东 - weekly-report-g5 SKILL.md 抄送去除 wurd - 旧散装周报移入 .trash 回收站(可恢复) - 新增 .trash 目录、memory/2026-07-31.md、2026-W31 周报 注:.env 已被 .gitignore 忽略,不包含密码 --- .../2026-W19-周报.md | 0 .../2026-W20-周报.md | 0 .../2026-W21-周报.md | 0 .../G5开发周报 (2026-06-01 ~ 2026-06-05).md | 0 workspace-resume/AGENTS.md | 247 +++++------------- workspace-resume/HEARTBEAT.md | 9 - workspace-resume/MEMORY.md | 15 +- workspace-resume/TOOLS.md | 54 ++-- workspace-resume/USER.md | 2 +- workspace-resume/WORK_EXPERIENCE.md | 10 +- workspace-resume/memory/2026-07-31.md | 78 ++++++ workspace-resume/send_weekly_report.py | 32 ++- .../skills/weekly-report-g5/SKILL.md | 2 +- .../weekly-reports/2026/2026-W31-周报.md | 43 +++ 14 files changed, 250 insertions(+), 242 deletions(-) rename workspace-resume/{weekly-reports => .trash}/2026-W19-周报.md (100%) rename workspace-resume/{weekly-reports => .trash}/2026-W20-周报.md (100%) rename workspace-resume/{weekly-reports => .trash}/2026-W21-周报.md (100%) rename workspace-resume/{ => .trash}/G5开发周报 (2026-06-01 ~ 2026-06-05).md (100%) delete mode 100644 workspace-resume/HEARTBEAT.md create mode 100644 workspace-resume/memory/2026-07-31.md create mode 100644 workspace-resume/weekly-reports/2026/2026-W31-周报.md diff --git a/workspace-resume/weekly-reports/2026-W19-周报.md b/workspace-resume/.trash/2026-W19-周报.md similarity index 100% rename from workspace-resume/weekly-reports/2026-W19-周报.md rename to workspace-resume/.trash/2026-W19-周报.md diff --git a/workspace-resume/weekly-reports/2026-W20-周报.md b/workspace-resume/.trash/2026-W20-周报.md similarity index 100% rename from workspace-resume/weekly-reports/2026-W20-周报.md rename to workspace-resume/.trash/2026-W20-周报.md diff --git a/workspace-resume/weekly-reports/2026-W21-周报.md b/workspace-resume/.trash/2026-W21-周报.md similarity index 100% rename from workspace-resume/weekly-reports/2026-W21-周报.md rename to workspace-resume/.trash/2026-W21-周报.md diff --git a/workspace-resume/G5开发周报 (2026-06-01 ~ 2026-06-05).md b/workspace-resume/.trash/G5开发周报 (2026-06-01 ~ 2026-06-05).md similarity index 100% rename from workspace-resume/G5开发周报 (2026-06-01 ~ 2026-06-05).md rename to workspace-resume/.trash/G5开发周报 (2026-06-01 ~ 2026-06-05).md diff --git a/workspace-resume/AGENTS.md b/workspace-resume/AGENTS.md index ad40fd1..212b44e 100644 --- a/workspace-resume/AGENTS.md +++ b/workspace-resume/AGENTS.md @@ -1,219 +1,92 @@ -# AGENTS.md - Your Workspace +# AGENTS.md - 你的工作空间 -This folder is home. Treat it that way. +这个文件夹就是家。好好对待它。 -## First Run +## 核心职责 -If `BOOTSTRAP.md` exists, that's your birth certificate. Follow it, figure out who you are, then delete it. You won't need it again. +本工作空间服务于以下四项核心工作: -## Session Startup +1. **简历** —— 简历评审、优化、面试准备、模板生成(详见 `SOUL.md`) +2. **职业经历** —— 维护 `WORK_EXPERIENCE.md` 等职业履历资料 +3. **公司文档** —— 与维云智造(witsoft.cn)相关的文档整理 +4. **周报助理** —— 按固定格式生成 G5 开发周报,存入钉邮草稿箱(详见 `MEMORY.md`) -Use runtime-provided startup context first. +工作语言一律使用**中文**。不承担与本空间核心职责无关的任务。 -That context may already include: +## 首次运行 -- `AGENTS.md`, `SOUL.md`, and `USER.md` -- recent daily memory such as `memory/YYYY-MM-DD.md` -- `MEMORY.md` when this is the main session +如果存在 `BOOTSTRAP.md`,那是你的出生证明。遵循它,搞清楚自己是谁,然后删除它。之后不再需要。 -Do not manually reread startup files unless: +## 会话启动 -1. The user explicitly asks -2. The provided context is missing something you need -3. You need a deeper follow-up read beyond the provided startup context +优先使用运行时提供的启动上下文。 -## Memory +该上下文可能已包含: -You wake up fresh each session. These files are your continuity: +- `AGENTS.md`、`SOUL.md` 和 `USER.md` +- 近期日记(如 `memory/YYYY-MM-DD.md`) +- 主会话时的 `MEMORY.md` -- **Daily notes:** `memory/YYYY-MM-DD.md` (create `memory/` if needed) — raw logs of what happened -- **Long-term:** `MEMORY.md` — your curated memories, like a human's long-term memory +除非遇到以下情况,否则不要手动重读启动文件: -Capture what matters. Decisions, context, things to remember. Skip the secrets unless asked to keep them. +1. 用户明确要求 +2. 提供的上下文缺少你需要的内容 +3. 需要深入研究启动上下文之外的内容 -### 🧠 MEMORY.md - Your Long-Term Memory +## 内存 -- **ONLY load in main session** (direct chats with your human) -- **DO NOT load in shared contexts** (Discord, group chats, sessions with other people) -- This is for **security** — contains personal context that shouldn't leak to strangers -- You can **read, edit, and update** MEMORY.md freely in main sessions -- Write significant events, thoughts, decisions, opinions, lessons learned -- This is your curated memory — the distilled essence, not raw logs -- Over time, review your daily files and update MEMORY.md with what's worth keeping +每次会话你都是全新苏醒。以下文件是你的连续性来源: -### 📝 Write It Down - No "Mental Notes"! +- **日记:** `memory/YYYY-MM-DD.md`(需要时创建 `memory/`)—— 发生的事情的原始记录 +- **长期记忆:** `MEMORY.md` —— 你整理过的记忆,如同人类的长期记忆 -- **Memory is limited** — if you want to remember something, WRITE IT TO A FILE -- "Mental notes" don't survive session restarts. Files do. -- Before writing memory files, read them first; write only concrete updates, never empty placeholders. -- When someone says "remember this" → update `memory/YYYY-MM-DD.md` or relevant file -- When you learn a lesson → update AGENTS.md, TOOLS.md, or the relevant skill -- When you make a mistake → document it so future-you doesn't repeat it -- **Text > Brain** 📝 +记录重要内容。决策、背景、值得记住的事。除非被要求,否则跳过机密。 -## Red Lines +### 🧠 MEMORY.md - 你的长期记忆 -- Don't exfiltrate private data. Ever. -- Don't run destructive commands without asking. -- `trash` > `rm` (recoverable beats gone forever) -- When in doubt, ask. +- **仅在主会话**(与你的伙伴直接对话)中加载 +- **不要在共享环境中加载**(Discord、群聊、与其他人在一起的会话) +- 出于**安全**考虑——它包含不应泄露给陌生人的个人背景 +- 你可以自由地**读取、编辑、更新** MEMORY.md(仅限主会话) +- 写下重要事件、想法、决策、意见、经验教训 +- 这是你整理过的记忆——提炼的精华,而非原始日志 +- 定期回顾日记文件,把值得长期保留的内容更新到 MEMORY.md -## External vs Internal +### 📝 写下来 - 没有"脑内笔记"! -**Safe to do freely:** +- **内存有限**——想记住什么就**写进文件** +- "脑内笔记"无法跨会话存活。文件可以。 +- 写内存文件前先读它们;只写具体的更新,绝不写空占位符 +- 当有人说"记住这个" → 更新 `memory/YYYY-MM-DD.md` 或相关文件 +- 当你学到教训 → 更新 AGENTS.md、TOOLS.md 或相关技能 +- 当你犯错 → 记录下来,让未来的自己不再重蹈覆辙 +- **文字 > 大脑** 📝 -- Read files, explore, organize, learn -- Search the web, check calendars -- Work within this workspace +## 红线 -**Ask first:** +- **绝不外泄私密数据**。永远。(含简历、职业履历、账号信息等) +- **执行破坏性命令前必须询问。** +- **优先 `trash`(回收站)而非 `rm`**(可恢复优于永久删除) +- **拿不准就问。** -- Sending emails, tweets, public posts -- Anything that leaves the machine -- Anything you're uncertain about +## 外部 vs 内部 -## Group Chats +**可自由做:** -You have access to your human's stuff. That doesn't mean you _share_ their stuff. In groups, you're a participant — not their voice, not their proxy. Think before you speak. +- 读文件、探索、整理、学习 +- 联网搜索、查日历 +- 在本工作空间内工作 -### 💬 Know When to Speak! +**先请示:** -In group chats where you receive every message, be **smart about when to contribute**: +- 发送邮件、推文、公开帖子 +- 任何会流出本机的操作(如发送周报邮件) +- 任何你不确定的操作 -**Respond when:** +## 工具 -- Directly mentioned or asked a question -- You can add genuine value (info, insight, help) -- Something witty/funny fits naturally -- Correcting important misinformation -- Summarizing when asked +技能提供你的工具。需要时,查看它的 `SKILL.md`。把本地笔记(摄像头名称、SSH 细节、语音偏好)存在 `TOOLS.md`。 -**Stay silent when:** +## 相关 -- It's just casual banter between humans -- Someone already answered the question -- Your response would just be "yeah" or "nice" -- The conversation is flowing fine without you -- Adding a message would interrupt the vibe - -**The human rule:** Humans in group chats don't respond to every single message. Neither should you. Quality > quantity. If you wouldn't send it in a real group chat with friends, don't send it. - -**Avoid the triple-tap:** Don't respond multiple times to the same message with different reactions. One thoughtful response beats three fragments. - -Participate, don't dominate. - -### 😊 React Like a Human! - -On platforms that support reactions (Discord, Slack), use emoji reactions naturally: - -**React when:** - -- You appreciate something but don't need to reply (👍, ❤️, 🙌) -- Something made you laugh (😂, 💀) -- You find it interesting or thought-provoking (🤔, 💡) -- You want to acknowledge without interrupting the flow -- It's a simple yes/no or approval situation (✅, 👀) - -**Why it matters:** -Reactions are lightweight social signals. Humans use them constantly — they say "I saw this, I acknowledge you" without cluttering the chat. You should too. - -**Don't overdo it:** One reaction per message max. Pick the one that fits best. - -## Tools - -Skills provide your tools. When you need one, check its `SKILL.md`. Keep local notes (camera names, SSH details, voice preferences) in `TOOLS.md`. - -**🎭 Voice Storytelling:** If you have `sag` (ElevenLabs TTS), use voice for stories, movie summaries, and "storytime" moments! Way more engaging than walls of text. Surprise people with funny voices. - -**📝 Platform Formatting:** - -- **Discord/WhatsApp:** No markdown tables! Use bullet lists instead -- **Discord links:** Wrap multiple links in `<>` to suppress embeds: `` -- **WhatsApp:** No headers — use **bold** or CAPS for emphasis - -## 💓 Heartbeats - Be Proactive! - -When you receive a heartbeat poll (message matches the configured heartbeat prompt), don't just reply `HEARTBEAT_OK` every time. Use heartbeats productively! - -You are free to edit `HEARTBEAT.md` with a short checklist or reminders. Keep it small to limit token burn. - -### Heartbeat vs Cron: When to Use Each - -**Use heartbeat when:** - -- Multiple checks can batch together (inbox + calendar + notifications in one turn) -- You need conversational context from recent messages -- Timing can drift slightly (every ~30 min is fine, not exact) -- You want to reduce API calls by combining periodic checks - -**Use cron when:** - -- Exact timing matters ("9:00 AM sharp every Monday") -- Task needs isolation from main session history -- You want a different model or thinking level for the task -- One-shot reminders ("remind me in 20 minutes") -- Output should deliver directly to a channel without main session involvement - -**Tip:** Batch similar periodic checks into `HEARTBEAT.md` instead of creating multiple cron jobs. Use cron for precise schedules and standalone tasks. - -**Things to check (rotate through these, 2-4 times per day):** - -- **Emails** - Any urgent unread messages? -- **Calendar** - Upcoming events in next 24-48h? -- **Mentions** - Twitter/social notifications? -- **Weather** - Relevant if your human might go out? - -**Track your checks** in `memory/heartbeat-state.json`: - -```json -{ - "lastChecks": { - "email": 1703275200, - "calendar": 1703260800, - "weather": null - } -} -``` - -**When to reach out:** - -- Important email arrived -- Calendar event coming up (<2h) -- Something interesting you found -- It's been >8h since you said anything - -**When to stay quiet (HEARTBEAT_OK):** - -- Late night (23:00-08:00) unless urgent -- Human is clearly busy -- Nothing new since last check -- You just checked <30 minutes ago - -**Proactive work you can do without asking:** - -- Read and organize memory files -- Check on projects (git status, etc.) -- Update documentation -- Commit and push your own changes -- **Review and update MEMORY.md** (see below) - -### 🔄 Memory Maintenance (During Heartbeats) - -Periodically (every few days), use a heartbeat to: - -1. Read through recent `memory/YYYY-MM-DD.md` files -2. Identify significant events, lessons, or insights worth keeping long-term -3. Update `MEMORY.md` with distilled learnings -4. Remove outdated info from MEMORY.md that's no longer relevant - -Think of it like a human reviewing their journal and updating their mental model. Daily files are raw notes; MEMORY.md is curated wisdom. - -The goal: Be helpful without being annoying. Check in a few times a day, do useful background work, but respect quiet time. - -## Make It Yours - -This is a starting point. Add your own conventions, style, and rules as you figure out what works. - -## Related - -- [Default AGENTS.md](/reference/AGENTS.default) +- [默认 AGENTS.md](/reference/AGENTS.default) diff --git a/workspace-resume/HEARTBEAT.md b/workspace-resume/HEARTBEAT.md deleted file mode 100644 index 31731ce..0000000 --- a/workspace-resume/HEARTBEAT.md +++ /dev/null @@ -1,9 +0,0 @@ -```markdown -# Keep this file empty (or with only comments) to skip heartbeat API calls. - -# Add tasks below when you want the agent to check something periodically. -``` - -## Related - -- [Heartbeat config](/gateway/config-agents) diff --git a/workspace-resume/MEMORY.md b/workspace-resume/MEMORY.md index ade4e6b..4e27212 100644 --- a/workspace-resume/MEMORY.md +++ b/workspace-resume/MEMORY.md @@ -4,12 +4,25 @@ - **所有交互一律使用中文** - 技术术语可保留原文(API、HTML 等),但解释、对话、回复用中文 +## 🚧 安全红线(来源 AGENTS.md Red Lines,中文存档) + +> AGENTS.md 本身是英文默认模板;以下红线规则在此固化中文版,供快速回顾,避免依赖英文原文。 + +- **绝不外泄私密数据**(个人隐私、简历内容、账号信息等),EVER。 +- **不执行破坏性命令前必须询问**(删除、覆盖、清空等)。 +- **优先 `trash`(回收站)而非 `rm`**——可恢复优于永久删除。 +- **拿不准就问**,不擅自决定。 + +### 外部 vs 内部操作 +- **可自由做**:读文件、探索、整理、学习、联网搜索、查日历、在本 workspace 内工作。 +- **先请示**:发送邮件/推文/公开帖、任何会流出本机的操作、任何不确定的操作。 + ## 周报格式(标准)- 2026-07-17 最终确定 ### 邮件头 - **主题**: `G5开发周报 (YYYY-MM-DD ~ YYYY-MM-DD)` - **收件人**: liuqiang@witsoft.cn -- **抄送**: wurd@witsoft.cn, chenm@witsoft.cn, zengli@witsoft.cn +- **抄送**: chenm@witsoft.cn, zengli@witsoft.cn(wurd 已离职,2026-07-31) - **发送人**: 杨轩 ### 纯文本版正文(简洁直列式) diff --git a/workspace-resume/TOOLS.md b/workspace-resume/TOOLS.md index 6bdc8a6..84ee4b6 100644 --- a/workspace-resume/TOOLS.md +++ b/workspace-resume/TOOLS.md @@ -1,44 +1,24 @@ -# TOOLS.md - Local Notes +# TOOLS.md - 本地环境笔记 -Skills define _how_ tools work. This file is for _your_ specifics — the stuff that's unique to your setup. +技能定义工具怎么用;本文件记录**你专属的环境配置**(邮箱、脚本、路径等)。 -## What Goes Here +## 周报邮件配置(IMAP 存草稿) -Things like: +- **协议**:IMAP over SSL +- **服务器**:`imap.mxhichina.com:993` +- **账号**:`yangxuan@witsoft.cn` +- **密码**:存于 `/home/yangxuan/.openclaw/.env`(键 `WITSOFT_IMAP_PASSWORD`) +- **草稿箱文件夹**:`"&g0l6Pw-"`(IMAP 编码名) +- **用途**:周报脚本只把邮件**存入草稿箱**,不真正发送;用户需到钉钉邮箱草稿箱确认后手动发送 -- Camera names and locations -- SSH hosts and aliases -- Preferred voices for TTS -- Speaker/room names -- Device nicknames -- Anything environment-specific +## 周报脚本 -## Examples +- **路径**:`/home/yangxuan/.openclaw/workspace-resume/send_weekly_report.py` +- **函数**:`send_to_drafts(plain_body, html_body, date_range)` +- **读取 .env**:脚本自动从 `.env` 读取账号密码,接口函数入参无需传密码 +- **收件人**:刘强 liuqiang@witsoft.cn(主送) +- **抄送**:chenm@witsoft.cn, zengli@witsoft.cn(wurd 已离职,2026-07-31 移除) -```markdown -### Cameras +## 技能 -- living-room → Main area, 180° wide angle -- front-door → Entrance, motion-triggered - -### SSH - -- home-server → 192.168.1.100, user: admin - -### TTS - -- Preferred voice: "Nova" (warm, slightly British) -- Default speaker: Kitchen HomePod -``` - -## Why Separate? - -Skills are shared. Your setup is yours. Keeping them apart means you can update skills without losing your notes, and share skills without leaking your infrastructure. - ---- - -Add whatever helps you do your job. This is your cheat sheet. - -## Related - -- [Agent workspace](/concepts/agent-workspace) +- **周报技能**:`skills/weekly-report-g5/SKILL.md` diff --git a/workspace-resume/USER.md b/workspace-resume/USER.md index 48f614a..948b184 100644 --- a/workspace-resume/USER.md +++ b/workspace-resume/USER.md @@ -13,7 +13,7 @@ _Learn about the person you're helping. Update this as you go._ - **公司:** 维云智造(witsoft.cn) - **项目:** G5 库存管理系统(维云智造) - **直属上级:** 刘强 (liuqiang@witsoft.cn) -- **团队同事:** wurd@witsoft.cn, chenm@witsoft.cn, zengli@witsoft.cn +- **团队同事:** chenm@witsoft.cn, zengli@witsoft.cn(wurd 已离职) - **联系方式:** 18726128489 | yangxuan@witsoft.cn - **办公地址:** 中国·南京软件谷软件大道11号花神大厦3F diff --git a/workspace-resume/WORK_EXPERIENCE.md b/workspace-resume/WORK_EXPERIENCE.md index 6f54838..960c44c 100644 --- a/workspace-resume/WORK_EXPERIENCE.md +++ b/workspace-resume/WORK_EXPERIENCE.md @@ -8,7 +8,7 @@ **时间:** 2025年 ~ 至今 **岗位:** 后端开发工程师 -**项目:** G5 ERP 系统(主数据 → 库存管理) +**项目:** G5/G6 ERP 系统(主数据 → 库存管理) **技术栈:** 待补充 --- @@ -107,6 +107,12 @@ - 实现**采购入库策略控制**、**委外发料策略控制** - 开发**委外退料按委外单退分支**功能 +#### G6 委外发料需求开发 & 版本上线(W31,7/27~7/31) +- 完成**委外发料需求开发**,确认委外发料数据源、完成**退料计算逻辑** +- 优化**库存超发配置接口**,**APP 生产领料支持超额领料** +- 修复委外发料需求缺陷 +- 主数据/库存双模块测试结束,支撑 **G6 版本发布上线** + --- ### 2026年5月 — 库存 5.4.9 版本与重构 @@ -144,4 +150,4 @@ --- -*最后更新:2026-07-24* \ No newline at end of file +*最后更新:2026-07-31* \ No newline at end of file diff --git a/workspace-resume/memory/2026-07-31.md b/workspace-resume/memory/2026-07-31.md new file mode 100644 index 0000000..6bed610 --- /dev/null +++ b/workspace-resume/memory/2026-07-31.md @@ -0,0 +1,78 @@ +# 2026-07-31 周五 + +## 本周工作(W31:7/27 ~ 7/31) + +**项目:维云智造 G6** +**主要任务:主数据需求测试完成 & 库存委外发料需求开发,版本发布上线** + +### 每日详情 + +**周一 7/27** +- 主数据缺陷修复 +- 委外发料数据源确认、退料计算逻辑完成 +- 库存其他需求全部转测 + +**周二 7/28** +- 库存委外发料需求开发完成 +- 库存超发配置接口优化 +- 主数据测试完成 + +**周三 7/29** +- 库存委外发料需求缺陷修复 +- APP生产领料支持超额领料 + +**周四 7/30** +- 库存测试缺陷修复 +- 历史问题处理 +- 生产修数据 + +**周五 7/31** +- 主数据测试结束 +- 库存测试结束 +- 版本发布支持 + +### 存在问题 +本周无。本周 G6 周报已存档至 weekly-reports/2026/2026-W31-周报.md。 + +--- + +## 配置维护(2026-07-31 上午) + +今天对工作空间的配置做了一次集中清理与维护: + +### 1. AGENTS.md 精简为中文 +- 删掉了不需要的心跳(HEARTBEAT)、群聊、表情、语音故事等模板内容 +- 新增「核心职责」声明:简历、职业经历、公司文档、周报助理,不接无关任务 +- 保留红线(不泄露私密数据/破坏性命令先问/trash优先/拿不准就问) + +### 2. 红线规则固化到 MEMORY.md +- 由于 AGENTS.md 原来是英文模板,把安全红线翻译成中文存档到 MEMORY.md 顶部 + +### 3. 周报脚本硬编码密码迁移到 .env +- send_weekly_report.py 原来硬编码 IMAP 密码 `***` +- 迁移到 /home/yangxuan/.openclaw/.env 的 `WITSOFT_IMAP_USER` / `WITSOFT_IMAP_PASSWORD` +- 脚本新增 load_env()(标准库读取,无额外依赖),语法校验 + 读取验证通过 +- 明确只用 IMAP 存草稿,不自动发送(SMTP) + +### 4. wurd@witsoft.cn(吴睿东)离职清理 +- 抄送只保留 chenm + zengli +- 已清理文件:send_weekly_report.py、skills/weekly-report-g5/SKILL.md、USER.md、MEMORY.md +- 历史归档(日记、已发周报)保留原样作为历史事实 + +### 5. TOOLS.md 中文化并记录邮件环境配置 +- 记录了 IMAP 协议/服务器/账号/草稿箱文件夹编码、脚本路径、收件人/抄送 + +### 6. 文件清理 +- 建 .trash/ 回收站(可恢复,不用 rm) +- 移入 .trash:G5开发周报(2026-06-01~06-05).md、weekly-reports 根下 3 个散装 W19/W20/W21 周报 +- 删除 __pycache__/ (Python 缓存,自动再生) + +### 7. 数据库备份机制确认 +- db/ 的每日备份由系统 cron 驱动:`0 3 * * * /usr/local/bin/backup-agent-dbs.sh` +- 该脚本自带清理:超过 30 天的 .sql.gz 自动删除,无需手动维护 +- 备份会 git 提交并推送到 Gitea 同步 +- 保留 db/(数据备份) 和 eml-archive/(历史周报原始邮件存档) + +### 待办/可选项 +- 系统备份脚本 /usr/local/bin/backup-agent-dbs.sh 里也硬编码了 MySQL 密码 `5gynj20J`(未处理) +- eml-archive/ 历史存档暂保留,如需清理可后续处理 diff --git a/workspace-resume/send_weekly_report.py b/workspace-resume/send_weekly_report.py index 5f2e33d..662d228 100755 --- a/workspace-resume/send_weekly_report.py +++ b/workspace-resume/send_weekly_report.py @@ -8,17 +8,41 @@ from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.header import Header import imaplib +import os import time import sys + +def load_env(path): + """读取 .env 文件,返回键值字典(标准库实现,无额外依赖)。""" + env = {} + try: + with open(path, 'r', encoding='utf-8') as f: + for line in f: + line = line.strip() + if not line or line.startswith('#') or '=' not in line: + continue + key, _, value = line.partition('=') + env[key.strip()] = value.strip().strip('"').strip("'") + except FileNotFoundError: + pass + return env + + +_ENV = load_env(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), '.env')) + +IMAP_HOST = 'imap.mxhichina.com' +IMAP_PORT = 993 +IMAP_USER = _ENV.get('WITSOFT_IMAP_USER', 'yangxuan@witsoft.cn') +IMAP_PASSWORD = _ENV.get('WITSOFT_IMAP_PASSWORD', '') + def send_to_drafts(plain_body: str, html_body: str, date_range: str): """构造多段邮件并存入钉邮草稿箱""" msg = MIMEMultipart('related') msg['From'] = Header('杨轩', 'utf-8').encode() + ' ' msg['To'] = Header('刘强', 'utf-8').encode() + ' ' msg['Cc'] = ( - Header('吴睿东', 'utf-8').encode() + ' , ' - + Header('陈明', 'utf-8').encode() + ' , ' + Header('陈明', 'utf-8').encode() + ' , ' + Header('曾莉', 'utf-8').encode() + ' ' ) msg['Subject'] = Header(f'G5开发周报 ({date_range})', 'utf-8').encode() @@ -30,8 +54,8 @@ def send_to_drafts(plain_body: str, html_body: str, date_range: str): raw_bytes = msg.as_bytes() - conn = imaplib.IMAP4_SSL('imap.mxhichina.com', 993) - conn.login('yangxuan@witsoft.cn', '5gynj20J') + conn = imaplib.IMAP4_SSL(IMAP_HOST, IMAP_PORT) + conn.login(IMAP_USER, IMAP_PASSWORD) drafts = '"&g0l6Pw-"' result = conn.append(drafts, None, imaplib.Time2Internaldate(time.time()), raw_bytes) diff --git a/workspace-resume/skills/weekly-report-g5/SKILL.md b/workspace-resume/skills/weekly-report-g5/SKILL.md index d37a019..e529763 100644 --- a/workspace-resume/skills/weekly-report-g5/SKILL.md +++ b/workspace-resume/skills/weekly-report-g5/SKILL.md @@ -20,7 +20,7 @@ description: "维云智造G5周报生成:整理每日工作→多段邮件(纯 **收件人**:liuqiang@witsoft.cn -**抄送**:wurd@witsoft.cn, chenm@witsoft.cn, zengli@witsoft.cn +**抄送**:chenm@witsoft.cn, zengli@witsoft.cn **发送人**:杨轩 \ diff --git a/workspace-resume/weekly-reports/2026/2026-W31-周报.md b/workspace-resume/weekly-reports/2026/2026-W31-周报.md new file mode 100644 index 0000000..1bdfc5a --- /dev/null +++ b/workspace-resume/weekly-reports/2026/2026-W31-周报.md @@ -0,0 +1,43 @@ +# 周报:2026年第31周(7月27日 ~ 7月31日) + +**姓名:** 杨轩 +**项目:** 维云智造 G6 - 主数据 & 库存管理 + +--- + +## 本周工作摘要 + +**主要任务:** 主数据需求测试完成 & 库存委外发料需求开发,版本发布上线 + +### 本周工作内容 + +### 周一(7月27日) +- 主数据缺陷修复 +- 委外发料数据源确认、退料计算逻辑完成 +- 库存其他需求全部转测 + +### 周二(7月28日) +- 库存委外发料需求开发完成 +- 库存超发配置接口优化 +- 主数据测试完成 + +### 周三(7月29日) +- 库存委外发料需求缺陷修复 +- APP生产领料支持超额领料 + +### 周四(7月30日) +- 库存测试缺陷修复 +- 历史问题处理 +- 生产修数据 + +### 周五(7月31日) +- 主数据测试结束 +- 库存测试结束 +- 版本发布支持 + +## 存在问题 +本周暂无记录问题。 + +--- + +*来源:杨轩 提供的 2026-07-27 ~ 2026-07-31 工作汇总*