openpalm 0.9.3 → 0.9.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/README.md +40 -12
- package/package.json +2 -1
- package/src/commands/install.ts +124 -19
- package/src/commands/logs.ts +4 -15
- package/src/commands/restart.ts +39 -11
- package/src/commands/service.ts +29 -3
- package/src/commands/start.ts +47 -16
- package/src/commands/status.ts +13 -2
- package/src/commands/stop.ts +36 -11
- package/src/commands/uninstall.ts +28 -3
- package/src/commands/update.ts +22 -2
- package/src/lib/admin.ts +27 -2
- package/src/lib/docker.ts +27 -100
- package/src/lib/paths.ts +13 -23
- package/src/lib/staging.ts +72 -0
- package/src/lib/varlock.ts +8 -0
- package/src/main.test.ts +7 -2
- package/src/setup-wizard/index.html +349 -0
- package/src/setup-wizard/server.test.ts +347 -0
- package/src/setup-wizard/server.ts +297 -0
- package/src/setup-wizard/wizard.css +952 -0
- package/src/setup-wizard/wizard.js +1104 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>OpenPalm Setup Wizard</title>
|
|
7
|
+
<link rel="stylesheet" href="/setup/wizard.css">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main class="setup-page" aria-label="Setup wizard">
|
|
11
|
+
<div class="wizard-card">
|
|
12
|
+
|
|
13
|
+
<!-- ── Header ─────────────────────────────────────────────── -->
|
|
14
|
+
<div class="wizard-header">
|
|
15
|
+
<h1>OpenPalm Setup</h1>
|
|
16
|
+
<p class="wizard-subtitle">Configure your stack in a few steps.</p>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="wizard-body">
|
|
20
|
+
|
|
21
|
+
<!-- ── Step Indicators ────────────────────────────────────── -->
|
|
22
|
+
<nav class="step-indicators" aria-label="Wizard steps" id="step-indicators">
|
|
23
|
+
<button class="step-dot active" data-step="0" aria-label="Step 1: Welcome" aria-current="step">1</button>
|
|
24
|
+
<span class="step-line" data-line="0"></span>
|
|
25
|
+
<button class="step-dot" data-step="1" aria-label="Step 2: Connections" disabled>2</button>
|
|
26
|
+
<span class="step-line" data-line="1"></span>
|
|
27
|
+
<button class="step-dot" data-step="2" aria-label="Step 3: Models" disabled>3</button>
|
|
28
|
+
<span class="step-line" data-line="2"></span>
|
|
29
|
+
<button class="step-dot" data-step="3" aria-label="Step 4: Options" disabled>4</button>
|
|
30
|
+
<span class="step-line" data-line="3"></span>
|
|
31
|
+
<button class="step-dot" data-step="4" aria-label="Step 5: Review" disabled>5</button>
|
|
32
|
+
</nav>
|
|
33
|
+
|
|
34
|
+
<!-- ═══════════════════════════════════════════════════════════
|
|
35
|
+
Step 0: Welcome & Admin Token
|
|
36
|
+
═══════════════════════════════════════════════════════════ -->
|
|
37
|
+
<section class="step-content" id="step-0" data-testid="step-welcome">
|
|
38
|
+
<h2>Welcome</h2>
|
|
39
|
+
<p class="step-description">Set up your admin credentials, then connect your AI providers and choose default models.</p>
|
|
40
|
+
|
|
41
|
+
<div class="field-group">
|
|
42
|
+
<label for="admin-token">Admin Token</label>
|
|
43
|
+
<input id="admin-token" type="text" autocomplete="off" placeholder="Min 8 characters">
|
|
44
|
+
<p class="field-hint">Protects the admin console. A random token has been generated for you.</p>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="field-group">
|
|
48
|
+
<label for="owner-name">Your Name <span style="color:var(--color-text-tertiary);font-weight:normal">(optional)</span></label>
|
|
49
|
+
<input id="owner-name" type="text" placeholder="Jane Doe" autocomplete="name">
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div class="field-group">
|
|
53
|
+
<label for="owner-email">Email <span style="color:var(--color-text-tertiary);font-weight:normal">(optional)</span></label>
|
|
54
|
+
<input id="owner-email" type="email" placeholder="jane@example.com" autocomplete="email">
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div id="step0-error" class="field-error hidden" role="alert"></div>
|
|
58
|
+
|
|
59
|
+
<div class="step-actions">
|
|
60
|
+
<button class="btn btn-primary" id="btn-step0-next">Next</button>
|
|
61
|
+
</div>
|
|
62
|
+
</section>
|
|
63
|
+
|
|
64
|
+
<!-- ═══════════════════════════════════════════════════════════
|
|
65
|
+
Step 1: Connection Setup
|
|
66
|
+
═══════════════════════════════════════════════════════════ -->
|
|
67
|
+
<section class="step-content hidden" id="step-1" data-testid="step-connections">
|
|
68
|
+
<h2>Connections</h2>
|
|
69
|
+
<p class="step-description">Add one or more model endpoints. Mix local and cloud providers as you like.</p>
|
|
70
|
+
|
|
71
|
+
<!-- Existing connections list -->
|
|
72
|
+
<ul class="hub-list hidden" id="conn-hub-list" aria-label="Connections"></ul>
|
|
73
|
+
|
|
74
|
+
<!-- Empty state -->
|
|
75
|
+
<div class="hub-empty" id="conn-hub-empty">
|
|
76
|
+
<p class="hub-empty-headline">No connections yet</p>
|
|
77
|
+
<p class="hub-empty-body">Add a cloud API provider or a local model server to get started.</p>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<!-- Loading state for provider detection -->
|
|
81
|
+
<div class="loading-state hidden" id="conn-detecting">
|
|
82
|
+
<span class="spinner"></span> Detecting local providers...
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<!-- Add connection type cards -->
|
|
86
|
+
<div id="conn-type-chooser" class="hidden">
|
|
87
|
+
<button class="conn-card" type="button" id="btn-add-cloud">
|
|
88
|
+
<div class="conn-icon conn-icon--cloud" aria-hidden="true">
|
|
89
|
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"/></svg>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="conn-body">
|
|
92
|
+
<span class="conn-label">Cloud Provider <span class="conn-badge">Hosted</span></span>
|
|
93
|
+
<span class="conn-desc">OpenAI, Anthropic, Groq, Together, Mistral, DeepSeek, xAI</span>
|
|
94
|
+
</div>
|
|
95
|
+
<div class="conn-arrow" aria-hidden="true">
|
|
96
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>
|
|
97
|
+
</div>
|
|
98
|
+
</button>
|
|
99
|
+
<button class="conn-card" type="button" id="btn-add-local">
|
|
100
|
+
<div class="conn-icon conn-icon--local" aria-hidden="true">
|
|
101
|
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="20" height="8" rx="2"/><rect x="2" y="14" width="20" height="8" rx="2"/><circle cx="6" cy="6" r="1" fill="currentColor" stroke="none"/><circle cx="6" cy="18" r="1" fill="currentColor" stroke="none"/></svg>
|
|
102
|
+
</div>
|
|
103
|
+
<div class="conn-body">
|
|
104
|
+
<span class="conn-label">Local Provider <span class="conn-badge conn-badge--local">On-Device</span></span>
|
|
105
|
+
<span class="conn-desc">Ollama, Docker Model Runner, LM Studio running locally</span>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="conn-arrow" aria-hidden="true">
|
|
108
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>
|
|
109
|
+
</div>
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<!-- Connection detail form (shared for cloud and local) -->
|
|
114
|
+
<div id="conn-detail-form" class="hidden">
|
|
115
|
+
<div class="connection-mode-card" id="conn-mode-card">
|
|
116
|
+
<div class="connection-mode-header">
|
|
117
|
+
<span class="connection-mode-badge" id="conn-mode-badge"></span>
|
|
118
|
+
<h3 id="conn-mode-title"></h3>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<!-- Cloud: provider quick-picks -->
|
|
123
|
+
<div class="provider-quick-picks hidden" id="cloud-provider-picks"></div>
|
|
124
|
+
|
|
125
|
+
<!-- Local: detected providers -->
|
|
126
|
+
<div id="local-provider-list" class="hidden"></div>
|
|
127
|
+
|
|
128
|
+
<div class="field-group">
|
|
129
|
+
<label for="conn-name">Connection Name</label>
|
|
130
|
+
<input id="conn-name" type="text" placeholder='e.g. "My Ollama", "Work OpenAI"'>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<div class="field-group">
|
|
134
|
+
<label for="conn-base-url">Base URL</label>
|
|
135
|
+
<input id="conn-base-url" type="url" placeholder="https://api.openai.com">
|
|
136
|
+
<p class="field-hint">The provider endpoint. Do not include a trailing /v1.</p>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="field-group hidden" id="conn-apikey-group">
|
|
140
|
+
<label for="conn-api-key">API Key</label>
|
|
141
|
+
<input id="conn-api-key" type="password" placeholder="sk-..." autocomplete="new-password">
|
|
142
|
+
<p class="field-hint">Stored server-side only.</p>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<div id="conn-detail-error" class="field-error hidden" role="alert"></div>
|
|
146
|
+
|
|
147
|
+
<div class="connection-success hidden" id="conn-test-success" role="status">
|
|
148
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="var(--color-success)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
|
|
149
|
+
<span id="conn-test-msg">Connected</span>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<div class="step-actions">
|
|
153
|
+
<button class="btn btn-secondary" id="btn-conn-cancel">Cancel</button>
|
|
154
|
+
<button class="btn btn-outline" id="btn-conn-test">Test</button>
|
|
155
|
+
<button class="btn btn-primary" id="btn-conn-save">Save Connection</button>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<!-- Main step actions (shown when not adding a connection) -->
|
|
160
|
+
<div class="step-actions" id="step1-actions">
|
|
161
|
+
<button class="btn btn-secondary" id="btn-step1-back">Back</button>
|
|
162
|
+
<button class="btn btn-outline" id="btn-step1-add">Add Connection</button>
|
|
163
|
+
<button class="btn btn-primary" id="btn-step1-next" disabled>Next</button>
|
|
164
|
+
</div>
|
|
165
|
+
</section>
|
|
166
|
+
|
|
167
|
+
<!-- ═══════════════════════════════════════════════════════════
|
|
168
|
+
Step 2: Model Assignment
|
|
169
|
+
═══════════════════════════════════════════════════════════ -->
|
|
170
|
+
<section class="step-content hidden" id="step-2" data-testid="step-models">
|
|
171
|
+
<h2>Model Assignment</h2>
|
|
172
|
+
<p class="step-description">Choose default models for chat and embeddings.</p>
|
|
173
|
+
|
|
174
|
+
<!-- LLM Card -->
|
|
175
|
+
<div class="model-card">
|
|
176
|
+
<div class="model-card-header">
|
|
177
|
+
<span class="model-card-title">Chat Model (LLM)</span>
|
|
178
|
+
<span class="model-card-help">Used for conversations, tool calls, and reasoning.</span>
|
|
179
|
+
</div>
|
|
180
|
+
<div class="field-group">
|
|
181
|
+
<label for="llm-connection">Connection</label>
|
|
182
|
+
<select id="llm-connection">
|
|
183
|
+
<option value="" disabled selected>Select a connection</option>
|
|
184
|
+
</select>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="field-group">
|
|
187
|
+
<label for="llm-model">Model</label>
|
|
188
|
+
<select id="llm-model"><option value="">Loading...</option></select>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="field-group">
|
|
191
|
+
<label for="llm-small-model">Small Model <span style="color:var(--color-text-tertiary);font-weight:normal">(optional)</span></label>
|
|
192
|
+
<select id="llm-small-model"><option value="">(same as chat model)</option></select>
|
|
193
|
+
<p class="field-hint">Used for lightweight tasks like memory extraction.</p>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
<!-- Embeddings Card -->
|
|
198
|
+
<div class="model-card">
|
|
199
|
+
<div class="model-card-header">
|
|
200
|
+
<span class="model-card-title">Embeddings</span>
|
|
201
|
+
<span class="model-card-help">Used for vector search and memory.</span>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="field-group">
|
|
204
|
+
<label for="emb-connection">Connection</label>
|
|
205
|
+
<select id="emb-connection">
|
|
206
|
+
<option value="" disabled selected>Select a connection</option>
|
|
207
|
+
</select>
|
|
208
|
+
</div>
|
|
209
|
+
<div class="field-group">
|
|
210
|
+
<label for="emb-model">Embedding Model</label>
|
|
211
|
+
<select id="emb-model"><option value="">Loading...</option></select>
|
|
212
|
+
</div>
|
|
213
|
+
<div class="field-group">
|
|
214
|
+
<label for="emb-dims">Embedding Dimensions</label>
|
|
215
|
+
<input id="emb-dims" type="number" value="1536" min="1" step="1">
|
|
216
|
+
<p class="field-hint">Set automatically for known models. Override only if needed.</p>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
<button class="add-connection-link" type="button" id="btn-models-add-conn">Need another connection?</button>
|
|
221
|
+
|
|
222
|
+
<div id="step2-error" class="field-error hidden" role="alert"></div>
|
|
223
|
+
|
|
224
|
+
<div class="step-actions">
|
|
225
|
+
<button class="btn btn-secondary" id="btn-step2-back">Back</button>
|
|
226
|
+
<button class="btn btn-primary" id="btn-step2-next">Next</button>
|
|
227
|
+
</div>
|
|
228
|
+
</section>
|
|
229
|
+
|
|
230
|
+
<!-- ═══════════════════════════════════════════════════════════
|
|
231
|
+
Step 3: Options
|
|
232
|
+
═══════════════════════════════════════════════════════════ -->
|
|
233
|
+
<section class="step-content hidden" id="step-3" data-testid="step-options">
|
|
234
|
+
<h2>Options</h2>
|
|
235
|
+
<p class="step-description">Tweak optional settings before review.</p>
|
|
236
|
+
|
|
237
|
+
<!-- Ollama in-stack toggle (only shown when relevant) -->
|
|
238
|
+
<div class="addon-row hidden" id="ollama-addon">
|
|
239
|
+
<div class="addon-toggle-row">
|
|
240
|
+
<label class="addon-toggle-label">
|
|
241
|
+
<input type="checkbox" id="ollama-enabled">
|
|
242
|
+
<span class="addon-label-text">Run Ollama inside the stack</span>
|
|
243
|
+
</label>
|
|
244
|
+
<span class="addon-help">Adds an Ollama container to the compose stack so you do not need a separate install.</span>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
<div class="field-group">
|
|
249
|
+
<label for="memory-user-id">Memory User ID</label>
|
|
250
|
+
<input id="memory-user-id" type="text" placeholder="default_user">
|
|
251
|
+
<p class="field-hint">Identifies the memory owner. Defaults to your email or "default_user".</p>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
<div class="step-actions">
|
|
255
|
+
<button class="btn btn-secondary" id="btn-step3-back">Back</button>
|
|
256
|
+
<button class="btn btn-primary" id="btn-step3-next">Next</button>
|
|
257
|
+
</div>
|
|
258
|
+
</section>
|
|
259
|
+
|
|
260
|
+
<!-- ═══════════════════════════════════════════════════════════
|
|
261
|
+
Step 4: Review & Install
|
|
262
|
+
═══════════════════════════════════════════════════════════ -->
|
|
263
|
+
<section class="step-content hidden" id="step-4" data-testid="step-review">
|
|
264
|
+
<h2>Review & Install</h2>
|
|
265
|
+
<p class="step-description">Confirm your settings, then install.</p>
|
|
266
|
+
|
|
267
|
+
<div class="review-grid" id="review-grid"></div>
|
|
268
|
+
|
|
269
|
+
<div id="install-error" class="install-error hidden" role="alert"></div>
|
|
270
|
+
|
|
271
|
+
<div class="step-actions" id="review-actions">
|
|
272
|
+
<button class="btn btn-secondary" id="btn-step4-back">Back</button>
|
|
273
|
+
<button class="btn btn-primary" id="btn-install">Install</button>
|
|
274
|
+
</div>
|
|
275
|
+
</section>
|
|
276
|
+
|
|
277
|
+
<!-- ═══════════════════════════════════════════════════════════
|
|
278
|
+
Deploy Status Screen
|
|
279
|
+
═══════════════════════════════════════════════════════════ -->
|
|
280
|
+
<section class="step-content hidden" id="step-deploy" data-testid="step-deploy">
|
|
281
|
+
<div class="deploy-header">
|
|
282
|
+
<h2 id="deploy-title">Deploying...</h2>
|
|
283
|
+
<p class="step-description" id="deploy-subtitle">Writing configuration and starting services.</p>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
<div class="deploy-progress-summary">
|
|
287
|
+
<div class="deploy-progress-meta">
|
|
288
|
+
<span class="deploy-progress-label" id="deploy-progress-label">Progress</span>
|
|
289
|
+
<span class="deploy-progress-value" id="deploy-progress-value">0%</span>
|
|
290
|
+
</div>
|
|
291
|
+
<div class="deploy-progress-bar">
|
|
292
|
+
<div class="deploy-progress-fill" id="deploy-progress-fill" style="width:0%"></div>
|
|
293
|
+
</div>
|
|
294
|
+
<p class="deploy-progress-note hidden" id="deploy-progress-note"></p>
|
|
295
|
+
</div>
|
|
296
|
+
|
|
297
|
+
<div class="deploy-services" id="deploy-services"></div>
|
|
298
|
+
|
|
299
|
+
<!-- Error card -->
|
|
300
|
+
<div class="deploy-failure-card hidden" id="deploy-failure" role="alert" aria-label="Deployment failure">
|
|
301
|
+
<div class="deploy-failure-header">
|
|
302
|
+
<span class="deploy-failure-kicker">Error</span>
|
|
303
|
+
<h3 id="deploy-failure-title">Deployment failed</h3>
|
|
304
|
+
</div>
|
|
305
|
+
<p class="deploy-failure-summary" id="deploy-failure-summary"></p>
|
|
306
|
+
<details class="deploy-error-details">
|
|
307
|
+
<summary>Technical details</summary>
|
|
308
|
+
<pre id="deploy-error-pre"></pre>
|
|
309
|
+
</details>
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
<!-- Tips -->
|
|
313
|
+
<aside class="deploy-tips" id="deploy-tips" aria-label="Startup tips">
|
|
314
|
+
<div class="deploy-tips-header">
|
|
315
|
+
<span class="deploy-tips-kicker">Tips</span>
|
|
316
|
+
<h3>First startup takes a few minutes</h3>
|
|
317
|
+
</div>
|
|
318
|
+
<ul>
|
|
319
|
+
<li>Container images are being downloaded for the first time.</li>
|
|
320
|
+
<li>The admin console will be available once all services are healthy.</li>
|
|
321
|
+
<li>You can close this page; setup will continue in the background.</li>
|
|
322
|
+
</ul>
|
|
323
|
+
</aside>
|
|
324
|
+
|
|
325
|
+
<!-- Done state -->
|
|
326
|
+
<div class="done-state hidden" id="deploy-done">
|
|
327
|
+
<div class="done-icon">
|
|
328
|
+
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="var(--color-success)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
|
|
329
|
+
</div>
|
|
330
|
+
<h2>Setup Complete</h2>
|
|
331
|
+
<p class="done-subtitle">Your OpenPalm stack is up and running.</p>
|
|
332
|
+
<ul class="service-list" id="deploy-service-list"></ul>
|
|
333
|
+
<a href="/" class="btn btn-primary">Open Console</a>
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
<!-- Deploy error actions -->
|
|
337
|
+
<div class="step-actions hidden" id="deploy-error-actions">
|
|
338
|
+
<button class="btn btn-secondary" id="btn-deploy-back">Back to Review</button>
|
|
339
|
+
<button class="btn btn-primary" id="btn-deploy-retry">Retry</button>
|
|
340
|
+
</div>
|
|
341
|
+
</section>
|
|
342
|
+
|
|
343
|
+
</div><!-- .wizard-body -->
|
|
344
|
+
</div><!-- .wizard-card -->
|
|
345
|
+
</main>
|
|
346
|
+
|
|
347
|
+
<script src="/setup/wizard.js"></script>
|
|
348
|
+
</body>
|
|
349
|
+
</html>
|