• Layer 1 (P0): Per-agent session mutex
    - heartbeat-service.js: skip heartbeat if previous session still active (30min safety valve)
    - agent-chat.js: reject concurrent /chat requests for same agentId with different convId (429)
      Multi-turn conversations on same convId still work normally
    
    Layer 2 (P1): Advisory file lock utility
    - server/utils/file-lock.js: O_EXCL-based .lock file mechanism
      Auto-cleanup stale locks, graceful degradation on timeout
    
    Root cause: HeartbeatService creates new convId per heartbeat, spawning
    independent Claude CLI processes that concurrently write config.json and
    SKILL.md, causing rollbacks and FRAUDULENT scores.
    yibo authored
     
    Browse Dir »










  • 1. 根治所有模板 Agent残留的过往公司(LemonV)私人记忆,使其诞生即为全新白纸状态。
    2. 提取出统一的 `methodology.md` 基类 Prompt,通过 `agent-chat.js` 强力注入。
    3. 从 Master 到各路 Agent 都将强制遵循【从大脑到小脑】的不硬编码理念。
    4. 全面引入统一的基础方法论(Harness):学习(Research) -> 规划(Planning) -> 执行(Execute) -> 验证(Verify)
    yibo authored
     
    Browse Dir »
  • 修复 Claude CLI 遇到严重 API 错误 (如 Http 429) 时,输出的不是合法 JSON,而是像
    'MiniMax 检查失败: HTTP 429: {...}' 这样的纯文本行。
    旧版本在 JSON.parse 失败后直接忽略。
    新版本增加 fallback,匹配非 JSON 行中的错误关键字并强制中断死等和前端展示。
    yibo authored
     
    Browse Dir »
  • - 当底层模型 (MiniMax等) 抛出 API 错误时,Claude CLI 不会崩溃也不会输出 stderr,而是通过 stdout 输出 event.type='error' 的 JSON 块。
    - 未处理该事件导致协议层无法等到 result 事件,引发 Promise 永久挂起。
    - 修复:在_handleStreamEvent 拦截 error 块,主动抛出错误打断等待链,前端即可正常展示 ❌ API 请求失败。
    yibo authored
     
    Browse Dir »
  • - ClaudeCliProtocol: stderr 检测 rate_limit/429/401 等致命错误时自动 reject sendPrompt Promise
    - agent-chat.js: 监听 stderr/disconnected 事件并通过 SSE 推送到前端
    - AgentChat.vue: error 事件停止 thinking 状态 + ACP 日志面板显示错误
    yibo authored
     
    Browse Dir »
  • - System agents: 只保留 master (data/system/agents/master)
    - Templates: 所有可复用 agent 模板 (data/system/templates/)
    - Companies: 公司创建时自动部署 5 个元 Agent (innovator/hunter/digester/evolver/agent-creator)
    
    路径修复:
    - agent-chat.js: /list 扫描路径修正 (system/agents + companies/*/agents)
    - agent-manager.js: 动态 agent 查找路径修正
    - skill-config-loader.js: 修正 agents root
    - pipeline-service.js: pipelines 输出到 companies/{id}/pipelines/
    - billing.log: 移至 companies/{id}/logs/ 下
    
    Skills 标准化:
    - 所有 template agent 建立 .claude/skills/main_skill/SKILL.md
    - company-service._copyTemplate() 新增 .claude/ 目录复制
    - innovator SKILL.md v3.0: 移除旧 l3-hunt/l2-digest 命名
    - 清理重复 agent_creator, 统一为 agent-creator
    
    清理:
    - 移除 data/agents, data/workspace, data/logs, data/goals 旧目录
    - 清除所有未使用的 DATA_DIR 声明
    - 清除 template 中的 conversations/logs/memory 运行态数据
    yibo authored
     
    Browse Dir »
  • - Add task transition CLI and API for Context Flush & Hot Swap
    - Enforce strict bash-only tool policy for Base Agents
    - Inject  into system prompt for self-retrying loop
    - Implement Goal node updates on transitions
    - Add P0 Execute pre-approval block (Human-in-the-loop)
    - Track token metrics to billing.log
    yibo authored
     
    Browse Dir »

  • yibo authored
     
    Browse Dir »
  • 核心改动:
    1. agent-chat.js buildSystemPrompt 新增 Layer 0: 为公司Agent自动注入
       公司环境上下文(companyId、roleName、公司共享工作区路径)
       明确禁止写入全局 workspace/ 或 data/workspace/
    2. CEO 模板更新: workspace/ 引用改为"公司共享工作区"
    3. 清理旧的 workspace/ 和 data/workspace/ 下的废弃公司目录
    yibo authored
     
    Browse Dir »
  • Phase A - Company Bootstrap 自举:
    - 新增 _company_bootstrap/manifest.json 模板
    - company create 时自动部署 CEO/CTO/COO/HR 四名核心骨干
    - 自动启动公司 + 2s后向CEO dispatch战略启动令
    - 支持 skipBootstrap 参数跳过自举
    
    Phase B - HR 大一统 (招留管退):
    - 新增 hr 模板(agent_creator 的进化体)
    - HR 具备完整生命周期管理:招聘/技能装配/监控/辞退
    - HR 具备模板发现能力(lemon company templates 查看可用模板如 scrapling_crawler)
    - CTO 模板重写:不再亲自 hire,全部通过 task dispatch 向 HR 下发招聘需求单
    - CEO 模板更新:确认 Bootstrap 已部署骨干,委派时强调 CTO→HR 招聘链
    - 新增 POST /company/:id/fire API(停心跳→归档→更新名单)
    - 新增 CLI: lemon company fire / lemon company templates
    yibo authored
     
    Browse Dir »
  • - Added async orchestration in `/company/:id/hire` when no template is found.
    - Triggers Agent-Creator to write definition files based on scaffold.
    - Searches Arena (skillDb) for 3 basic skills matching the role and injects them.
    - Dispatches Innovator to run FDE pipeline and evaluate initial capabilities.
    Yi Bo authored
     
    Browse Dir »