Files
plugins/packages/agent-office/package.json
T
yetone 11e0acd9b1 agent-office 0.2.4: a jumpRequest.at ahead of the clock no longer blocks every later jump (#583)
0.2.3's host acted on any jumpRequest no older than 15 s, a future one
too, and kept its time in $XDG_CACHE_HOME/agent-office/last-jump.json;
every later click had at <= that time and was dropped until the clock
got there. The decision is now judgeJump(at, seen, now) in lib/jump.mjs:

- A request fires only from 15 s old to 5 s ahead, once.
- One stamped further ahead is set aside and recorded, so it never
  fires when the clock reaches it.
- A seen time ahead of now (0.2.3's file for such a request, or a clock
  that stepped back) blocks only that same request (at === seen); any
  other fresh click fires and rewrites the file. With seen in the past,
  an older or equal request is still never acted on, so nothing is
  replayed across restarts.
- The target is still worked out by the host from the session id; a
  page-stamped time can only make a request be skipped, not fire it
  later or elsewhere. Non-finite times are ignored and never written.

Existing bad last-jump.json from 0.2.3: read as before, no migration
needed; it no longer blocks, and the next click replaces it.

Run at this tree (base b797476), HOME=$(mktemp -d):
- mote (macOS): packages/agent-office bun test 180 pass, 0 fail;
  bun scripts/stamp-page.mjs --check ok; bun scripts/check.mjs ok.
- wsl-run (Ubuntu 24.04): agent-office bun test 180 pass, 0 fail.
- win-run (Windows 11): agent-office bun test 180 pass, 0 fail.
  The two host tests are macOS-only (fake herdr, like the 0.2.3 restart
  test); judgeJump's table test runs on all three.
- New tests against 0.2.3's office.hooks.mjs (mote): both host tests
  fail; a bad last-jump.json blocked the fresh jump, and a request an
  hour ahead fired at once.
- Broken by hand (mote): dropping the 5 s ahead bound (2 fail), letting
  a seen time ahead of now order requests again (3 fail), not recording
  a set-aside future request (2 fail).

Not tried: a real magpie with a real herdr or terminal, or a real clock
step; whole-repo bun test (only agent-office changed).
2026-11-01 14:35:42 +08:00

91 lines
2.2 KiB
JSON

{
"name": "@magpie-community/page-agent-office",
"version": "0.2.4",
"description": "我的 Agent 在干嘛:读取本机 Claude Code、Codex、Copilot CLI、Kimi Code、DeepSeek Harness、Gemini CLI、Qwen Code、Pi、omp、Qoder、WorkBuddy、CodeBuddy、Grok Build 的会话文件,把每个会话画成真 3D / 等距 / 2D 办公室里的小人,或分组工作台。Live agent activity dashboard for magpie, with a real WebGL office and six scenes.",
"type": "module",
"files": [
"page/index.html",
"page/style.css",
"page/agents.js",
"page/model.js",
"page/icons.js",
"page/scene.js",
"page/app.js",
"page/icon.svg",
"page/scene3d.js",
"page/three.min.js",
"page/icons",
"lib",
"office.hooks.mjs",
"CHANGELOG.md",
"README.md",
"LICENSE",
"bin",
"SKILL.md"
],
"keywords": [
"magpie",
"magpie-plugin",
"magpie-page",
"agents",
"status",
"office",
"dashboard",
"opencode",
"3d",
"threejs",
"webgl",
"scenes"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/agent-office"
},
"bugs": {
"url": "https://github.com/magpie-community/plugins/issues"
},
"homepage": "https://github.com/magpie-community/plugins/tree/main/packages/agent-office#readme",
"engines": {
"magpie": ">=0.1.1318"
},
"scripts": {
"test": "bun test"
},
"magpie": {
"page": {
"title": "Agent Office",
"titles": {
"zh": "Agent 办公室",
"zh-TW": "Agent 辦公室",
"ja": "エージェントオフィス",
"de": "Agent-Büro"
},
"file": "page/index.html",
"icon": "page/icon.svg"
},
"hooks": "./office.hooks.mjs",
"permissions": [],
"options": {
"mode": "office",
"dim": "3d",
"demo": false,
"showDone": true,
"hideAfter": "6h",
"text": true,
"remote": false,
"scene": "office",
"quality": "medium",
"agents": [],
"showSub": true,
"showIdle": true,
"side": false,
"lang": "auto"
}
},
"bin": {
"agent-office": "bin/agent-office.mjs"
}
}