Commit graph

172 commits

Author SHA1 Message Date
ringhyacinth
cf76f8556a
Revert "fix: resolve hardcoded paths, port mismatch, XSS, and UX issues" 2026-03-03 07:44:48 +08:00
ringhyacinth
474811083b
Merge pull request #9 from kckylechen1/fix/code-review-issues
fix: resolve hardcoded paths, port mismatch, XSS, and UX issues
Thanks — I reviewed PR #9 and the fixes look good to me (path portability, port consistency, and related stability issues).
I’m approving and merging this as our stability baseline.
After merge, we’ll run a quick smoke test in production.
2026-03-03 02:02:40 +08:00
Kyle Chen
24d3b6d45e perf: make GET /agents read-only when no state changes
Previously every poll (3.5s per client) unconditionally wrote both
agents-state.json and join-keys.json. Now tracks a dirty flag and
only persists when cleanup actually modifies state (expired agents
removed or agents marked offline).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:10:41 +08:00
Kyle Chen
63d7b9c9fb fix: prevent XSS in memo content and guest agent names
Backend: add html.escape() to clean_text() so user-controlled input
(agent names, details) is entity-escaped before storage.

Frontend: memo content now uses textContent instead of innerHTML
(newlines handled by CSS white-space:pre-wrap). Guest agent names
are escaped before interpolation into template literals to prevent
stored XSS via malicious agent names in onclick handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:07:17 +08:00
Kyle Chen
3f2671f760 fix: use date-based quote selection instead of random.choice
Each /yesterday-memo request used random.choice for the wisdom quote,
causing the card to flicker on frontend polling. Now uses date-based
index (YYYYMMDD % len) so the same quote shows consistently all day.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:05:54 +08:00
Kyle Chen
b2091041d4 fix: sync main agent state to agents-state.json on set_state
Previously /set_state only wrote to state.json, but /agents reads
from agents-state.json. The main agent's status in agents-state.json
was stale. Now save_state() also updates the isMain=true entry in
agents-state.json to keep both files consistent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:05:24 +08:00
Kyle Chen
e6e31e841b fix: resolve port mismatch across docs, scripts, and backend
The backend runs on port 19000 (to avoid conflict with OpenClaw on
18791), but docs and scripts referenced 18791. Unified all references
to 19000 and made the port configurable via OFFICE_PORT env var.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:31:06 +08:00
Kyle Chen
084bf4dfaa fix: resolve hardcoded /root paths in CLI and utility scripts
All scripts now use os.path.dirname(os.path.abspath(__file__)) to
dynamically resolve paths relative to their location, consistent
with backend/app.py. Also fixes healthcheck.sh to use --fail and
--max-time for curl, and corrects port references to 19000.

Affected files:
- set_state.py
- healthcheck.sh
- office-agent-push.py
- convert_to_webp.py
- repack_star_working.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:29:10 +08:00
Kyle Chen
04733eaed3 feat: add input sanitization, auth, and trace logging to backend
Add clean_text(), HMAC token auth for set_state, same-origin check,
structured logging with trace IDs, and agent state normalization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:28:24 +08:00
ringhyacinth
d7dcc64f8b
Update README.md 2026-03-01 16:13:46 +08:00
Star
4bcdd305e7 docs: add starmie homophone disclaimer; dual license (MIT code / non-commercial art); enhance skill for one-click onboarding 2026-03-01 16:02:27 +08:00
Star
6a5c959206 docs: add 30s quick start and dual-language README (CN first, EN after) 2026-03-01 15:45:34 +08:00
ringhyacinth
7ad3323d40
Update README.md 2026-03-01 15:30:35 +08:00
Star
a68d87af8f docs: clarify features, update skill, add screenshot and asset/non-commercial notices 2026-03-01 15:10:55 +08:00
Star
e3006ca9b3 feat: release latest Star Office UI with multi-agent, memo panel, docs and skill refresh 2026-03-01 15:09:00 +08:00
Zhaohan Wang
b1e9ed912a README: 鸣谢 Cozy Interior (shubibubi) 与 Pixel Art App Icons (Reff Pixels)
Made-with: Cursor
2026-02-27 16:37:34 +08:00
Zhaohan Wang
03b5c5b030 桌宠:状态图标、应用图标、STATE_API、图标包
- 状态图标:map.state_icons 收/发用 Hangouts+Glovo,writing/researching 用 Word+Google,idle/executing/syncing/error 用 emoji;图标呼吸动画,emoji 同款
- 应用图标:三文鱼头像圆角矩形,83% 缩放与 Dock 一致,bundle.icon 配置
- STATE_API.md:openclaw 写 state.json 的 state 取值说明
- layers:Small (24x24) PNG 图标包、map.json state_icons

Made-with: Cursor
2026-02-27 16:35:47 +08:00
Zhaohan Wang
5b3b7d4861 desktop-pet: 桌宠地图与气泡优化
- 地图: 9x6 房间,ground/rug/border/objects 分层,门口留空
- 后端: lib.rs 支持 border 层
- 前端: 渲染 border 层(顶层)、气泡 DOM 左右贴边不裁切、overflow hidden 去滚动条
- 资源: ipix 字体、map.json、tileset.png、interior free/full 素材
- .gitignore: 忽略 layers/tiles_preview/

Made-with: Cursor
2026-02-27 16:03:08 +08:00
Zhaohan Wang
8a113a1447 feat: 透明桌宠 (Tauri) + 多层 PNG 背景 + 角色状态机与四方向动画
- desktop-pet: Tauri 2 透明窗口桌宠,本地读 state.json
- 支持 layers/ 多层带透明通道 PNG,layers.json 配置
- 角色状态机: idle / move_{up,down,left,right} / 特殊行为 (writing, researching 等)
- 精灵动画: sprites 配置段支持 sprite sheet,无配置时用程序化 fallback
- 示例 layers: platform.png, cloud.png + layers.json

Made-with: Cursor
2026-02-27 13:06:32 +08:00
Zhaohan Wang
26a03a4ee8 feat: add receiving/replying states and configurable paths
- Add receiving and replying states for real-time OpenClaw message tracking
- Make ROOT_DIR and STATE_FILE configurable via env vars (STAR_OFFICE_ROOT, STAR_OFFICE_STATE_FILE)
- Replace hardcoded /root/ paths with relative defaults
- Add bubble texts for new states
- Include new states in auto-idle working set

Made-with: Cursor
2026-02-27 12:28:18 +08:00
Star
365cd8826d Remove runtime pid/log files 2026-02-26 11:13:57 +08:00
Star
e59c1bcd0d Initial open-source release 2026-02-26 11:13:51 +08:00