@hivey/cli 0.9.68 → 0.9.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/native/darwin-arm64/hivey +0 -0
- package/package.json +1 -1
- package/repo/plugins/slack-relay/relay.py +70 -5
- package/repo/plugins/slack-relay/test_relay.py +43 -0
- package/repo/skills/hivey-agent-creator/SKILL.md +1 -1
- package/repo/skills/hivey-agent-creator/scripts/agent_gate.py +54 -1
- package/repo/skills/hivey-agent-creator/scripts/status_check.py +121 -0
- package/repo/skills/hivey-agent-map/SKILL.md +11 -11
- package/repo/skills/hivey-agent-map/scripts/agent_map.py +8 -6
- package/repo/skills/hivey-agent-map/scripts/enhance.py +6 -2
- package/repo/skills/hivey-agent-map/scripts/{office/office.html → fleet/fleet.html} +21 -8
- package/repo/skills/hivey-agent-map/scripts/{office/office.js → fleet/fleet.js} +83 -46
- package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/README.txt +1 -1
- package/repo/skills/hivey-agent-map/scripts/{office → fleet}/ship.js +2 -2
- package/repo/skills/hivey-agent-map/scripts/{office.py → fleet.py} +106 -23
- package/repo/skills/hivey-agent-map/scripts/report.py +4 -4
- package/repo/skills/hivey-agent-map/scripts/serve.py +140 -63
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/OutlineEffect.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/RoomEnvironment.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/loaders/GLTFLoader.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/LICENSE-kenney-space-kit.txt +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/LICENSE-kenney-space-station-kit.txt +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/LICENSE-robot.txt +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/astronautA.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/astronautB.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/barrels.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/barrels_rail.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/craft_cargoA.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/craft_racer.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/craft_speederA.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/desk_chairArms.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/desk_computer.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/machine_generator.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/machine_generatorLarge.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/machine_wireless.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/robot.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/satelliteDish_detailed.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/satelliteDish_large.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/station/Textures/colormap.png.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/station/chair-cushion-headrest.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/station/computer-system.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/station/computer-wide.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/station/container-flat.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/station/container-tall.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/station/container-wide.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/station/display-wall-wide.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/models/station/pipe-ring-colored.glb.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/space.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/space_02.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/track_01.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/track_02.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/track_03.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/track_04.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/track_05.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/track_06.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/track_07.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/music/track_08.mp3.b64 +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/postprocessing/EffectComposer.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/postprocessing/MaskPass.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/postprocessing/OutputPass.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/postprocessing/Pass.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/postprocessing/RenderPass.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/postprocessing/ShaderPass.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/postprocessing/UnrealBloomPass.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/shaders/CopyShader.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/shaders/LuminosityHighPassShader.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/shaders/OutputShader.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/three.module.min.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/utils/BufferGeometryUtils.js +0 -0
- /package/repo/skills/hivey-agent-map/scripts/{office → fleet}/utils/SkeletonUtils.js +0 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -24,6 +24,9 @@ Config: $HERDR_PLUGIN_CONFIG_DIR/config.json
|
|
|
24
24
|
{"token_command": "envsave get <id>", "mirror": "masters", "interval": 10}
|
|
25
25
|
The token comes from $SLACK_TOKEN if set, else from token_command's output.
|
|
26
26
|
Scopes needed: channels:history, chat:write (groups:history for private channels).
|
|
27
|
+
Failures Each direction fails on its own (a read error doesn't block posts). After 3 failed
|
|
28
|
+
rounds in a row the relay alerts once (desktop notification + a post in the channel,
|
|
29
|
+
when posting works), backs off up to 6× the interval, and says when it recovers.
|
|
27
30
|
State: <root>/.swarm/slack_relay_state.json (last Slack ts, bus offset, echo guards).
|
|
28
31
|
"""
|
|
29
32
|
import json
|
|
@@ -50,6 +53,8 @@ PALETTE = ["🦊", "🐙", "🦉", "🐝", "🦄", "🐬", "🦖", "🐢", "🦜
|
|
|
50
53
|
KEEP_GUARDS = 500 # echo-guard ids/timestamps remembered
|
|
51
54
|
KEEP_HELD = 500 # posts held in quiet mode
|
|
52
55
|
CATCH_UP_LINES = 40 # lines in the catch-up message; the rest are counted
|
|
56
|
+
ALERT_AFTER = 3 # failed rounds in a row before the relay alerts the user (then it backs off)
|
|
57
|
+
MAX_BACKOFF = 6 # at most interval × this between rounds while failing
|
|
53
58
|
|
|
54
59
|
|
|
55
60
|
# ---------------------------------------------------------------------------
|
|
@@ -275,14 +280,28 @@ def take_held_posts(channel):
|
|
|
275
280
|
return texts
|
|
276
281
|
|
|
277
282
|
|
|
283
|
+
def desktop_notify(text):
|
|
284
|
+
"""Best-effort macOS notification; silent elsewhere or if osascript is missing."""
|
|
285
|
+
if sys.platform != "darwin":
|
|
286
|
+
return
|
|
287
|
+
plain = re.sub(r"[*_`]", "", text).replace('"', "'")[:230]
|
|
288
|
+
try:
|
|
289
|
+
subprocess.run(["osascript", "-e", f'display notification "{plain}" with title "hivey relay"'],
|
|
290
|
+
capture_output=True, timeout=10)
|
|
291
|
+
except (OSError, subprocess.SubprocessError):
|
|
292
|
+
pass
|
|
293
|
+
|
|
294
|
+
|
|
278
295
|
def log(line):
|
|
279
296
|
print(f"{time.strftime('%H:%M:%S')} {line}", flush=True)
|
|
280
297
|
|
|
281
298
|
|
|
282
299
|
class Relay:
|
|
283
300
|
def __init__(self, root, slack, hivey, channel, scope, quiet=quiet_mode_on,
|
|
284
|
-
held_posts=take_held_posts):
|
|
301
|
+
held_posts=take_held_posts, notify=None):
|
|
285
302
|
self.root, self.slack, self.hivey = Path(root), slack, hivey
|
|
303
|
+
self.notify = notify or desktop_notify
|
|
304
|
+
self.failures, self.alerted, self.last_error = 0, False, ""
|
|
286
305
|
self.channel, self.scope = channel, scope
|
|
287
306
|
self.quiet, self.held_posts = quiet, held_posts
|
|
288
307
|
self.state_path = self.root / ".swarm" / "slack_relay_state.json"
|
|
@@ -356,10 +375,55 @@ class Relay:
|
|
|
356
375
|
log(f"bus → slack catch-up of {len(held)} held post(s)")
|
|
357
376
|
|
|
358
377
|
def step(self):
|
|
378
|
+
"""One round. The two directions fail independently: a read error (e.g. a missing
|
|
379
|
+
groups:history scope) must not stop agents' posts from reaching Slack."""
|
|
359
380
|
manifest = self.manifest()
|
|
360
|
-
|
|
361
|
-
self.bus_to_slack
|
|
381
|
+
errors = []
|
|
382
|
+
for part in (self.slack_to_bus, self.bus_to_slack):
|
|
383
|
+
try:
|
|
384
|
+
part(manifest)
|
|
385
|
+
except Exception as err: # network blips, Slack errors: keep the other direction going
|
|
386
|
+
errors.append(f"{part.__name__.replace('_', ' ')}: {err}")
|
|
362
387
|
self.save()
|
|
388
|
+
self.track(errors)
|
|
389
|
+
return errors
|
|
390
|
+
|
|
391
|
+
def track(self, errors):
|
|
392
|
+
"""Silent retry loops hid a broken relay for 30 minutes (verifier audit 2026-11-05):
|
|
393
|
+
after ALERT_AFTER failed rounds in a row, tell the user once; say when it recovers."""
|
|
394
|
+
if not errors:
|
|
395
|
+
if self.alerted:
|
|
396
|
+
self.alert(f"✅ *hivey relay → you*: #{self.slug()} works again after "
|
|
397
|
+
f"{self.failures} failed rounds.")
|
|
398
|
+
self.failures, self.alerted, self.last_error = 0, False, ""
|
|
399
|
+
return
|
|
400
|
+
self.failures += 1
|
|
401
|
+
self.last_error = errors[0]
|
|
402
|
+
for e in errors:
|
|
403
|
+
log(f"error: {e}")
|
|
404
|
+
if self.failures >= ALERT_AFTER and not self.alerted:
|
|
405
|
+
self.alerted = True
|
|
406
|
+
self.alert(f"⚠️ *hivey relay → you*: #{self.slug()} is failing ({self.failures} rounds "
|
|
407
|
+
f"in a row): {errors[0][:200]}. Messages may not reach agents or Slack until "
|
|
408
|
+
f"it's fixed. Log: the relay pane of this swarm.")
|
|
409
|
+
|
|
410
|
+
def slug(self):
|
|
411
|
+
try:
|
|
412
|
+
return self.manifest().get("slug", "?")
|
|
413
|
+
except (OSError, json.JSONDecodeError):
|
|
414
|
+
return "?"
|
|
415
|
+
|
|
416
|
+
def alert(self, text):
|
|
417
|
+
log(f"ALERT {text}")
|
|
418
|
+
self.notify(text)
|
|
419
|
+
try: # posting may still work when reading doesn't
|
|
420
|
+
self.state["posted"].append(self.slack.post(self.channel, text))
|
|
421
|
+
self.save()
|
|
422
|
+
except Exception as err:
|
|
423
|
+
log(f"alert post failed too: {err}")
|
|
424
|
+
|
|
425
|
+
def wait_seconds(self, interval):
|
|
426
|
+
return interval * min(MAX_BACKOFF, max(1, self.failures))
|
|
363
427
|
|
|
364
428
|
|
|
365
429
|
def claim(pid_path):
|
|
@@ -406,9 +470,10 @@ def main():
|
|
|
406
470
|
return
|
|
407
471
|
try:
|
|
408
472
|
relay.step()
|
|
409
|
-
except Exception as err: #
|
|
473
|
+
except Exception as err: # a bad manifest read: keep relaying
|
|
410
474
|
log(f"error: {err}")
|
|
411
|
-
|
|
475
|
+
relay.track([f"step: {err}"])
|
|
476
|
+
time.sleep(relay.wait_seconds(interval))
|
|
412
477
|
|
|
413
478
|
|
|
414
479
|
if __name__ == "__main__":
|
|
@@ -267,5 +267,48 @@ class HeldPostFiles(unittest.TestCase):
|
|
|
267
267
|
self.assertEqual(list(held.iterdir()), [])
|
|
268
268
|
|
|
269
269
|
|
|
270
|
+
|
|
271
|
+
class Failures(unittest.TestCase):
|
|
272
|
+
"""A broken read (e.g. missing groups:history) must not block posts, and must be reported."""
|
|
273
|
+
|
|
274
|
+
def test_read_failure_still_posts_alerts_once_and_recovers(self):
|
|
275
|
+
with tempfile.TemporaryDirectory() as tmp:
|
|
276
|
+
root = Path(tmp)
|
|
277
|
+
(root / ".swarm").mkdir()
|
|
278
|
+
(root / ".swarm" / "agents.json").write_text(json.dumps(MANIFEST))
|
|
279
|
+
bus = root / ".swarm" / "bus.jsonl"
|
|
280
|
+
bus.write_text("")
|
|
281
|
+
slack, hivey, notes = FakeSlack(), FakeHivey(bus), []
|
|
282
|
+
broken = {"on": True}
|
|
283
|
+
real_history = slack.history
|
|
284
|
+
|
|
285
|
+
def history(channel, oldest):
|
|
286
|
+
if broken["on"]:
|
|
287
|
+
raise RuntimeError("slack conversations.history: missing_scope")
|
|
288
|
+
return real_history(channel, oldest)
|
|
289
|
+
|
|
290
|
+
slack.history = history
|
|
291
|
+
r = relay.Relay(root, slack, hivey, "C1", "masters", quiet=lambda: False,
|
|
292
|
+
held_posts=lambda c: [], notify=notes.append)
|
|
293
|
+
r.state["last_ts"] = "0"
|
|
294
|
+
with open(bus, "a") as f:
|
|
295
|
+
f.write(json.dumps({"ev": "msg", "id": "a1", "from": "ideas/coordinator",
|
|
296
|
+
"to": "human", "swarm": "ideas", "text": "decisions"}) + "\n")
|
|
297
|
+
errors = r.step()
|
|
298
|
+
self.assertTrue(errors and "missing_scope" in errors[0])
|
|
299
|
+
self.assertEqual(len(slack.posted), 1, "the agent's post still reaches Slack")
|
|
300
|
+
for _ in range(5):
|
|
301
|
+
r.step()
|
|
302
|
+
self.assertEqual(len(notes), 1, "alerts once, not every round")
|
|
303
|
+
self.assertIn("is failing", notes[0])
|
|
304
|
+
self.assertTrue(relay.is_relay_post(slack.posted[-1]), "the alert is never re-injected")
|
|
305
|
+
self.assertEqual(r.wait_seconds(10), 60, "backs off while failing")
|
|
306
|
+
broken["on"] = False
|
|
307
|
+
self.assertEqual(r.step(), [])
|
|
308
|
+
self.assertIn("works again", notes[-1])
|
|
309
|
+
self.assertEqual(r.wait_seconds(10), 10)
|
|
310
|
+
self.assertEqual(hivey.sent, [], "alert posts coming back through history aren't injected")
|
|
311
|
+
|
|
312
|
+
|
|
270
313
|
if __name__ == "__main__":
|
|
271
314
|
unittest.main()
|
|
@@ -189,7 +189,7 @@ The harness, when chosen:
|
|
|
189
189
|
|
|
190
190
|
| Piece | What it does |
|
|
191
191
|
|---|---|
|
|
192
|
-
| Done gate | Stop hook `agent_gate.py`: while `.agent/state/run_active` exists, runs the check when the agent tries to finish and blocks it (at most 3 times), logging to `.agent/state/gate.log` |
|
|
192
|
+
| Done gate | Stop hook `agent_gate.py`: while `.agent/state/run_active` exists, runs the check when the agent tries to finish and blocks it (at most 3 times), logging to `.agent/state/gate.log`. After the check passes it also requires `status_check.py --today` (Status dated today, ≤ 40 lines, no unreviewed work under done; off with `"status_check": false`) and, when `review.critics` > 0, a fresh review from this run that says APPROVED or used all `review.rounds` |
|
|
193
193
|
| Resume context | SessionStart hook `agent_context.py`: on startup, resume and compaction injects run-in-progress, gate log, `tasks.json` progress, recent commits and the newest progress-log entries |
|
|
194
194
|
| Fresh review | the hivey skill's `fresh_review.py run --folder .`: N one-shot critics in parallel (`claude -p`, empty context, no saved session, read-only), merged into one review in `.agent/reviews/`; exit 0 only if every critic PASSes and the check exits 0 |
|
|
195
195
|
|
|
@@ -7,10 +7,20 @@ finish runs the agent's check command from .agent/config.json. If the check fail
|
|
|
7
7
|
blocked and the agent gets the check output as its next instruction. After MAX_ATTEMPTS failed
|
|
8
8
|
attempts the gate gives up (so it can never loop forever), logs it, and lets the agent stop.
|
|
9
9
|
With no run in progress, it does nothing: normal conversation is never blocked.
|
|
10
|
+
|
|
11
|
+
After the check passes, two more gates (verifier audit 2026-11-05: stale Status files and self-graded
|
|
12
|
+
"done" made agents' status untrustworthy):
|
|
13
|
+
- Status: status_check.py --today must pass (Status rewritten for this run, ≤ 40 lines, dated today,
|
|
14
|
+
no unreviewed work under "done"). Off with "status_check": false in .agent/config.json.
|
|
15
|
+
- Review: when .agent/config.json has review.critics > 0, a fresh review written during this run must
|
|
16
|
+
say APPROVED, or the run must have used all review.rounds (leftovers noted). The agent re-reading its
|
|
17
|
+
own fixes doesn't count. A run labelled in run_active (e.g. `echo evening > .agent/state/run_active`)
|
|
18
|
+
skips this only if the label is listed in review.optional_for.
|
|
10
19
|
"""
|
|
11
20
|
import argparse
|
|
12
21
|
import json
|
|
13
22
|
import os
|
|
23
|
+
import re
|
|
14
24
|
import subprocess
|
|
15
25
|
import sys
|
|
16
26
|
import time
|
|
@@ -18,6 +28,44 @@ from pathlib import Path
|
|
|
18
28
|
|
|
19
29
|
MAX_ATTEMPTS = 3
|
|
20
30
|
TIMEOUT_S = 300
|
|
31
|
+
HERE = Path(__file__).resolve().parent
|
|
32
|
+
VERDICT_RE = re.compile(r"^\*\*Verdict:\*\*\s*(\w+)", re.M)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def review_gate(root, cfg, active):
|
|
36
|
+
"""None if the run's review requirement is met, else the reason it isn't."""
|
|
37
|
+
review = cfg.get("review") or {}
|
|
38
|
+
if int(review.get("critics") or 0) <= 0:
|
|
39
|
+
return None
|
|
40
|
+
label = active.read_text().strip() if active.exists() else ""
|
|
41
|
+
if label and label in (review.get("optional_for") or []):
|
|
42
|
+
return None
|
|
43
|
+
start = active.stat().st_mtime
|
|
44
|
+
files = []
|
|
45
|
+
for d in (root / ".swarm" / "reviews", root / ".agent" / "reviews"):
|
|
46
|
+
if d.is_dir():
|
|
47
|
+
files += [f for f in d.glob("*.md") if f.stat().st_mtime >= start]
|
|
48
|
+
if not files:
|
|
49
|
+
return ("no fresh review was run during this run. Run the fresh review your brief names "
|
|
50
|
+
"(fresh_review.py run …) and fix what it finds; your own re-read doesn't count.")
|
|
51
|
+
files.sort(key=lambda f: f.stat().st_mtime)
|
|
52
|
+
verdicts = [(VERDICT_RE.search(f.read_text(errors="ignore")) or [None, "?"])[1] for f in files]
|
|
53
|
+
if verdicts[-1] == "APPROVED":
|
|
54
|
+
return None
|
|
55
|
+
rounds = int(review.get("rounds") or 3)
|
|
56
|
+
if len(files) >= rounds:
|
|
57
|
+
return None # max rounds used: allowed to finish, leftovers must be noted in Status
|
|
58
|
+
return (f"the latest fresh review says {verdicts[-1]} ({files[-1].name}). Fixing its defects yourself "
|
|
59
|
+
f"isn't a review: run round {len(files) + 1} (--round {len(files) + 1} --previous {files[-1]}) "
|
|
60
|
+
f"until APPROVED, or until {rounds} rounds are used and the leftovers are noted in Status.")
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def status_gate(root, cfg):
|
|
64
|
+
if cfg.get("status_check") is False or not (HERE / "status_check.py").exists():
|
|
65
|
+
return None
|
|
66
|
+
r = subprocess.run([sys.executable, str(HERE / "status_check.py"), str(root), "--today"],
|
|
67
|
+
capture_output=True, text=True, timeout=60)
|
|
68
|
+
return None if r.returncode == 0 else (r.stdout + r.stderr).strip()
|
|
21
69
|
|
|
22
70
|
|
|
23
71
|
def log(state, line):
|
|
@@ -38,7 +86,8 @@ def main():
|
|
|
38
86
|
active = state / "run_active"
|
|
39
87
|
if not cfg_path.exists() or not active.exists():
|
|
40
88
|
return
|
|
41
|
-
|
|
89
|
+
cfg = json.loads(cfg_path.read_text())
|
|
90
|
+
check = cfg.get("check")
|
|
42
91
|
if not check:
|
|
43
92
|
return
|
|
44
93
|
|
|
@@ -49,6 +98,10 @@ def main():
|
|
|
49
98
|
except subprocess.TimeoutExpired:
|
|
50
99
|
code, output = 124, f"check timed out after {TIMEOUT_S}s"
|
|
51
100
|
|
|
101
|
+
if code == 0:
|
|
102
|
+
extra = [x for x in (status_gate(root, cfg), review_gate(root, cfg, active)) if x]
|
|
103
|
+
if extra:
|
|
104
|
+
code, output = 1, "The check passed, but:\n- " + "\n- ".join(extra)
|
|
52
105
|
if code == 0:
|
|
53
106
|
active.unlink(missing_ok=True)
|
|
54
107
|
attempts_file.unlink(missing_ok=True)
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Check that a hivey agent's Status is short, current and honest ("rewrite, don't append").
|
|
3
|
+
|
|
4
|
+
Finds the Status block between <!-- STATUS:START --> and <!-- STATUS:END --> in CLAUDE.md, else
|
|
5
|
+
STATUS.md. Fails when:
|
|
6
|
+
- it has more than --max-lines non-empty lines (default 40) or --max-chars (default 5000): old
|
|
7
|
+
lines belong in the wiki/log;
|
|
8
|
+
- its first lines carry no YYYY-MM-DD date;
|
|
9
|
+
- that date is older than today (--today, used by the done gate at the end of a run) or older
|
|
10
|
+
than the folder's last git commit (stale: work happened after the Status was written);
|
|
11
|
+
- a line counts unreviewed work as done ("✅ … not re-reviewed", "done (self-reviewed)", or an
|
|
12
|
+
"unreviewed" line under a Done/Shipped heading).
|
|
13
|
+
Why: the verifier audit of 2026-11-05 found 24-34 KB Status files, 92% stale, that named wrong rows and
|
|
14
|
+
called posted posts "queued", and fixes graded by the agent itself filed under "done".
|
|
15
|
+
|
|
16
|
+
status_check.py <folder> [--today] [--max-lines 40] exit 0 = OK, 1 = problems (printed)
|
|
17
|
+
status_check.py --all ~/agents report for every agent folder
|
|
18
|
+
"""
|
|
19
|
+
import argparse
|
|
20
|
+
import datetime as dt
|
|
21
|
+
import re
|
|
22
|
+
import subprocess
|
|
23
|
+
import sys
|
|
24
|
+
from pathlib import Path
|
|
25
|
+
|
|
26
|
+
DATE_RE = re.compile(r"\b(20\d\d-\d\d-\d\d)\b")
|
|
27
|
+
UNREVIEWED_RE = re.compile(r"not (re-?)?reviewed|unreviewed|self-?reviewed|self-?graded|no (re-?)?review", re.I)
|
|
28
|
+
DONE_RE = re.compile(r"✅|\bdone\b|\bcomplete[d]?\b|\bshipped\b|built and reviewed|\bfixed\b", re.I)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def find_status(folder):
|
|
32
|
+
claude = folder / "CLAUDE.md"
|
|
33
|
+
if claude.exists():
|
|
34
|
+
text = claude.read_text(errors="ignore")
|
|
35
|
+
m = re.search(r"<!--\s*STATUS:START\s*-->(.*?)<!--\s*STATUS:END\s*-->", text, re.S)
|
|
36
|
+
if m:
|
|
37
|
+
return "CLAUDE.md Status", m.group(1)
|
|
38
|
+
status = folder / "STATUS.md"
|
|
39
|
+
if status.exists():
|
|
40
|
+
return "STATUS.md", status.read_text(errors="ignore")
|
|
41
|
+
return None, None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def last_commit_date(folder):
|
|
45
|
+
try:
|
|
46
|
+
r = subprocess.run(["git", "-C", str(folder), "log", "-1", "--format=%cs", "--", "."],
|
|
47
|
+
capture_output=True, text=True, timeout=20)
|
|
48
|
+
return dt.date.fromisoformat(r.stdout.strip()) if r.returncode == 0 and r.stdout.strip() else None
|
|
49
|
+
except (OSError, ValueError, subprocess.SubprocessError):
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def check(folder, today=False, max_lines=40, max_chars=5000):
|
|
54
|
+
folder = Path(folder).expanduser()
|
|
55
|
+
where, body = find_status(folder)
|
|
56
|
+
if body is None:
|
|
57
|
+
return None, []
|
|
58
|
+
lines = [l for l in body.splitlines() if l.strip()]
|
|
59
|
+
problems = []
|
|
60
|
+
if len(lines) > max_lines:
|
|
61
|
+
problems.append(f"{where} has {len(lines)} lines (max {max_lines}): rewrite it, don't append. "
|
|
62
|
+
"Move history and finished items into your wiki or log, keep only what's current.")
|
|
63
|
+
size = sum(len(l) for l in lines)
|
|
64
|
+
if size > max_chars:
|
|
65
|
+
problems.append(f"{where} is {size} characters (max {max_chars}): it's re-read every turn. Keep "
|
|
66
|
+
"it to the current state; move history into your wiki or log.")
|
|
67
|
+
date = None
|
|
68
|
+
for l in lines[:5]:
|
|
69
|
+
m = DATE_RE.search(l)
|
|
70
|
+
if m:
|
|
71
|
+
date = dt.date.fromisoformat(m.group(1))
|
|
72
|
+
break
|
|
73
|
+
if not date:
|
|
74
|
+
problems.append(f"{where} has no YYYY-MM-DD date in its first lines (add **Updated:** YYYY-MM-DD HH:MM).")
|
|
75
|
+
else:
|
|
76
|
+
if today and date < dt.date.today():
|
|
77
|
+
problems.append(f"{where} is dated {date}, not today: rewrite it for this run.")
|
|
78
|
+
commit = last_commit_date(folder)
|
|
79
|
+
if commit and date < commit:
|
|
80
|
+
problems.append(f"{where} is dated {date} but this folder has commits from {commit}: it's stale.")
|
|
81
|
+
heading = ""
|
|
82
|
+
for l in lines:
|
|
83
|
+
if l.lstrip().startswith("#") or re.match(r"^\*\*[^*]+:\*\*\s*$", l.strip()):
|
|
84
|
+
heading = l
|
|
85
|
+
if UNREVIEWED_RE.search(l) and (DONE_RE.search(l) or DONE_RE.search(heading)):
|
|
86
|
+
problems.append(f"{where} counts unreviewed work as done: {l.strip()[:160]!r}. Either get it "
|
|
87
|
+
"reviewed (fresh review) or list it under open/pending, not done.")
|
|
88
|
+
return where, problems
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def main():
|
|
92
|
+
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
|
93
|
+
ap.add_argument("folder", nargs="?", default=".")
|
|
94
|
+
ap.add_argument("--today", action="store_true", help="the Status must be dated today (end of a run)")
|
|
95
|
+
ap.add_argument("--max-lines", type=int, default=40)
|
|
96
|
+
ap.add_argument("--max-chars", type=int, default=5000)
|
|
97
|
+
ap.add_argument("--all", metavar="DIR", help="report on every sub-folder of DIR that has a Status")
|
|
98
|
+
a = ap.parse_args()
|
|
99
|
+
if a.all:
|
|
100
|
+
bad = 0
|
|
101
|
+
for f in sorted(Path(a.all).expanduser().iterdir()):
|
|
102
|
+
if not f.is_dir():
|
|
103
|
+
continue
|
|
104
|
+
where, problems = check(f, False, a.max_lines, a.max_chars)
|
|
105
|
+
if where is None:
|
|
106
|
+
continue
|
|
107
|
+
bad += bool(problems)
|
|
108
|
+
print(f"{'FAIL' if problems else 'OK '} {f.name}: " + (" | ".join(p[:110] for p in problems) or where))
|
|
109
|
+
sys.exit(1 if bad else 0)
|
|
110
|
+
where, problems = check(a.folder, a.today, a.max_lines, a.max_chars)
|
|
111
|
+
if where is None:
|
|
112
|
+
print("STATUS OK (no Status block or STATUS.md here)")
|
|
113
|
+
return
|
|
114
|
+
if problems:
|
|
115
|
+
print("STATUS FAIL:\n- " + "\n- ".join(problems))
|
|
116
|
+
sys.exit(1)
|
|
117
|
+
print(f"STATUS OK ({where})")
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
if __name__ == "__main__":
|
|
121
|
+
main()
|
|
@@ -108,7 +108,7 @@ hivey agent-map nightly [--model sonnet] # a full report now (also: --no-llm,
|
|
|
108
108
|
hivey agent-map schedule install [--at 06:30] [--model sonnet] # | remove | status
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
- **hivey menu → agent
|
|
111
|
+
- **hivey menu → agent fleet → 📊 Jobs tab** (key 4, or `/fleet/?view=jobs`) shows these pages inside the fleet page: the frame loads `/hv-jobs`, which the server redirects to the latest map (else stats, logs, sessions); with no report yet it starts the first build (`agent_map.py open --no-open`) and shows a page that reloads until it is ready. Every jobs page's navbar starts with 🚀 Fleet (hidden inside the frame). `hivey agent-map open` still opens `agent-stats.html`,
|
|
112
112
|
`agent-map.html` and `agent-logs.html` from `~/.hivey/agent-map/reports/latest`.
|
|
113
113
|
- **hivey's layer on the archify pages** (`enhance.py`, after finalize; `agent_map.py enhance [folder]`
|
|
114
114
|
re-applies it): a Stats · Map · Logs navbar on every page; map boxes coloured by spend (green: none →
|
|
@@ -130,7 +130,7 @@ hivey agent-map schedule install [--at 06:30] [--model sonnet] # | remove | st
|
|
|
130
130
|
People chatting with agents (Claude Code, Codex, Grok in a terminal; snapshot `interactive`, with one
|
|
131
131
|
entry per session) go to **`agent-sessions.html`**: cost by agent and by day, the costliest sessions with
|
|
132
132
|
their peak context (⚠️ over 300k tokens), length and first message, and tips to spend less.
|
|
133
|
-
- **Open:** `hivey agent-map open` (
|
|
133
|
+
- **Open:** `hivey agent-map open` (or the fleet page's 📊 Jobs tab) opens `http://127.0.0.1:42817/latest/agent-map.html`
|
|
134
134
|
(the map first; the stats page when there is no map yet). With no report yet it builds the pages without
|
|
135
135
|
a model in seconds, opens them, then draws the map in the background (`first-run.json` stops a second
|
|
136
136
|
click from starting another build). If a stats page fails, the logs and sessions pages still publish.
|
|
@@ -181,25 +181,25 @@ hivey agent-map schedule install [--at 06:30] [--model sonnet] # | remove | st
|
|
|
181
181
|
|
|
182
182
|
## Agent fleet (what every agent does now)
|
|
183
183
|
|
|
184
|
-
`hivey agent-map fleet` (or `
|
|
185
|
-
agent in hivey at a desk in a 3D
|
|
184
|
+
`hivey agent-map fleet` (or `fleet`; hivey menu → agent fleet) opens http://127.0.0.1:42817/fleet/ (old /fleet/ links redirect there; files in `reports/fleet/`): every live
|
|
185
|
+
agent in hivey at a desk in a 3D fleet, one room per space, and one spaceship per hivey session (`hivey session list`: the default session flies the classic frigate, the others a carrier, an explorer or a recoloured frigate, their name painted on the hull; a stopped session's ship has cold engines and its agents asleep at their desks, read from its saved `session.json`; a running one's engines burn). Click an agent to open its session in a terminal: the one already showing it, or a new Terminal/iTerm window running `hivey session attach <name>`, which also starts a stopped session. Click the name painted on a ship's hull for its menu (hover shows its agent count): open/start the session, or stop it (a second click confirms; `hivey session stop` ends all its agents and closes its terminal; never the default session). The space outside is one of six scenes (violet, emerald, crimson, deep blue, golden twin suns, a singularity with its lensed accretion disk), chosen with the page's 🌌 setting: a new one on every load, or always the one you pick (saved with the ⏱ setting; `?space=1..6` in the address overrides it). Drag the hull name to move the ship; positions are kept in `~/.hivey/agent-map/fleet-settings.json` with the ⏱ setting. Open, compact and clear reach the agent through its own session's socket. The details panel (right-click an agent, or ⓘ) has a 📚 Wiki section: the agent's own `<name>-wiki/` (in its folder, or the folder named after its space under `~/agents` or `~/swarms`), its 8 newest pages and reports and its latest `log.md` entries; click one to open it in Obsidian (`obsidian://open`; a wiki that is not an Obsidian vault yet opens in the default Markdown app). After a /compact the context shown is the compacted size until the agent's next reply. Solo agents, extra sessions in a space and
|
|
186
186
|
each swarm's coordinator get a desk; a swarm's workers and critics stand beside their coordinator's desk.
|
|
187
187
|
|
|
188
188
|
- **Reads** each desk's terminal (`hivey pane read`, any CLI) and its Claude Code session log (context
|
|
189
189
|
size = input + cache tokens of the last reply, model, last prompt, the session recap, last replies and
|
|
190
|
-
tools). `
|
|
190
|
+
tools). `fleet.py run` writes `~/.hivey/agent-map/reports/fleet/fleet.json`.
|
|
191
191
|
- **Summarizes** with Haiku (`claude -p --model haiku`, no tools, no settings, no session saved), in
|
|
192
|
-
batches of 10, only the desks whose terminal or log changed (`~/.hivey/agent-map/
|
|
192
|
+
batches of 10, only the desks whose terminal or log changed (`~/.hivey/agent-map/fleet-cache.json`):
|
|
193
193
|
current job, a speech-bubble line, up to 3 achievements, next step, what to answer when it waits
|
|
194
194
|
for you, and keep / compact / clear advice. `--no-llm` (or a failed call) falls back to the recap.
|
|
195
|
-
- **Refreshes** while the page is open (the server's
|
|
195
|
+
- **Refreshes** while the page is open (the server's fleet clock; the page polls every 15 s): a live
|
|
196
196
|
pass every minute and when the page loads (`run --quick`: status, context and terminal are fresh,
|
|
197
197
|
only desks whose status changed go to the model) and a full pass every 5 minutes (every desk whose
|
|
198
198
|
terminal changed), or a full pass now with ⟳ / `r`. The page's ⏱ setting picks every minute (that),
|
|
199
199
|
every 5 min, 15 min or hour (full passes only) or on reload only (no clock: a full pass when the page loads or on ⟳),
|
|
200
|
-
saved in `~/.hivey/agent-map/
|
|
200
|
+
saved in `~/.hivey/agent-map/fleet-settings.json`. The header shows the time of the last update, of
|
|
201
201
|
the last full summary pass and of the next update.
|
|
202
|
-
- **Page** (titled "hivey fleet", with the hivey logo; the ⚙ button holds the 🎵 music, ⏱ updates and 🌌 background settings): Fleet (Three.js r160, MIT, vendored in `scripts/
|
|
202
|
+
- **Page** (titled "hivey fleet", with the hivey logo; the ⚙ button holds the 🎵 music, ⏱ updates and 🌌 background settings): Fleet (Three.js r160, MIT, vendored in `scripts/fleet/` with RoomEnvironment, OutlineEffect and the bloom
|
|
203
203
|
post-processing; `ship.js` builds the scene: the deck of a spacecraft floating in front of a galaxy, viewports, hull
|
|
204
204
|
light strips, an observation lounge with a holotable, galley, server racks, plant pods; the crew are mini robots,
|
|
205
205
|
one per desk, glass visor eyes in the status colour, team-coloured ear pods; ✨ HD (bloom) or 🎨 comic, `t`; only working agents move, a blocked one waves, labels
|
|
@@ -209,8 +209,8 @@ each swarm's coordinator get a desk; a swarm's workers and critics stand beside
|
|
|
209
209
|
terminal tail). Compact / Clear type `/compact` or `/clear` into an agent that is not working (two
|
|
210
210
|
clicks).
|
|
211
211
|
|
|
212
|
-
- **Models and music** (`scripts/
|
|
213
|
-
`
|
|
212
|
+
- **Models and music** (`scripts/fleet/models/`, `music/`, stored as `.b64` because skills install text files;
|
|
213
|
+
`fleet.py` decodes them into the page folder): the animated crew robot (RobotExpressive, Tomás Laulhé /
|
|
214
214
|
Quaternius, CC0: Idle + nods when working, Wave when blocked, ThumbsUp when done, Sitting when idle), Kenney
|
|
215
215
|
Space Kit and Space Station Kit pieces (CC0: desks, chairs, generators, dishes, small craft, astronauts,
|
|
216
216
|
consoles, crates), licences in `models/LICENSE-*`; 10 MusicGen electronic space tracks (`music/README.txt` has their prompts), 🔇/🎵 or `m`; the 🎵 menu plays a new one each time (moving on when one ends) or always one (saved with the other settings). Browsers allow sound only after you touch the page, so when playing at once is refused the music starts with your first click or key press anywhere.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
agent_map.py nightly [--model sonnet] [--no-llm] [--open]
|
|
12
12
|
a full report in ~/.hivey/agent-map/reports/<date>/
|
|
13
13
|
agent_map.py open open the latest report (hivey menu → agent jobs)
|
|
14
|
-
agent_map.py
|
|
14
|
+
agent_map.py fleet [open|run] [--no-llm] the agent fleet: every live agent at a desk, its current
|
|
15
15
|
job (terminal + session log, summed up by Sonnet), context
|
|
16
16
|
and compact/clear advice (hivey menu → agent fleet)
|
|
17
17
|
agent_map.py schedule [install|remove|status|offer] [--at 06:30] [--model sonnet]
|
|
@@ -1067,6 +1067,8 @@ def main() -> int:
|
|
|
1067
1067
|
en.add_argument("folder", nargs="?", default=str(STATE / "reports" / "latest"))
|
|
1068
1068
|
op = sub.add_parser("open", help="open the latest report (builds the first one if there is none)")
|
|
1069
1069
|
op.add_argument("--model", default="sonnet")
|
|
1070
|
+
op.add_argument("--no-open", action="store_true", help="build the first report if there is none, open nothing "
|
|
1071
|
+
"(the fleet page's Jobs tab)")
|
|
1070
1072
|
sc = sub.add_parser("schedule", help="the nightly launchd run: install | remove | status")
|
|
1071
1073
|
sc.add_argument("action", choices=["install", "remove", "status", "offer", "token"], nargs="?", default="status")
|
|
1072
1074
|
sc.add_argument("--command", help='token: the command printing the `claude setup-token` token, '
|
|
@@ -1076,7 +1078,7 @@ def main() -> int:
|
|
|
1076
1078
|
rf = sub.add_parser("refresh", help="new scan into the latest report's pages, no model (the Refresh button)")
|
|
1077
1079
|
rf.add_argument("--days", type=int, default=7)
|
|
1078
1080
|
sub.add_parser("serve", help="serve the report pages on 127.0.0.1 (`open` starts it)")
|
|
1079
|
-
of = sub.add_parser("
|
|
1081
|
+
of = sub.add_parser("fleet", help="the agent fleet: what every live agent does now (open | run)")
|
|
1080
1082
|
of.add_argument("action", choices=["open", "run"], nargs="?", default="open")
|
|
1081
1083
|
of.add_argument("--no-llm", action="store_true", help="run: summaries from the session recap, no model")
|
|
1082
1084
|
of.add_argument("--model", default="haiku")
|
|
@@ -1114,7 +1116,7 @@ def main() -> int:
|
|
|
1114
1116
|
return 0
|
|
1115
1117
|
if a.cmd == "open":
|
|
1116
1118
|
import report
|
|
1117
|
-
return report.open_latest(a.model)
|
|
1119
|
+
return report.open_latest(a.model, not a.no_open)
|
|
1118
1120
|
if a.cmd == "schedule":
|
|
1119
1121
|
import report
|
|
1120
1122
|
if a.action == "token":
|
|
@@ -1134,9 +1136,9 @@ def main() -> int:
|
|
|
1134
1136
|
if a.cmd == "serve":
|
|
1135
1137
|
import serve
|
|
1136
1138
|
return serve.serve()
|
|
1137
|
-
if a.cmd == "
|
|
1138
|
-
import
|
|
1139
|
-
return
|
|
1139
|
+
if a.cmd == "fleet":
|
|
1140
|
+
import fleet
|
|
1141
|
+
return fleet.open_page(a.model) if a.action == "open" else fleet.run(a.model, not a.no_llm)
|
|
1140
1142
|
if a.cmd == "context":
|
|
1141
1143
|
return context_cmd(a.agents, a.set)
|
|
1142
1144
|
if a.cmd == "link":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""hivey's layer on top of the archify pages, added after they are finalized:
|
|
2
2
|
|
|
3
|
-
- a navbar (Stats · Map · Logs) on every page, so each page reaches the others;
|
|
3
|
+
- a navbar (🚀 Fleet · Stats · Map · Logs) on every page, so each page reaches the others;
|
|
4
4
|
- on the map: each job/agent box coloured by its spend in the window (green: none, red: the most),
|
|
5
5
|
with a legend; a hover explanation on each column header; and, in the box's info card, what the
|
|
6
6
|
job or agent does, its tokens, cost, calls, models and last run.
|
|
@@ -39,6 +39,7 @@ NAV_CSS = """
|
|
|
39
39
|
border-bottom:1px solid rgba(127,127,127,.25);background:rgba(127,127,127,.06)}
|
|
40
40
|
.hv-nav a{color:inherit;opacity:.65;text-decoration:none;padding:4px 12px;border-radius:999px}
|
|
41
41
|
.hv-nav a:hover{opacity:1;background:rgba(127,127,127,.14)}
|
|
42
|
+
.hv-nav a.hv-fleet{opacity:1;font-weight:600;margin-right:8px;border:1px solid rgba(127,127,127,.3)}
|
|
42
43
|
.hv-nav a.on{opacity:1;background:rgba(47,111,236,.16);color:#2f6fec}
|
|
43
44
|
.hv-nav .hv-span{display:inline-flex;margin-left:12px;border:1px solid rgba(127,127,127,.3);border-radius:999px;padding:2px}
|
|
44
45
|
.hv-nav .hv-span a{padding:2px 10px;font-weight:600;font-size:12px}
|
|
@@ -85,7 +86,10 @@ def nav(active: str, generated: str, days: int = 7) -> str:
|
|
|
85
86
|
day = days == 1 # the toggle opens the same page in the other window
|
|
86
87
|
toggle = (f'<span class="hv-span"><a href="{active if day else DAY_DIR + "/" + active}"{" class=on" if day else ""}>24 h</a>'
|
|
87
88
|
f'<a href="{"../" + active if day else active}"{"" if day else " class=on"}>7 days</a></span>')
|
|
88
|
-
|
|
89
|
+
# back to the fleet page (it shows these pages in its Jobs tab, where the link hides itself)
|
|
90
|
+
fleet = ('<a class="hv-fleet" href="/fleet/?view=fleet" target="_top" title="The hivey fleet: every live agent now">'
|
|
91
|
+
'🚀 Fleet</a><script>if(window.top!==window)document.currentScript.previousElementSibling.remove()</script>')
|
|
92
|
+
return (f'<nav class="hv-nav">{fleet}{items}{toggle}<span class="hv-when">scan {when}</span>'
|
|
89
93
|
'<button class="hv-refresh" type="button" title="Scan again now and reload (free: no model run)" '
|
|
90
94
|
'onclick="hvRefresh(this)">↻ Refresh</button></nav>' + REFRESH_JS)
|
|
91
95
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>hivey fleet</title>
|
|
7
|
-
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0
|
|
7
|
+
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><rect width='40' height='40' rx='9' fill='%239befc8'/><path d='M10 9h7v9h6V9h7v23h-7V22h-6v10h-7z' fill='%23122319'/></svg>">
|
|
8
8
|
<style>
|
|
9
9
|
:root{
|
|
10
10
|
--bg:#0d1119;--panel:#151b27;--panel2:#1b2332;--line:#273246;--text:#e8edf5;--muted:#8d9ab0;
|
|
@@ -65,10 +65,10 @@ header{position:sticky;top:0;z-index:20;display:flex;flex-wrap:wrap;align-items:
|
|
|
65
65
|
.ask .go{margin-left:auto;font-size:12px;color:var(--honey);white-space:nowrap}
|
|
66
66
|
/* ---------- views ---------- */
|
|
67
67
|
main{position:relative}
|
|
68
|
-
#
|
|
68
|
+
#fleet{position:relative;height:calc(100vh - 118px);min-height:420px;overflow:hidden;
|
|
69
69
|
background:radial-gradient(1200px 600px at 50% 20%,#18202e,#0b0e15)}
|
|
70
|
-
#
|
|
71
|
-
#
|
|
70
|
+
#fleet canvas{display:block;cursor:grab}
|
|
71
|
+
#fleet canvas.drag{cursor:grabbing}
|
|
72
72
|
#labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}
|
|
73
73
|
.tag{position:absolute;transform:translate(-50%,-100%);display:flex;flex-direction:column;align-items:center;gap:4px;will-change:transform}
|
|
74
74
|
.bubble{max-width:230px;padding:7px 10px;border-radius:12px;background:#f8fafc;color:#0f172a;font-size:12px;line-height:1.3;
|
|
@@ -96,6 +96,14 @@ main{position:relative}
|
|
|
96
96
|
.ship-menu button{text-align:left;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:7px 10px;color:inherit;cursor:pointer}
|
|
97
97
|
.ship-menu button:hover{border-color:var(--honey)}
|
|
98
98
|
.ship-menu button.danger{color:#fda4af}.ship-menu button.danger.arm{background:#7f1d1d;color:#fff;border-color:#fb7185}
|
|
99
|
+
#drawer .wiki a{color:inherit;text-decoration:none}
|
|
100
|
+
#drawer .wiki-head a{font-weight:600;color:#9befc8}
|
|
101
|
+
#drawer .wiki-head a:hover,#drawer .wiki-page:hover .wt{text-decoration:underline}
|
|
102
|
+
#drawer .wiki-sub{margin:8px 0 3px;text-transform:uppercase;font-size:10px;letter-spacing:.06em}
|
|
103
|
+
#drawer .wiki-page{display:flex;flex-direction:column;padding:4px 6px;margin:0 -6px;border-radius:7px}
|
|
104
|
+
#drawer .wiki-page:hover{background:var(--panel2)}
|
|
105
|
+
#drawer .wiki-page .meta{font-size:11px}
|
|
106
|
+
#drawer .wiki-log{font-size:12px;line-height:1.35;margin:2px 0}
|
|
99
107
|
.ship-menu .note{font-size:11px;color:#93a4c3;padding:0 4px}
|
|
100
108
|
.ship-label{cursor:grab;touch-action:none;user-select:none}.ship-label.dragging{cursor:grabbing;border-color:var(--honey)}
|
|
101
109
|
#hud{position:absolute;left:14px;bottom:12px;display:flex;gap:8px;align-items:center;color:var(--muted);font-size:12px}
|
|
@@ -144,6 +152,9 @@ main{position:relative}
|
|
|
144
152
|
.actions button.primary{border-color:rgba(245,184,61,.6)}
|
|
145
153
|
.actions button:disabled{opacity:.35;cursor:not-allowed}
|
|
146
154
|
/* ---------- list ---------- */
|
|
155
|
+
#jobs{display:none;background:#fff}
|
|
156
|
+
#jobs iframe{display:block;width:100%;height:calc(100vh - 70px);border:0}
|
|
157
|
+
body.v-jobs .search{visibility:hidden}
|
|
147
158
|
#list{display:none;padding:12px 18px 40px}
|
|
148
159
|
table{width:100%;border-collapse:collapse;font-size:12.5px}
|
|
149
160
|
th{text-align:left;color:var(--muted);font-weight:600;padding:7px 8px;border-bottom:1px solid var(--line);cursor:pointer;white-space:nowrap;position:sticky;top:57px;background:var(--bg)}
|
|
@@ -180,9 +191,10 @@ td.j{max-width:420px}
|
|
|
180
191
|
<div class="spacer"></div>
|
|
181
192
|
<input class="search" id="q" placeholder="Search agents, jobs… ( / )" autocomplete="off">
|
|
182
193
|
<div class="seg" id="views">
|
|
183
|
-
<button data-v="
|
|
194
|
+
<button data-v="fleet" title="Your spaceships, one per hivey session (1)">🚀 Fleet</button>
|
|
184
195
|
<button data-v="board" title="Cards by what needs you (2)">▦ Board</button>
|
|
185
196
|
<button data-v="list" title="One row per agent, for hundreds (3)">☰ List</button>
|
|
197
|
+
<button data-v="jobs" title="Agent jobs: scheduled and background jobs, their map, spend, logs and sessions (4)">📊 Jobs</button>
|
|
186
198
|
</div>
|
|
187
199
|
<button class="iconbtn" id="music" title="Background music on/off (m)">🔇</button>
|
|
188
200
|
<button class="iconbtn" id="refresh" title="Read every terminal and session log again now (r)">⟳</button>
|
|
@@ -206,7 +218,7 @@ td.j{max-width:420px}
|
|
|
206
218
|
</select>
|
|
207
219
|
</label>
|
|
208
220
|
<label><span>⏱ Updates</span>
|
|
209
|
-
<select class="every" id="every" title="How the
|
|
221
|
+
<select class="every" id="every" title="How the fleet updates itself">
|
|
210
222
|
<option value="minute">every minute</option>
|
|
211
223
|
<option value="5min">every 5 min</option>
|
|
212
224
|
<option value="15min">every 15 min</option>
|
|
@@ -229,17 +241,18 @@ td.j{max-width:420px}
|
|
|
229
241
|
</div>
|
|
230
242
|
<div id="inbox"></div>
|
|
231
243
|
<main>
|
|
232
|
-
<section id="
|
|
244
|
+
<section id="fleet">
|
|
233
245
|
<div id="labels"></div>
|
|
234
246
|
<div id="hud"><button id="fit" title="Show everyone (f)">⤢ fit</button><button id="style" title="Comic or realistic look (t)">🎨 comic</button><span>drag to move · scroll to zoom · click an agent to open it in hivey · right-click for details</span></div>
|
|
235
247
|
</section>
|
|
236
248
|
<section id="board"></section>
|
|
237
249
|
<section id="list"></section>
|
|
250
|
+
<section id="jobs"><iframe id="jobsframe" title="Agent jobs"></iframe></section>
|
|
238
251
|
</main>
|
|
239
252
|
<aside id="drawer"></aside>
|
|
240
253
|
<div id="tip"></div>
|
|
241
254
|
<div id="toast"></div>
|
|
242
255
|
<audio id="bgm" preload="auto"></audio>
|
|
243
|
-
<script type="module" src="./
|
|
256
|
+
<script type="module" src="./fleet.js"></script>
|
|
244
257
|
</body>
|
|
245
258
|
</html>
|