mop-agent 0.1.3 → 0.1.4
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 +1 -1
- package/apps/web/app/setup/page.tsx +1 -15
- package/apps/web/server.ts +12 -2
- package/installer/mop-agent.mjs +9 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ through MOP-FLOW. It stores project memory, performs semantic recall and
|
|
|
5
5
|
consolidation, serves grounded chat, and can request approved actions from a
|
|
6
6
|
linked FLOW node.
|
|
7
7
|
|
|
8
|
-
> **Release status:** npm package `mop-agent@0.1.
|
|
8
|
+
> **Release status:** npm package `mop-agent@0.1.4` contains the corrected VPS
|
|
9
9
|
> installer and first-run Admin/Assistant flow. The canonical installation command is
|
|
10
10
|
> exactly `npx mop-agent`.
|
|
11
11
|
|
|
@@ -58,19 +58,7 @@ export default function SetupPage() {
|
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
60
|
<main style={shell}>
|
|
61
|
-
<section style={brandPanel}
|
|
62
|
-
<div style={logo}>M</div>
|
|
63
|
-
<p style={eyebrow}>SELF-HOSTED AI ASSISTANT</p>
|
|
64
|
-
<h1 style={{ fontSize: "clamp(32px, 5vw, 52px)", lineHeight: 1.05, margin: "12px 0 18px" }}>
|
|
65
|
-
Your assistant.<br />Your server. Your memory.
|
|
66
|
-
</h1>
|
|
67
|
-
<p style={{ color: "#9aa8bd", fontSize: 17, lineHeight: 1.7, maxWidth: 520 }}>
|
|
68
|
-
MOP-AGENT gives you one private assistant across your projects. Brain is the memory layer behind it—not the first hurdle.
|
|
69
|
-
</p>
|
|
70
|
-
<div style={featureRow}>
|
|
71
|
-
<span>◆ Private</span><span>◆ Persistent memory</span><span>◆ Cross-project</span>
|
|
72
|
-
</div>
|
|
73
|
-
</section>
|
|
61
|
+
<section style={brandPanel} aria-hidden="true" />
|
|
74
62
|
|
|
75
63
|
<section style={formWrap}>
|
|
76
64
|
<div style={formCard}>
|
|
@@ -123,9 +111,7 @@ const shell: React.CSSProperties = { minHeight: "100vh", display: "grid", gridTe
|
|
|
123
111
|
const brandPanel: React.CSSProperties = { padding: "clamp(48px, 8vw, 110px)", display: "flex", flexDirection: "column", justifyContent: "center" };
|
|
124
112
|
const formWrap: React.CSSProperties = { display: "flex", alignItems: "center", justifyContent: "center", padding: 28, background: "rgba(5, 8, 13, .58)", borderLeft: "1px solid #1b2637" };
|
|
125
113
|
const formCard: React.CSSProperties = { width: "min(100%, 430px)", padding: "38px 34px", border: "1px solid #243149", borderRadius: 18, background: "rgba(13, 19, 30, .94)", boxShadow: "0 24px 80px rgba(0,0,0,.35)" };
|
|
126
|
-
const logo: React.CSSProperties = { width: 48, height: 48, borderRadius: 14, display: "grid", placeItems: "center", fontSize: 22, fontWeight: 800, background: "linear-gradient(135deg, #4f7cff, #8f5cff)", boxShadow: "0 10px 32px rgba(79,124,255,.32)" };
|
|
127
114
|
const eyebrow: React.CSSProperties = { margin: "20px 0 0", color: "#7d9dff", fontSize: 12, fontWeight: 800, letterSpacing: ".16em" };
|
|
128
|
-
const featureRow: React.CSSProperties = { display: "flex", flexWrap: "wrap", gap: 20, color: "#8695aa", fontSize: 13, marginTop: 34 };
|
|
129
115
|
const label: React.CSSProperties = { display: "grid", gap: 7, color: "#bac6d8", fontSize: 13, fontWeight: 650 };
|
|
130
116
|
const inputStyle: React.CSSProperties = { padding: "12px 13px", borderRadius: 9, border: "1px solid #2a3951", outline: "none", background: "#0c121d", color: "#eef3fa", fontSize: 15 };
|
|
131
117
|
const buttonStyle: React.CSSProperties = { marginTop: 4, padding: "12px 14px", borderRadius: 9, border: "1px solid #5278ff", background: "linear-gradient(135deg, #416cff, #6d54e8)", color: "white", fontWeight: 750, fontSize: 15, cursor: "pointer" };
|
package/apps/web/server.ts
CHANGED
|
@@ -7,14 +7,19 @@ import next from "next";
|
|
|
7
7
|
import { attachGateway } from "./lib/ws/gateway.js";
|
|
8
8
|
import { startChannels } from "./lib/channels/index.js";
|
|
9
9
|
import { startScheduler } from "./lib/brain/scheduler.js";
|
|
10
|
+
import { runAllMigrations } from "./lib/db/migrate.js";
|
|
10
11
|
|
|
11
12
|
const dev = process.env.NODE_ENV !== "production";
|
|
12
13
|
const port = Number(process.env.PORT ?? 3000);
|
|
13
14
|
|
|
14
15
|
const app = next({ dev });
|
|
15
|
-
const handle = app.getRequestHandler();
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
async function start() {
|
|
18
|
+
// Never accept auth/API traffic before both application and Better Auth
|
|
19
|
+
// tables exist. This also makes service restarts repair missed migrations.
|
|
20
|
+
await runAllMigrations();
|
|
21
|
+
await app.prepare();
|
|
22
|
+
const handle = app.getRequestHandler();
|
|
18
23
|
const server = createServer((req, res) => handle(req, res));
|
|
19
24
|
attachGateway(server);
|
|
20
25
|
server.listen(port, async () => {
|
|
@@ -24,4 +29,9 @@ app.prepare().then(() => {
|
|
|
24
29
|
const jobs = startScheduler();
|
|
25
30
|
if (jobs.length) console.log(`scheduler: ${jobs.join(", ")}`);
|
|
26
31
|
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
start().catch((error) => {
|
|
35
|
+
console.error("MOP-AGENT failed to start:", error);
|
|
36
|
+
process.exit(1);
|
|
27
37
|
});
|
package/installer/mop-agent.mjs
CHANGED
|
@@ -229,13 +229,20 @@ function cmdUpdate() {
|
|
|
229
229
|
if (!printInstallLocations()) return;
|
|
230
230
|
console.log(c("bold", "Updating MOP-AGENT…\n"));
|
|
231
231
|
runSteps([
|
|
232
|
+
// Close SQLite cleanly before migration/rebuild. In particular, this
|
|
233
|
+
// prevents a root-run update leaving live WAL handles behind.
|
|
234
|
+
{ label: "Stop old service", cmd: "systemctl stop mop-agent", privileged: true, allowFailure: true },
|
|
232
235
|
...(!managedByNpx ? [{ label: "Pull latest", cmd: `cd ${q(APP_DIR)} && git pull --ff-only` }] : []),
|
|
233
236
|
{ label: "Install deps", cmd: `cd ${q(APP_DIR)} && npm ci` },
|
|
234
237
|
{ label: "Migrate SQLite", cmd: `cd ${q(`${APP_DIR}/apps/web`)} && npm run db:migrate` },
|
|
238
|
+
...(isRoot ? [{ label: "Repair runtime ownership", cmd: `chown -R mop-agent:mop-agent ${q(`${APP_DIR}/data`)}` }] : []),
|
|
239
|
+
{ label: "Remove stale Next.js build", cmd: `rm -rf ${q(`${APP_DIR}/apps/web/.next`)}` },
|
|
235
240
|
{ label: "Build", cmd: `cd ${q(`${APP_DIR}/apps/web`)} && npm run build` },
|
|
236
|
-
{ label: "
|
|
241
|
+
{ label: "Reload systemd", cmd: "systemctl daemon-reload", privileged: true },
|
|
242
|
+
{ label: "Start new service", cmd: "systemctl start mop-agent", privileged: true },
|
|
243
|
+
{ label: "Verify service", cmd: "sleep 2 && systemctl is-active --quiet mop-agent", privileged: true },
|
|
237
244
|
]);
|
|
238
|
-
console.log(c("green", "\n✓ updated\n"));
|
|
245
|
+
console.log(c("green", "\n✓ updated, rebuilt, and service verified\n"));
|
|
239
246
|
}
|
|
240
247
|
|
|
241
248
|
function cmdStatus() {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mop-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "mop-agent",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.4",
|
|
10
10
|
"license": "UNLICENSED",
|
|
11
11
|
"workspaces": [
|
|
12
12
|
"packages/*",
|
package/package.json
CHANGED