Commit Graph

37 Commits

Author SHA1 Message Date
wangsenhao a09d4afacd fix: pipeline排序/runDic映射/label-master repeatable/达标优先级
- pipeline items 按 first_ts 自然时间排序,去掉 hardcoded section_order
- augment step-detail 去掉 R{n-1} 偏移,直接用本轮 runDic(与 resolve_run_ids.sh 实际行为对齐)
- 加 BundledSkill.repeatable 字段,label-master 标记 repeatable:true 跳过 duplicate detection
- SKILL.md/program.md: 目标集≥95%最高优先级,未达标前其他集合轻微下降不回滚
- SKILL.md/program.md: 禁止正则脚本替代 label-master 语义复核
- program.md: 每轮 SFT 前必须展示训练数据组成
- resolve_run_ids.sh: 修正注释(SFT_RUNDIC = 当轮 eval workflow id)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:10:32 +08:00
hupenglong1 f068311cac backend/frontend/runtime: 训练面板 / session 隔离 / agent runtime 调整
- backend/api/server.py:训练 step-detail / pipeline 卡片排序逻辑
- frontend:thread-list / thread / training-pipeline-panel / step-detail-sheet 配套调整,新增 metrics-chart-panel
- src/agent_*:tool spec / runtime / prompting 配套
- .gitignore 加 .logs/

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 11:43:10 +08:00
wuyang6 0eb57f3f42 Isolate plan and task runtime per session 2026-05-13 20:07:09 +08:00
wuyang6 9984d35d1f Prefer python exec for complex file writes 2026-05-13 16:35:17 +08:00
wuyang6 8a93319f1b Fix ask-user review pause in web runs 2026-05-13 11:11:40 +08:00
wuyang6 126f35ae46 Improve file writing and activity replay 2026-05-12 20:48:25 +08:00
wuyang6 64787498dd Improve write_file fallback handling 2026-05-12 19:52:41 +08:00
wuyang6 413a37b32c Stream model events to activity panel 2026-05-11 21:24:32 +08:00
wuyang6 4c29ce21f1 Make product-data generation resumable 2026-05-11 20:13:08 +08:00
wuyang6 41eb36a704 Avoid draft files in product-data generation 2026-05-11 19:56:29 +08:00
wuyang6 0e2a00990f Stabilize product data export flow 2026-05-11 11:46:09 +08:00
武阳 9e94648ae6 Stop repeated duplicate skill loops 2026-05-08 10:40:01 +08:00
武阳 de6bb12ae5 Guard skill and continuation loops 2026-05-07 20:26:59 +08:00
武阳 d57570e527 Persist active run event history 2026-05-07 17:40:46 +08:00
武阳 9d7d496443 Add session scoped runs and cancellation 2026-05-07 16:26:20 +08:00
武阳 1aafc0fce7 Improve data skill routing and tool organization 2026-05-06 21:46:09 +08:00
武阳 9ca675be0d Improve WebUI streaming and Python tooling 2026-05-06 20:37:17 +08:00
武阳 7d4ae3e7ba Add assistant-ui data agent frontend 2026-05-06 16:18:32 +08:00
武阳 97bf5b9a54 Show data agent review summaries in sessions 2026-04-30 15:11:46 +08:00
武阳 c1951d6e4d Pause data generation for human review 2026-04-29 19:31:29 +08:00
武阳 a040d80096 Add directory-based project skills 2026-04-28 10:17:23 +08:00
Abdelrahman Abdallah cfd3bb9ca7 Implemented the next missing parity slice around clearing session env vars on /clear.
Wires clear_session_env_vars() into LocalCodingAgent.clear_runtime_state so the
/clear slash command now drops session-scoped env vars alongside the rest of the
ephemeral runtime state, matching commands/clear/caches.ts:127.
2026-04-20 00:52:28 +02:00
Abdelrahman Abdallah 872f4f89b5 Implemented the next missing parity slice around agent configurations. 2026-04-17 05:15:17 +02:00
Abdelrahman Abdallah 02674ba594 Implemented the next missing parity slice around agent configurations. 2026-04-17 05:03:19 +02:00
Abdelrahman Elsayed Mahmoud Abdallah 17e0da9b5b update agnt 2026-04-15 03:31:08 +02:00
Abdelrahman Elsayed Mahmoud Abdallah a4aaf814d7 Here's a summary of all the features I ported from the TypeScript source to Python: 2026-04-15 02:29:22 +02:00
Abdelrahman Abdallah b5e5824a56 Implemented the next parity slice: prompt-budget preflight and context collapse.
Core changes:

  - Added claw-code/src/token_budget.py for projected prompt size, chat-framing overhead, output reserve, and soft/hard input limits.
  - Wired preflight prompt-length validation and auto-compact/context collapse into claw-code/src/agent_runtime.py.
  - Extended claw-code/src/compact.py so compaction reports usage back to the runtime.
  - Added inspection surfaces in claw-code/src/agent_slash_commands.py and claw-code/src/main.py:
      - /token-budget and /budget
      - token-budget
  - Hardened claw-code/src/tokenizer_runtime.py so arbitrary simple model names fall back cleanly instead of trying a slow Transformers
    lookup.
  - Exported the new helpers in claw-code/src/__init__.py.

  Docs and tracking:

  - Updated claw-code/PARITY_CHECKLIST.md to mark prompt-length validation, token-budget calculation, and auto-compact/context collapse as
    done.
  - Updated claw-code/README.md and claw-code/TESTING_GUIDE.md with the new commands and behavior.

  Tests:

  - Added claw-code/tests/test_token_budget.py.
  - Updated claw-code/tests/test_agent_runtime.py, claw-code/tests/test_agent_slash_commands.py, claw-code/tests/test_main.py, and claw-code/
    tests/test_agent_context_usage.py.
  - Verified with:
      - /data/fs201059/aa17626/miniconda3/bin/python3 -m compileall src tests
      - /data/fs201059/aa17626/miniconda3/bin/python3 -m unittest -v tests.test_token_budget
        tests.test_agent_runtime.AgentRuntimeTests.test_agent_rejects_prompt_before_backend_when_preflight_input_budget_is_exceeded
        tests.test_agent_runtime.AgentRuntimeTests.test_agent_auto_compacts_context_before_next_model_call tests.test_agent_slash_commands
        tests.test_main tests.test_compact tests.test_tokenizer_runtime tests.test_agent_context_usage
      - Result: 71 tests, OK
2026-04-11 01:38:19 +02:00
Abdelrahman Abdallah aacf0a212a Created src/prompt_constants.py (550+ lines) porting all constants from npm src/constants/:
┌──────────────────┬───────────────────────────┬───────────────────────────────────────────────┐
│ Category         │ npm Source                │ Items                                         │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Product metadata │ product.ts                │ URLs, base URLs                               │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ System prefixes  │ system.ts                 │ 3 prompt prefixes                             │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Cyber risk       │ cyberRiskInstruction.ts   │ Safety instruction                            │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ API limits       │ apiLimits.ts              │ 10 image/PDF/media limits                     │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Tool limits      │ toolLimits.ts             │ 6 result size constants                       │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Spinner verbs    │ spinnerVerbs.ts           │ 187 whimsical gerunds                         │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Completion verbs │ turnCompletionVerbs.ts    │ 8 past-tense verbs                            │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Figures/symbols  │ figures.ts                │ 25 Unicode UI symbols                         │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ XML tags         │ xml.ts                    │ 30+ tag constants                             │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Messages         │ messages.ts               │ NO_CONTENT_MESSAGE                            │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Date utilities   │ common.ts                 │ 4 functions                                   │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Section caching  │ systemPromptSections.ts   │ Memoized/volatile sections                    │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Output styles    │ outputStyles.ts           │ 3 built-in configs                            │
├──────────────────┼───────────────────────────┼───────────────────────────────────────────────┤
│ Prompt helpers   │ prompts.ts                │ Knowledge cutoff, language, scratchpad, hooks │
└──────────────────┴───────────────────────────┴───────────────────────────────────────────────┘

91 new tests in tests/test_prompt_constants.py. All 17 SQL todos done.
2026-04-08 00:02:53 +02:00
Abdelrahman Abdallah c17c2768eb Implemented the next parity slice.
New runtime/code:

  - src/ask_user_runtime.py
  - src/team_runtime.py

  New real tools in src/agent_tools.py:

  - ask_user_question
  - team_create
  - team_delete
  - team_list
  - team_get
  - send_message
  - team_messages
  - notebook_edit
2026-04-07 03:48:20 +02:00
Abdelrahman Abdallah a5629295ac Implemented the next parity slice.
New runtime/code:

  - src/ask_user_runtime.py
  - src/team_runtime.py

  New real tools in src/agent_tools.py:

  - ask_user_question
  - team_create
  - team_delete
  - team_list
  - team_get
  - send_message
  - team_messages
  - notebook_edit
2026-04-07 02:51:30 +02:00
Abdelrahman Abdallah 783145fe6a add mcp and online search 2026-04-05 02:35:49 +02:00
Abdelrahman Abdallah 3f31cee395 add claw-code-agent/src/plan_runtime.py and claw-code-agent/src/background_runtime.py. The agent now has a real
persistent plan runtime with update_plan, plan_get, and plan_clear, plus plan-to-task sync wired through claw-code-agent/src/
  agent_tools.py, claw-code-agent/src/agent_runtime.py, claw-code-agent/src/agent_context.py, claw-code-agent/src/agent_prompting.py, and claw-code-agent/src/
  agent_slash_commands.py. New local plan slash commands are /plan and /planner.
2026-04-03 18:31:25 +02:00
Abdelrahman Abdallah 4de3da10e4 add test guide cases 2026-04-03 16:50:19 +02:00
Abdelrahman Abdallah 5ad10c660c add File-history snapshot ids and replay summaries for file edits 2026-04-02 22:19:32 +02:00
Abdelrahman Abdallah 9d90d6a10a add ىثص ؤخقث شلثىف قعىفهةث 2026-04-02 22:08:24 +02:00
Abdelrahman Abdallah 2c6763eb08 add new agent components 2026-04-02 21:12:48 +02:00
Abdelrahman Abdallah 27aff5611b first commit 2026-04-01 21:51:49 +02:00