@0perator/operator 0.1.172 → 0.1.235
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/CHANGELOG.md +858 -0
- package/README.md +4 -4
- package/dist/acp/agent.js +42 -3
- package/dist/acp/config-options.js +34 -0
- package/dist/acp/run.js +83 -2
- package/dist/auth/byo.js +118 -0
- package/dist/auth/commands.js +34 -1
- package/dist/autonomy/dream.js +1 -1
- package/dist/autonomy/index.js +16 -2
- package/dist/autonomy/media-robot.js +138 -0
- package/dist/autonomy/profile.js +77 -0
- package/dist/autonomy/session-factory.js +13 -9
- package/dist/background/index.js +8 -1
- package/dist/cli.js +132 -95
- package/dist/compose/client.js +56 -0
- package/dist/config/persona.js +186 -14
- package/dist/config/settings.js +49 -16
- package/dist/consolidation/scheduler.js +7 -4
- package/dist/consolidation/sleep.js +15 -1
- package/dist/engine/agent.js +152 -9
- package/dist/engine/aurora.js +73 -14
- package/dist/engine/compaction.js +129 -2
- package/dist/engine/computer-event.js +139 -0
- package/dist/engine/continuation.js +55 -0
- package/dist/engine/contract.js +3 -1
- package/dist/engine/grandmaster.js +13 -3
- package/dist/engine/messages.js +2 -2
- package/dist/engine/redact.js +25 -0
- package/dist/engine/rolling-summary.js +22 -7
- package/dist/engine/router-adapter.js +2 -0
- package/dist/engine/unrestricted.js +51 -0
- package/dist/engine/verify-gate.js +6 -0
- package/dist/index.browser.js +4 -0
- package/dist/index.js +4 -0
- package/dist/memory/index.js +0 -0
- package/dist/permissions/audit.js +4 -1
- package/dist/permissions/policy.js +4 -3
- package/dist/permissions/tier.js +31 -14
- package/dist/remote/host.js +9 -2
- package/dist/router/models.js +43 -2
- package/dist/session.js +113 -36
- package/dist/telemetry/events.js +8 -3
- package/dist/tools/computer.js +1 -1
- package/dist/tools/executor.js +22 -17
- package/dist/tools/mutating.js +6 -0
- package/dist/tools/registry.js +872 -27
- package/dist/tools/shell-session.js +36 -1
- package/dist/tools/tool-output-spill.js +2 -2
- package/dist/ui/ActivitySpinner.js +17 -6
- package/dist/ui/App.js +36 -14
- package/dist/ui/ArtifactPicker.js +109 -0
- package/dist/ui/BusTray.js +70 -0
- package/dist/ui/Composer.js +39 -8
- package/dist/ui/Markdown.js +5 -3
- package/dist/ui/MouseProvider.js +99 -19
- package/dist/ui/QuestionPrompt.js +24 -3
- package/dist/ui/ThinkingSpinner.js +9 -5
- package/dist/ui/ToolStep.js +17 -12
- package/dist/ui/Transcript.js +14 -7
- package/dist/ui/capabilities.js +0 -9
- package/dist/ui/listhit.js +23 -0
- package/dist/ui/mouse.js +22 -0
- package/dist/ui/osc.js +7 -4
- package/dist/ui/progressbar.js +46 -0
- package/dist/ui/shimmer.js +43 -0
- package/dist/ui/theme.js +2 -0
- package/dist/ui/tick.js +48 -0
- package/dist/ui/toolicons.js +69 -0
- package/dist/util/slash.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Per-ACTION visual language for tool rows. The old rows used ONE status glyph (○◐✓✗) for every tool, so a
|
|
2
|
+
// file read looked identical to a web fetch. Here each tool KIND gets its own icon (what it's doing) plus its
|
|
3
|
+
// own "working" animation; the STATUS is carried by color (muted → amber running → green done → red error).
|
|
4
|
+
//
|
|
5
|
+
// Font safety: every glyph is drawn ONLY from the Geometric Shapes (U+25xx), Dingbats (U+27xx) and Braille
|
|
6
|
+
// (U+28xx) blocks that the existing star + braille spinners already prove render in Menlo/Terminal.app — no
|
|
7
|
+
// tofu. Icons are centralized here so the whole vocabulary is swappable in one place.
|
|
8
|
+
// name → kind. First match wins; names are matched loosely so vendor/alias variants land in the right bucket.
|
|
9
|
+
// Order matters: more specific prefixes first. `web_*` must be tested BEFORE the generic `search` rule, or
|
|
10
|
+
// "web_search" (which contains "search") would be miscategorized as a search. `media` is tested FIRST of
|
|
11
|
+
// all: image_generate/video_generate would otherwise fall into the generic default spinner with no
|
|
12
|
+
// progress indication (ToolStep.tsx's media-gen bar keys off toolKind() === "media").
|
|
13
|
+
const KIND_RULES = [
|
|
14
|
+
[/(image_generate|video_generate|img_gen|vid_gen|^generate|diffusion|flux|ltx)/i, "media"],
|
|
15
|
+
[/(read_file|read_files|^read$|^cat$|open_file|file_read)/i, "read"],
|
|
16
|
+
[/(file_write|write_file|^write$|edit|apply_patch|str_replace|notebook|create_file|insert)/i, "write"],
|
|
17
|
+
[/(web_search|web_fetch|^web|http|browser|^fetch$|curl|^url|download)/i, "web"],
|
|
18
|
+
[/(skill_fetch|skill_save|^skill$)/i, "skill"],
|
|
19
|
+
[/(search|grep|ripgrep|glob|^find$|skill_list|lookup)/i, "search"],
|
|
20
|
+
[/(^git|git_|checkpoint|^commit|^diff|^branch)/i, "git"], // before shell: "git_command" contains "command"
|
|
21
|
+
[/(bash|shell|^run$|exec|command|script)/i, "shell"],
|
|
22
|
+
[/(spawn_agent|^agent|sub_?agent|delegate|^task)/i, "agent"],
|
|
23
|
+
];
|
|
24
|
+
export function toolKind(name) {
|
|
25
|
+
for (const [re, k] of KIND_RULES)
|
|
26
|
+
if (re.test(name))
|
|
27
|
+
return k;
|
|
28
|
+
return "default";
|
|
29
|
+
}
|
|
30
|
+
// Settled / static icon per kind (shown tinted by status).
|
|
31
|
+
export const KIND_ICON = {
|
|
32
|
+
read: "▤", write: "✒", search: "◎", shell: "▶", web: "◍", git: "❖", skill: "◆", agent: "✺", media: "◈", default: "●",
|
|
33
|
+
};
|
|
34
|
+
// Per-situation HUE for a RUNNING tool row's glyph — the colour language: you can tell what Operator is doing
|
|
35
|
+
// by the colour of the live glyph (media=magenta, shell=green, search=cyan, web=blue, read=teal, write=gold,
|
|
36
|
+
// git=violet, agent=pink). Thinking stays pearl (shimmer.ts); settled rows keep status colour (done=green,
|
|
37
|
+
// error=red), so the hue signals KIND only while running. Matches the shimmer palette shown in the artifact.
|
|
38
|
+
export const KIND_HUE = {
|
|
39
|
+
read: "#6ee4d8", write: "#ffd278", search: "#78ecf4", shell: "#64eb8c", web: "#6eaaff",
|
|
40
|
+
git: "#b48cff", skill: "#ffd778", agent: "#ff8cbe", media: "#ff6edc", default: "#e0a84a",
|
|
41
|
+
};
|
|
42
|
+
// Running animation frames per kind — single-glyph, driven by the ONE shared ticker (see tick.ts), so N
|
|
43
|
+
// animating rows coalesce into a single redraw per frame. Motion chosen to EVOKE the action.
|
|
44
|
+
export const KIND_FRAMES = {
|
|
45
|
+
read: ["⠁", "⠃", "⠇", "⠧", "⠷", "⠿", "⠷", "⠧", "⠇", "⠃"], // a page filling with lines
|
|
46
|
+
write: ["✎", "✏", "✐", "✎"], // pen strokes
|
|
47
|
+
search: ["◜", "◠", "◝", "◞", "◡", "◟"], // a sweep scanning around
|
|
48
|
+
shell: ["▶", "▷", "▶", "▷"], // a play button pulsing — running a command
|
|
49
|
+
web: ["◴", "◷", "◶", "◵"], // a dial turning — fetching
|
|
50
|
+
git: ["❖", "◈", "❖", "◇"], // a branch node shimmering
|
|
51
|
+
skill: ["◆", "◈", "◆", "◇"], // a gem catching light
|
|
52
|
+
agent: ["✺", "✷", "✹", "✸"], // a burst — delegated work underway
|
|
53
|
+
media: ["◐", "◓", "◑", "◒"], // an aperture/shutter cycling — rendering
|
|
54
|
+
default: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], // the classic braille run-spinner
|
|
55
|
+
};
|
|
56
|
+
/** The glyph to render for a tool row: the action's live animation while running, its settled icon when done,
|
|
57
|
+
* an unmistakable ✗ on error, and a hollow ○ while still pending/selected. `frame` comes from useTick(). */
|
|
58
|
+
export function glyphFor(name, status, frame) {
|
|
59
|
+
if (status === "error")
|
|
60
|
+
return "✗";
|
|
61
|
+
if (status === "selected")
|
|
62
|
+
return "○";
|
|
63
|
+
const kind = toolKind(name);
|
|
64
|
+
if (status === "running") {
|
|
65
|
+
const frames = KIND_FRAMES[kind];
|
|
66
|
+
return frames[frame % frames.length];
|
|
67
|
+
}
|
|
68
|
+
return KIND_ICON[kind]; // done → the action icon, tinted green by the caller
|
|
69
|
+
}
|
package/dist/util/slash.js
CHANGED
|
@@ -5,6 +5,7 @@ const KNOWN = new Set([
|
|
|
5
5
|
"help", "model", "route", "endpoints", "services", "audit", "dashboard", "plan", "mode",
|
|
6
6
|
"think", "ultrathink", "compact", "remember", "memory", "mcp", "whoami", "agents", "monitor",
|
|
7
7
|
"bg", "new", "clear", "exit", "quit", "stats", "login", "logout", "remote", "remotecontrol", "rc",
|
|
8
|
+
"artifacts",
|
|
8
9
|
]);
|
|
9
10
|
export function isSlashCommand(text) {
|
|
10
11
|
const t = text.trim();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0perator/operator",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Operator
|
|
3
|
+
"version": "0.1.235",
|
|
4
|
+
"description": "Operator — TypeScript + Ink terminal coding agent. Full-frame render, single-engine core shared across CLI/web/mobile; runs against a local Aurora model.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"operator": "dist/cli.js",
|