moi-computer 0.6.0 → 0.7.0
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/README.md +39 -0
- package/client/features/workspace/WorkspaceScreen.tsx +5 -4
- package/dist/{chunk-bv6vrvqf.js → chunk-175bm057.js} +6 -6
- package/dist/{chunk-n6t40enm.js → chunk-w3tnv51j.js} +1 -1
- package/dist/index.html +1 -1
- package/lib/format.ts +18 -4
- package/lib/system-messages.ts +241 -0
- package/package.json +1 -1
- package/server/agent-caller.ts +16 -0
- package/server/cli.ts +628 -45
- package/server/control.ts +18 -1
- package/server/harness/README.md +11 -0
- package/server/harness/claude-code/NOTES.md +22 -7
- package/server/harness/claude-code/adapter.ts +39 -5
- package/server/harness/claude-code/session.ts +27 -11
- package/server/harness/claude-code/sessions.ts +29 -1
- package/server/harness/codex/client.ts +3 -1
- package/server/scratchpad-executor.ts +23 -1
- package/server/service.ts +786 -0
- package/server/status.ts +2 -0
- package/server/update.ts +141 -0
- package/server/version.ts +41 -0
- package/server/web.ts +5 -0
package/README.md
CHANGED
|
@@ -79,6 +79,45 @@ Then bring in your project, either way works:
|
|
|
79
79
|
(or import an existing folder) right from the web UI;
|
|
80
80
|
- or run `moi init` inside a folder to turn it into a workspace.
|
|
81
81
|
|
|
82
|
+
## Run as a service
|
|
83
|
+
|
|
84
|
+
Instead of keeping `moi start` in a terminal, install moi as a user-level
|
|
85
|
+
service — it starts on login, restarts on crash, and survives reboots
|
|
86
|
+
(launchd on macOS, a systemd user unit on Linux; no root needed):
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
moi service install # install and start
|
|
90
|
+
moi service # state, unit path, server version
|
|
91
|
+
moi service logs -f # follow server logs
|
|
92
|
+
moi service restart
|
|
93
|
+
moi service uninstall
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The service captures a small, fixed slice of your shell environment at
|
|
97
|
+
install time: `PATH`, system basics (home, locale, proxies), and moi/agent
|
|
98
|
+
vars (`MOI_*`, `ANTHROPIC_*`, `OPENCLAW_*`, `OPENAI_*`, `PUBLIC_*`).
|
|
99
|
+
Anything else your agents need belongs in the workspace env (`moi env set`,
|
|
100
|
+
`.env`) — or capture it by name: `moi service install --env MY_TOKEN,OTHER`.
|
|
101
|
+
Rerun `moi service install` after changing captured vars (or moving bun). On
|
|
102
|
+
macOS the first install may show a "background item added" notification for
|
|
103
|
+
"moi"; that is the moi service. On headless Linux, lingering is enabled
|
|
104
|
+
automatically when possible so the service outlives your SSH session.
|
|
105
|
+
|
|
106
|
+
## Updating
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
moi update # update to the latest release
|
|
110
|
+
moi update --check # only check; exit 0 up to date, 1 update available, 2 check failed
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`moi update` checks npm for the latest release and updates through whichever
|
|
114
|
+
package manager owns the install (bun, npm, pnpm, or yarn). A service-managed
|
|
115
|
+
server is restarted onto the new version; a foreground `moi start` only gets
|
|
116
|
+
a warning — restart it yourself. Prerelease installs (`…-next.N`) are left
|
|
117
|
+
alone. `--check` changes nothing and is made for scripts and agents.
|
|
118
|
+
`moi status` shows when the running server and CLI versions differ, however
|
|
119
|
+
the update happened.
|
|
120
|
+
|
|
82
121
|
## OpenClaw
|
|
83
122
|
|
|
84
123
|
In OpenClaw, moi is installed per _agent workspace_. First, list the agents
|
|
@@ -540,10 +540,11 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
540
540
|
Icon: IconBrowserPlus,
|
|
541
541
|
label: 'New view',
|
|
542
542
|
onClick: () => {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
543
|
+
// Do NOT select the draft's pre-minted sessionId here: no session
|
|
544
|
+
// exists behind it until submit, so making it the chat selection turns
|
|
545
|
+
// the chat into a dead "New chat" whose sends try to resume a session
|
|
546
|
+
// that isn't there. Submit selects it once the chat actually starts.
|
|
547
|
+
void builderActions.create().then(builder => openTab(viewBuilderTabId(builder.id)))
|
|
547
548
|
}
|
|
548
549
|
}
|
|
549
550
|
]
|