@0perator/operator 0.1.235 → 0.1.261

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.
Files changed (68) hide show
  1. package/README.md +2 -1
  2. package/dashboard/server.mjs +1 -1
  3. package/dist/acp/agent.js +290 -62
  4. package/dist/acp/auth.js +44 -0
  5. package/dist/acp/prompt.js +41 -0
  6. package/dist/acp/run.js +40 -15
  7. package/dist/acp/tool-map.js +48 -0
  8. package/dist/auth/byo.js +15 -8
  9. package/dist/auth/client.js +12 -6
  10. package/dist/auth/commands.js +39 -4
  11. package/dist/auth/identity.js +136 -0
  12. package/dist/auth/store.js +7 -5
  13. package/dist/autonomy/board.js +3 -2
  14. package/dist/autonomy/cron.js +332 -0
  15. package/dist/autonomy/delegate.js +168 -0
  16. package/dist/autonomy/media-robot.js +2 -3
  17. package/dist/autonomy/routines.js +5 -4
  18. package/dist/autonomy/session-factory.js +6 -1
  19. package/dist/browser/cdp.js +266 -0
  20. package/dist/browser/session.js +286 -0
  21. package/dist/cli.js +75 -11
  22. package/dist/config/brand.js +3 -3
  23. package/dist/config/home.js +70 -0
  24. package/dist/config/managed.js +230 -0
  25. package/dist/config/persona.js +59 -9
  26. package/dist/config/scaffold.js +142 -0
  27. package/dist/config/settings.js +38 -4
  28. package/dist/config/skills-index.js +175 -0
  29. package/dist/consolidation/scheduler.js +3 -3
  30. package/dist/consolidation/sleep.js +3 -3
  31. package/dist/engine/agent.js +80 -13
  32. package/dist/engine/aurora.js +6 -0
  33. package/dist/engine/batch-scheduler.js +128 -0
  34. package/dist/engine/json-repair.js +105 -0
  35. package/dist/engine/messages.js +50 -3
  36. package/dist/engine/rolling-summary.js +7 -5
  37. package/dist/enterprise/cli.js +137 -0
  38. package/dist/flywheel/processor.js +30 -2
  39. package/dist/flywheel/secret-gate.js +123 -0
  40. package/dist/mcp/index.js +18 -24
  41. package/dist/memory/index.js +0 -0
  42. package/dist/memory/session-index.js +324 -0
  43. package/dist/memory/session-rewind.js +92 -0
  44. package/dist/memory/state-maintenance.js +441 -0
  45. package/dist/observability/index.js +3 -3
  46. package/dist/permissions/index.js +24 -12
  47. package/dist/router/models.js +27 -8
  48. package/dist/selfimprove/index.js +9 -7
  49. package/dist/session.js +16 -6
  50. package/dist/skills/catalogue.js +167 -0
  51. package/dist/telemetry/audit-verify.js +94 -0
  52. package/dist/telemetry/events.js +86 -6
  53. package/dist/telemetry/lifecycle.js +18 -0
  54. package/dist/tools/deferred.js +117 -0
  55. package/dist/tools/executor.js +19 -20
  56. package/dist/tools/memory.js +117 -0
  57. package/dist/tools/registry.js +152 -21
  58. package/dist/tools/sandbox.js +63 -17
  59. package/dist/tools/searxng.js +2 -2
  60. package/dist/tools/tool-output-spill.js +2 -2
  61. package/dist/ui/Transcript.js +14 -2
  62. package/dist/ui/useInputHistory.js +3 -3
  63. package/dist/vault/cli.js +48 -0
  64. package/dist/vault/store.js +157 -0
  65. package/dist/vault/tool.js +50 -0
  66. package/package.json +3 -5
  67. package/CHANGELOG.md +0 -2487
  68. package/dist/ui/BusTray.js +0 -70
@@ -1,70 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // BusTray — live Switchboard messages surfaced in the Operator TUI as click-to-expand cards. Top-anchored
3
- // in the fullscreen layout so each card's absolute terminal row is deterministic (topRow + Σ heights above),
4
- // which is what makes mouse hit-testing reliable without Ink absolute-position measurement. Clicking a card
5
- // toggles its body (the Phase-1 mouse layer in action). In inline mode (no mouse) the cards still render,
6
- // just not clickable. Messages are DATA from other agents — shown, never executed.
7
- import { useEffect, useState } from "react";
8
- import { Box, Text } from "ink";
9
- import { useMouse } from "./MouseProvider.js";
10
- const MAX_BODY_LINES = 8; // cap an expanded card's body so one big message can't dominate the screen
11
- function wrap(line, width) {
12
- const w = Math.max(1, width);
13
- if (line.length <= w)
14
- return [line];
15
- const out = [];
16
- for (let i = 0; i < line.length; i += w)
17
- out.push(line.slice(i, i + w));
18
- return out;
19
- }
20
- /** Pure layout: assign each message a card with an absolute row (y) and height, given which ids are
21
- * expanded and the terminal width. Deterministic top-to-bottom stacking from `topRow` — the basis for both
22
- * render order and click hit-testing. Exported for unit tests. */
23
- export function trayLayout(messages, expanded, cols, topRow = 1) {
24
- const width = cols > 0 ? cols : 80;
25
- const cards = [];
26
- let y = topRow;
27
- for (const msg of messages) {
28
- const isExp = expanded.has(msg.id);
29
- const bodyLines = isExp
30
- ? msg.body.split("\n").flatMap((l) => wrap(l, width - 2)).slice(0, MAX_BODY_LINES)
31
- : [];
32
- const height = 1 + bodyLines.length;
33
- cards.push({ msg, y, height, expanded: isExp, bodyLines });
34
- y += height;
35
- }
36
- return cards;
37
- }
38
- function preview(body, cols) {
39
- const one = body.replace(/\s+/g, " ").trim();
40
- const budget = Math.max(10, (cols > 0 ? cols : 80) - 28);
41
- return one.length > budget ? one.slice(0, budget - 1) + "…" : one;
42
- }
43
- /** The tray. `cols` is the terminal width (for wrapping + region width). Renders nothing when empty. */
44
- export function BusTray({ messages, cols }) {
45
- const { registerRegion, enabled } = useMouse();
46
- const [expanded, setExpanded] = useState(() => new Set());
47
- const cards = trayLayout(messages, expanded, cols);
48
- // Register every card's clickable region imperatively (one effect, not a hook-per-card — the message
49
- // count varies, which would violate rules-of-hooks). A left-press anywhere on a card toggles its body.
50
- const sig = cards.map((c) => `${c.msg.id}:${c.y}:${c.height}`).join("|");
51
- useEffect(() => {
52
- if (!enabled || !cards.length)
53
- return;
54
- const disposers = cards.map((c) => registerRegion({ id: `bus:${c.msg.id}`, x: 1, y: c.y, width: Math.max(1, cols), height: c.height }, () => {
55
- setExpanded((prev) => {
56
- const next = new Set(prev);
57
- if (next.has(c.msg.id))
58
- next.delete(c.msg.id);
59
- else
60
- next.add(c.msg.id);
61
- return next;
62
- });
63
- }));
64
- return () => disposers.forEach((d) => d());
65
- // eslint-disable-next-line react-hooks/exhaustive-deps
66
- }, [enabled, registerRegion, cols, sig]);
67
- if (!messages.length)
68
- return null;
69
- return (_jsx(Box, { flexDirection: "column", children: cards.map((c) => (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "cyan", children: [c.expanded ? "▾" : "▸", " ", "📨 ", c.msg.from, c.msg.subject ? ` [${c.msg.subject}]` : "", c.expanded ? "" : `: ${preview(c.msg.body, cols)}`, enabled && !c.expanded ? _jsx(Text, { dimColor: true, children: " \u00B7 click to expand" }) : null] }), c.expanded ? c.bodyLines.map((l, i) => _jsx(Text, { dimColor: true, children: " " + l }, i)) : null] }, c.msg.id))) }));
70
- }