ohmyvibe 0.1.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.
@@ -0,0 +1,35 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ export class SessionStore {
4
+ filePath;
5
+ constructor(rootDir = process.cwd()) {
6
+ this.filePath = path.join(rootDir, "data", "sessions.json");
7
+ }
8
+ load() {
9
+ try {
10
+ if (!fs.existsSync(this.filePath)) {
11
+ return [];
12
+ }
13
+ const raw = fs.readFileSync(this.filePath, "utf8");
14
+ if (!raw.trim()) {
15
+ return [];
16
+ }
17
+ const parsed = JSON.parse(raw);
18
+ if (!parsed || parsed.version !== 1 || !Array.isArray(parsed.sessions)) {
19
+ return [];
20
+ }
21
+ return parsed.sessions;
22
+ }
23
+ catch {
24
+ return [];
25
+ }
26
+ }
27
+ save(sessions) {
28
+ fs.mkdirSync(path.dirname(this.filePath), { recursive: true });
29
+ const payload = {
30
+ version: 1,
31
+ sessions,
32
+ };
33
+ fs.writeFileSync(this.filePath, JSON.stringify(payload, null, 2), "utf8");
34
+ }
35
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "ohmyvibe",
3
+ "version": "0.1.0",
4
+ "description": "VibeCoding daemon + web console MVP for orchestrating Codex sessions",
5
+ "bin": {
6
+ "ohmyvibe": "./dist/cli.js"
7
+ },
8
+ "files": [
9
+ "dist",
10
+ "README.md",
11
+ ".env.example"
12
+ ],
13
+ "main": "dist/daemon/index.js",
14
+ "scripts": {
15
+ "build": "npm run build:daemon && npm run build:web",
16
+ "build:daemon": "tsc -p tsconfig.json",
17
+ "build:web": "npm --prefix web run build",
18
+ "pack:dry-run": "npm pack --dry-run",
19
+ "daemon": "tsx src/daemon/index.ts",
20
+ "acp": "tsx src/acp/index.ts",
21
+ "dev": "tsx watch src/daemon/index.ts",
22
+ "web:dev": "npm --prefix web run dev",
23
+ "web:preview": "npm --prefix web run preview",
24
+ "web:server": "npm --prefix web run server",
25
+ "prepublishOnly": "npm run build:daemon"
26
+ },
27
+ "keywords": [],
28
+ "author": "",
29
+ "license": "ISC",
30
+ "type": "module",
31
+ "engines": {
32
+ "node": ">=22"
33
+ },
34
+ "dependencies": {
35
+ "@agentclientprotocol/sdk": "^0.18.0",
36
+ "dotenv": "^17.4.1",
37
+ "express": "^5.2.1",
38
+ "ws": "^8.20.0"
39
+ },
40
+ "devDependencies": {
41
+ "@types/express": "^5.0.6",
42
+ "@types/ws": "^8.18.1",
43
+ "tsx": "^4.21.0",
44
+ "typescript": "^6.0.2"
45
+ }
46
+ }