moi-computer 0.9.1-next.3 → 0.9.1-next.5
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/client/app/shell/SidebarLayout.tsx +15 -2
- package/client/assets/floppy-disk.webp +0 -0
- package/client/assets.d.ts +5 -0
- package/client/components/ui/button.tsx +2 -1
- package/client/features/chat/tool-group/format/claude.ts +2 -1
- package/client/features/chat/tool-group/format/codex.ts +2 -1
- package/client/features/chat/tool-group/format/hermes.ts +2 -1
- package/client/features/chat/tool-group/format/mcp.ts +7 -3
- package/client/features/chat/tool-group/format/openclaw.ts +6 -2
- package/client/features/chat/tool-group/format/shell.ts +162 -0
- package/client/features/dev/DevIndexPage.tsx +5 -0
- package/client/features/dev/DevRoutes.tsx +2 -0
- package/client/features/dev/TextureLabPage.tsx +149 -0
- package/client/features/home/HomePage.tsx +5 -5
- package/client/features/home/workspace-setup/CreateWorkspaceDialog.tsx +3 -3
- package/client/features/home/workspace-setup/DemoDialog.tsx +239 -0
- package/client/features/settings/GeneralSettings.tsx +27 -23
- package/client/features/widgets/WidgetFrame.tsx +1 -0
- package/client/index.css +2 -2
- package/client/runtime/workspace-theme.ts +12 -4
- package/client/theme.css +26 -22
- package/dist/{chunk-b959mdkj.js → chunk-0pcdwjkp.js} +1 -1
- package/dist/chunk-4xmcsjjv.js +1 -0
- package/dist/chunk-9m59hf8p.js +10 -0
- package/dist/{chunk-zbeq02yc.js → chunk-9y2zbzqz.js} +1 -1
- package/dist/chunk-dfs36zgc.js +1 -0
- package/dist/chunk-hffvjnmj.js +85 -0
- package/dist/chunk-pq93pv5z.js +1 -0
- package/dist/{chunk-zcyvyebg.js → chunk-te5sfhvx.js} +2 -2
- package/dist/chunk-xtr8kvqx.css +1 -0
- package/dist/{chunk-zfz3b4xg.js → chunk-yhj9bg1s.js} +2 -2
- package/dist/{chunk-zbt8emsw.js → chunk-yt2qjn3m.js} +2 -2
- package/dist/floppy-disk-wmjs0n85.webp +0 -0
- package/dist/index.html +1 -1
- package/lib/ids.ts +27 -0
- package/lib/themes.ts +12 -12
- package/lib/types.ts +2 -2
- package/package.json +2 -1
- package/server/api.ts +1 -1
- package/server/app-config.ts +2 -2
- package/server/bundler/build-applet.ts +2 -3
- package/server/cli.ts +23 -1
- package/server/harness/codex/client.ts +23 -0
- package/server/harness/codex/index.ts +8 -8
- package/server/harness/codex/session.ts +12 -4
- package/server/harness/codex/status.ts +31 -0
- package/server/registry.ts +37 -2
- package/client/features/home/workspace-setup/InstallMoiDialog.tsx +0 -245
- package/dist/chunk-87q78504.js +0 -1
- package/dist/chunk-8s41nd3g.js +0 -1
- package/dist/chunk-cagtq45k.js +0 -1
- package/dist/chunk-ek6zde7t.js +0 -10
- package/dist/chunk-n8tq2494.js +0 -82
- package/dist/chunk-v82nefjq.css +0 -1
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { type ReactElement, useEffect, useState } from 'react'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
IconArrowUpRight,
|
|
5
|
-
IconCheck,
|
|
6
|
-
IconCopy,
|
|
7
|
-
IconFolders,
|
|
8
|
-
IconTerminal2,
|
|
9
|
-
IconX
|
|
10
|
-
} from '@tabler/icons-react'
|
|
11
|
-
|
|
12
|
-
import claudeIcon from '@/client/assets/claude.svg'
|
|
13
|
-
import hermesIcon from '@/client/assets/hermes.png'
|
|
14
|
-
import openaiIcon from '@/client/assets/openai.svg'
|
|
15
|
-
import openclawIcon from '@/client/assets/openclaw.svg'
|
|
16
|
-
import { Button } from '@/client/components/ui/button'
|
|
17
|
-
import {
|
|
18
|
-
Dialog,
|
|
19
|
-
DialogClose,
|
|
20
|
-
DialogContent,
|
|
21
|
-
DialogDescription,
|
|
22
|
-
DialogTitle,
|
|
23
|
-
DialogTrigger
|
|
24
|
-
} from '@/client/components/ui/dialog'
|
|
25
|
-
import { useAppConfig } from '@/client/api/app-config'
|
|
26
|
-
|
|
27
|
-
// The canonical setup prompt from moi.computer — pasted into any agent, it
|
|
28
|
-
// fetches INSTALL.md and walks itself through the install.
|
|
29
|
-
const AGENT_COMMAND =
|
|
30
|
-
'Set up the moi workspace for this project. Fetch https://moi.computer/INSTALL.md, and follow the steps.'
|
|
31
|
-
|
|
32
|
-
type InstallMoiDialogProps = {
|
|
33
|
-
// Trigger-owned (uncontrolled) or controlled via open/onOpenChange — the
|
|
34
|
-
// create-workspace buttons use the former, programmatic opens the latter.
|
|
35
|
-
trigger?: ReactElement
|
|
36
|
-
open?: boolean
|
|
37
|
-
onOpenChange?: (open: boolean) => void
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Shown in the cloud demo wherever a workspace would be created: the demo is
|
|
41
|
-
// limited to its built-in workspaces, and the way out is installing moi.
|
|
42
|
-
export function InstallMoiDialog({ trigger, open, onOpenChange }: InstallMoiDialogProps) {
|
|
43
|
-
return (
|
|
44
|
-
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
45
|
-
{trigger && <DialogTrigger render={trigger} />}
|
|
46
|
-
<InstallMoiDialogContent />
|
|
47
|
-
</Dialog>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Hero artwork: a floppy disk cropped by the band, on a soft gradient. The
|
|
52
|
-
// gradient's raw colors are a deliberate owner-approved exception to the
|
|
53
|
-
// semantic-token rule — this block is an illustration (constant across
|
|
54
|
-
// themes), not a UI surface.
|
|
55
|
-
function FloppyHero() {
|
|
56
|
-
return (
|
|
57
|
-
<div className="relative h-44 overflow-hidden rounded-lg bg-[#e6dcc4] bg-[image:radial-gradient(75%_110%_at_0%_0%,#e0742f_0%,rgba(224,116,47,0)_48%),radial-gradient(110%_160%_at_100%_0%,#16352a_0%,rgba(22,53,42,0)_60%),radial-gradient(70%_90%_at_90%_100%,#8fb492_0%,rgba(143,180,146,0)_55%),radial-gradient(60%_80%_at_8%_100%,#dcc294_0%,rgba(220,194,148,0)_52%)]">
|
|
58
|
-
<FloppyDisk className="absolute top-9 left-1/2 w-52 -translate-x-1/2 -rotate-6 drop-shadow-xl" />
|
|
59
|
-
{/* film grain, keeps the flat gradients from banding */}
|
|
60
|
-
<svg
|
|
61
|
-
className="absolute inset-0 size-full opacity-30 mix-blend-soft-light"
|
|
62
|
-
aria-hidden="true"
|
|
63
|
-
>
|
|
64
|
-
<filter id="floppy-grain">
|
|
65
|
-
<feTurbulence
|
|
66
|
-
type="fractalNoise"
|
|
67
|
-
baseFrequency="0.8"
|
|
68
|
-
numOctaves="2"
|
|
69
|
-
stitchTiles="stitch"
|
|
70
|
-
/>
|
|
71
|
-
</filter>
|
|
72
|
-
<rect width="100%" height="100%" filter="url(#floppy-grain)" />
|
|
73
|
-
</svg>
|
|
74
|
-
</div>
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
type FloppyDiskProps = {
|
|
79
|
-
className?: string
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Front view of a 3.5" floppy: shutter with window, insert arrow, label
|
|
83
|
-
// area, write-protect holes. Drawn inline so it stays crisp and asset-free.
|
|
84
|
-
function FloppyDisk({ className }: FloppyDiskProps) {
|
|
85
|
-
return (
|
|
86
|
-
<svg viewBox="0 0 200 200" aria-hidden="true" className={className}>
|
|
87
|
-
<defs>
|
|
88
|
-
<linearGradient id="floppy-shutter" x1="0" y1="0" x2="0" y2="1">
|
|
89
|
-
<stop offset="0" stopColor="#e3e3e1" />
|
|
90
|
-
<stop offset="0.5" stopColor="#c8c8c6" />
|
|
91
|
-
<stop offset="1" stopColor="#aeaeac" />
|
|
92
|
-
</linearGradient>
|
|
93
|
-
</defs>
|
|
94
|
-
{/* body with clipped top-right corner */}
|
|
95
|
-
<path
|
|
96
|
-
d="M14 2h146l26 26v160a10 10 0 0 1-10 10H14A10 10 0 0 1 4 188V12A10 10 0 0 1 14 2Z"
|
|
97
|
-
fill="#1a1b1d"
|
|
98
|
-
/>
|
|
99
|
-
<path
|
|
100
|
-
d="M14 2h146l26 26v160a10 10 0 0 1-10 10H14A10 10 0 0 1 4 188V12A10 10 0 0 1 14 2Z"
|
|
101
|
-
fill="none"
|
|
102
|
-
stroke="#ffffff"
|
|
103
|
-
strokeOpacity="0.08"
|
|
104
|
-
strokeWidth="1.5"
|
|
105
|
-
/>
|
|
106
|
-
{/* shutter */}
|
|
107
|
-
<path d="M64 2h96v66a6 6 0 0 1-6 6H70a6 6 0 0 1-6-6V2Z" fill="url(#floppy-shutter)" />
|
|
108
|
-
<rect x="116" y="12" width="28" height="52" rx="3" fill="#191a1c" />
|
|
109
|
-
{/* insert arrow */}
|
|
110
|
-
<path d="M26 30 34 16l8 14h-5v14h-6V30Z" fill="#0e0f10" />
|
|
111
|
-
{/* label area */}
|
|
112
|
-
<rect
|
|
113
|
-
x="22"
|
|
114
|
-
y="92"
|
|
115
|
-
width="156"
|
|
116
|
-
height="106"
|
|
117
|
-
rx="8"
|
|
118
|
-
fill="#202124"
|
|
119
|
-
stroke="#ffffff"
|
|
120
|
-
strokeOpacity="0.05"
|
|
121
|
-
/>
|
|
122
|
-
{/* write-protect holes */}
|
|
123
|
-
<rect x="14" y="168" width="13" height="13" rx="2" fill="#0c0d0e" />
|
|
124
|
-
<rect x="172" y="168" width="13" height="13" rx="2" fill="#0c0d0e" />
|
|
125
|
-
<rect x="175" y="171" width="7" height="7" rx="1" fill="#e6e6e4" />
|
|
126
|
-
</svg>
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function useCopyCommand() {
|
|
131
|
-
const [copied, setCopied] = useState(false)
|
|
132
|
-
|
|
133
|
-
useEffect(() => {
|
|
134
|
-
if (!copied) return
|
|
135
|
-
const t = setTimeout(() => setCopied(false), 1500)
|
|
136
|
-
return () => clearTimeout(t)
|
|
137
|
-
}, [copied])
|
|
138
|
-
|
|
139
|
-
const copy = () => {
|
|
140
|
-
navigator.clipboard
|
|
141
|
-
?.writeText(AGENT_COMMAND)
|
|
142
|
-
.then(() => setCopied(true))
|
|
143
|
-
.catch(() => {})
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return { copied, copy }
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function InstallMoiDialogContent() {
|
|
150
|
-
const { demoInstallUrl } = useAppConfig()
|
|
151
|
-
const { copied, copy } = useCopyCommand()
|
|
152
|
-
|
|
153
|
-
return (
|
|
154
|
-
<DialogContent className="w-[calc(100%-2rem)] max-w-md">
|
|
155
|
-
<div className="p-2">
|
|
156
|
-
<FloppyHero />
|
|
157
|
-
</div>
|
|
158
|
-
<DialogClose
|
|
159
|
-
render={
|
|
160
|
-
<Button
|
|
161
|
-
variant="ghost"
|
|
162
|
-
size="icon-sm"
|
|
163
|
-
aria-label="Close"
|
|
164
|
-
className="absolute top-4 right-4 text-white hover:bg-white/20 hover:text-white"
|
|
165
|
-
>
|
|
166
|
-
<IconX stroke={1.75} />
|
|
167
|
-
</Button>
|
|
168
|
-
}
|
|
169
|
-
/>
|
|
170
|
-
|
|
171
|
-
<div className="flex flex-col gap-5 p-6 pt-3">
|
|
172
|
-
<div className="flex flex-col gap-0.5">
|
|
173
|
-
<DialogTitle>Use moi with your projects</DialogTitle>
|
|
174
|
-
<DialogDescription>
|
|
175
|
-
This demo comes with sample workspaces. Connect moi to your agent to unlock all
|
|
176
|
-
features.
|
|
177
|
-
</DialogDescription>
|
|
178
|
-
</div>
|
|
179
|
-
|
|
180
|
-
<ul className="flex flex-col gap-3">
|
|
181
|
-
<li className="flex items-center gap-3">
|
|
182
|
-
<span className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted">
|
|
183
|
-
<IconFolders size={20} stroke={1.5} />
|
|
184
|
-
</span>
|
|
185
|
-
<span className="text-sm text-foreground">
|
|
186
|
-
Connect your own data and import existing projects
|
|
187
|
-
</span>
|
|
188
|
-
</li>
|
|
189
|
-
<li className="flex items-center gap-3">
|
|
190
|
-
<span className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted">
|
|
191
|
-
<IconTerminal2 size={20} stroke={1.5} />
|
|
192
|
-
</span>
|
|
193
|
-
<span className="flex flex-wrap items-center gap-x-1 gap-y-0.5 text-sm text-foreground">
|
|
194
|
-
<span>Works with</span>
|
|
195
|
-
<span className="inline-flex items-center gap-1 font-medium">
|
|
196
|
-
<img src={claudeIcon} alt="" className="size-4 object-contain" />
|
|
197
|
-
Claude Code,
|
|
198
|
-
</span>
|
|
199
|
-
<span className="inline-flex items-center gap-1 font-medium">
|
|
200
|
-
<img src={openaiIcon} alt="" className="size-4 object-contain" />
|
|
201
|
-
Codex,
|
|
202
|
-
</span>
|
|
203
|
-
<span className="inline-flex items-center gap-1 font-medium">
|
|
204
|
-
<img src={hermesIcon} alt="" className="size-4 object-contain" />
|
|
205
|
-
Hermes,
|
|
206
|
-
</span>
|
|
207
|
-
<span className="inline-flex items-center gap-1 font-medium">
|
|
208
|
-
<img src={openclawIcon} alt="" className="size-4 object-contain" />
|
|
209
|
-
OpenClaw,
|
|
210
|
-
</span>
|
|
211
|
-
<span>and more.</span>
|
|
212
|
-
</span>
|
|
213
|
-
</li>
|
|
214
|
-
</ul>
|
|
215
|
-
|
|
216
|
-
<div className="flex flex-col gap-2">
|
|
217
|
-
<p className="text-sm text-muted-foreground">Paste this prompt into your agent:</p>
|
|
218
|
-
<div className="rounded-lg bg-muted p-3">
|
|
219
|
-
<code className="block font-mono text-sm leading-relaxed text-foreground">
|
|
220
|
-
{AGENT_COMMAND}
|
|
221
|
-
</code>
|
|
222
|
-
<div className="mt-5 flex flex-wrap items-center gap-2">
|
|
223
|
-
<Button type="button" onClick={copy}>
|
|
224
|
-
{copied ? (
|
|
225
|
-
<IconCheck data-icon="inline-start" stroke={1.5} />
|
|
226
|
-
) : (
|
|
227
|
-
<IconCopy data-icon="inline-start" stroke={1.5} />
|
|
228
|
-
)}
|
|
229
|
-
{copied ? 'Copied' : 'Copy installation prompt'}
|
|
230
|
-
</Button>
|
|
231
|
-
<Button
|
|
232
|
-
variant="secondary"
|
|
233
|
-
nativeButton={false}
|
|
234
|
-
render={<a href={demoInstallUrl} target="_blank" rel="noreferrer" />}
|
|
235
|
-
>
|
|
236
|
-
Learn more
|
|
237
|
-
<IconArrowUpRight data-icon="inline-end" stroke={1.5} />
|
|
238
|
-
</Button>
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
</div>
|
|
242
|
-
</div>
|
|
243
|
-
</DialogContent>
|
|
244
|
-
)
|
|
245
|
-
}
|
package/dist/chunk-87q78504.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Vc as r}from"/chunk-zbeq02yc.js";if(typeof globalThis.structuredClone==="function")globalThis.structuredClone=globalThis.structuredClone.bind(globalThis);async function o(a){let[{mount:t}]=await Promise.all([import("/chunk-n8tq2494.js"),import("/chunk-cagtq45k.js").then((e)=>e.loadAppConfig())]);t(a)}globalThis.__init=o;
|
package/dist/chunk-8s41nd3g.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"/chunk-pcnahct1.js";import"/chunk-zbeq02yc.js";export{a as sanitizeSvg};
|
package/dist/chunk-cagtq45k.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Mc as a,Nc as b}from"/chunk-zbt8emsw.js";import"/chunk-zfz3b4xg.js";import"/chunk-zbeq02yc.js";export{b as useAppConfig,a as loadAppConfig};
|