Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
55d5e0b
Ralph iteration 1: work in progress
mrcfps Apr 27, 2026
117bf87
Ralph iteration 2: work in progress
mrcfps Apr 27, 2026
17e6e4f
Ralph iteration 3: work in progress
mrcfps Apr 27, 2026
4fbf2e4
Ralph iteration 4: work in progress
mrcfps Apr 27, 2026
24c5f79
Ralph iteration 5: work in progress
mrcfps Apr 27, 2026
8098017
Ralph iteration 7: work in progress
mrcfps Apr 27, 2026
9fbfd67
Ralph iteration 8: work in progress
mrcfps Apr 27, 2026
3fc188d
Ralph iteration 9: work in progress
mrcfps Apr 27, 2026
b44f876
Ralph iteration 10: work in progress
mrcfps Apr 27, 2026
bc9f68a
Ralph iteration 11: work in progress
mrcfps Apr 27, 2026
748ff56
Ralph iteration 12: work in progress
mrcfps Apr 27, 2026
3105e83
Ralph iteration 13: work in progress
mrcfps Apr 27, 2026
c8daf76
Ralph iteration 14: work in progress
mrcfps Apr 27, 2026
a170e4c
Ralph iteration 15: work in progress
mrcfps Apr 27, 2026
68445be
Ralph iteration 16: work in progress
mrcfps Apr 27, 2026
2c0d7a4
Ralph iteration 17: work in progress
mrcfps Apr 27, 2026
bdeb6a3
Ralph iteration 18: work in progress
mrcfps Apr 27, 2026
dc70871
Ralph iteration 19: work in progress
mrcfps Apr 27, 2026
1cc7df9
Ralph iteration 20: work in progress
mrcfps Apr 27, 2026
f13db44
Ralph iteration 21: work in progress
mrcfps Apr 27, 2026
4378963
Ralph iteration 22: work in progress
mrcfps Apr 27, 2026
8046e58
Ralph iteration 23: work in progress
mrcfps Apr 27, 2026
76d58e9
Ralph iteration 24: work in progress
mrcfps Apr 27, 2026
b1198bd
Ralph iteration 25: work in progress
mrcfps Apr 27, 2026
1bfdb4b
Ralph iteration 26: work in progress
mrcfps Apr 27, 2026
1208b95
Ralph iteration 27: work in progress
mrcfps Apr 27, 2026
31fad70
Ralph iteration 28: work in progress
mrcfps Apr 27, 2026
a479846
Ralph iteration 29: work in progress
mrcfps Apr 27, 2026
1c02351
Ralph iteration 30: work in progress
mrcfps Apr 27, 2026
07f110f
Ralph iteration 31: work in progress
mrcfps Apr 27, 2026
00e515c
Ralph iteration 32: work in progress
mrcfps Apr 27, 2026
5b3e9e8
Ralph iteration 33: work in progress
mrcfps Apr 27, 2026
b43acf8
Ralph iteration 34: work in progress
mrcfps Apr 27, 2026
f22969e
Ralph iteration 35: work in progress
mrcfps Apr 27, 2026
879beac
Ralph iteration 36: work in progress
mrcfps Apr 27, 2026
3ec8858
Ralph iteration 37: work in progress
mrcfps Apr 27, 2026
1257083
Ralph iteration 38: work in progress
mrcfps Apr 27, 2026
95ff1e8
Ralph iteration 39: work in progress
mrcfps Apr 27, 2026
b076865
Ralph iteration 41: work in progress
mrcfps Apr 27, 2026
ad63595
Ralph iteration 42: work in progress
mrcfps Apr 27, 2026
e8780af
Ralph iteration 43: work in progress
mrcfps Apr 27, 2026
5ec4300
Ralph iteration 44: work in progress
mrcfps Apr 27, 2026
340a9e5
Ralph iteration 45: work in progress
mrcfps Apr 27, 2026
e5f8161
Ralph iteration 46: work in progress
mrcfps Apr 27, 2026
175a1cb
Ralph iteration 47: work in progress
mrcfps Apr 27, 2026
b78a9a5
Ralph iteration 48: work in progress
mrcfps Apr 27, 2026
ef8d1fb
Ralph iteration 49: work in progress
mrcfps Apr 27, 2026
fbab6e4
Ralph iteration 52: work in progress
mrcfps Apr 27, 2026
b3217e4
finish ralph loop
mrcfps Apr 27, 2026
4fbf729
fix session delete cleanup order
mrcfps Apr 27, 2026
d85915a
Refine settings and shell UI behavior (#4)
mrcfps Apr 27, 2026
39f24ab
Refine workspace and file tool UI
mrcfps Apr 27, 2026
44f1135
Fix controller config typecheck
mrcfps Apr 27, 2026
18a6a98
Ignore local session workspace state
mrcfps Apr 27, 2026
fba451d
fix session workspace cleanup guards
mrcfps Apr 27, 2026
188bde4
Harden session workspace symlink guards
mrcfps Apr 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ out/
.next/
coverage/
*.tsbuildinfo

# Monet local development runtime state
apps/controller/.monet-dev/
apps/controller/session-workspaces/
session-workspaces/

apps/controller/sqlite/*.db
apps/controller/sqlite/*.db-shm
apps/controller/sqlite/*.db-wal
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ From the repository root:
- Desktop packaging is configured in `apps/desktop/package.json`: Electron Builder packages `apps/desktop/dist`, bundles controller, renderer, and migration assets into `app.asar`, runs native dependency alignment via `electron-builder install-app-deps`, and flips Electron fuses for packaged builds.
- Managed desktop launches pin SQLite to `app.getPath('userData')/sqlite/monet.db`; on POSIX hosts Monet best-effort chmods the database directory to `0700` and the database, WAL, and SHM files to `0600`.

## Session Workspaces and File Tools

- Each session has a dedicated workspace for files the agent creates or reads during that chat. In desktop builds the workspace base is under the app user-data directory; local controller-only development falls back to `session-workspaces/` under the controller working directory unless `MONET_SESSION_WORKSPACE_DIR` or `MONET_USER_DATA_DIR` is set.
- Relative `read_file` and `write_file` paths now resolve inside the current session workspace. For example, `write_file("hello.html")` writes to that session's workspace, not the repository root, controller `cwd`, home directory, or the first authorized directory.
- Writes inside the current session workspace do not require confirmation. Reads and writes outside the workspace are denied unless the target is inside an authorized directory; authorized-directory writes still require confirmation.
- Existing sessions are migration-compatible: they do not need pre-created workspace records. Monet derives a stable workspace path from the existing session ID and creates the directory lazily the first time a file operation or “Open workspace folder” action needs it.
- Existing persisted authorized directories and `MONET_TOOL_ALLOWED_DIRECTORIES` remain supported for real user/project files. The unsafe historical fallback that treated `process.cwd()` as authorized by default has been removed, so external access must come from persisted settings or environment configuration.

## Release Notes

- macOS signing/notarization settings live in `apps/desktop/package.json` and use entitlements from `apps/desktop/resources/`.
Expand Down
123 changes: 123 additions & 0 deletions apps/controller/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@
{
"type": "object",
"properties": {
"workspacePath": {
"type": [
"string",
"null"
],
"example": "/Users/example/Library/Application Support/Monet/session-workspaces/ses_abc123/workspace"
},
"messages": {
"type": "array",
"items": {
Expand All @@ -235,6 +242,7 @@
}
},
"required": [
"workspacePath",
"messages"
]
}
Expand Down Expand Up @@ -264,6 +272,26 @@
"session"
]
},
"OpenWorkspaceDirectoryResponse": {
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"enum": [
true
],
"example": true
},
"workspacePath": {
"type": "string",
"example": "/Users/example/Library/Application Support/Monet/session-workspaces/ses_abc123/workspace"
}
},
"required": [
"ok",
"workspacePath"
]
},
"Provider": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -970,6 +998,49 @@
}
}
}
},
"delete": {
"tags": [
"Sessions"
],
"summary": "Delete session",
"description": "Deletes a session and recursively removes its session workspace.",
"parameters": [
{
"schema": {
"type": "string",
"example": "ses_123"
},
"required": true,
"name": "sessionId",
"in": "path"
}
],
"responses": {
"204": {
"description": "Session deleted successfully."
},
"404": {
"description": "The requested session was not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "The session could not be deleted.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/sessions/{sessionId}/archive": {
Expand Down Expand Up @@ -1024,6 +1095,58 @@
}
}
},
"/api/sessions/{sessionId}/workspace/open": {
"post": {
"tags": [
"Sessions"
],
"summary": "Open session workspace directory",
"description": "Validates the session, derives its workspace path server-side, and ensures the workspace directory exists before desktop opening.",
"parameters": [
{
"schema": {
"type": "string",
"example": "ses_123"
},
"required": true,
"name": "sessionId",
"in": "path"
}
],
"responses": {
"200": {
"description": "Session workspace directory is ready to open.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OpenWorkspaceDirectoryResponse"
}
}
}
},
"404": {
"description": "The requested session was not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "The session workspace directory could not be prepared.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/providers": {
"get": {
"tags": [
Expand Down
3 changes: 2 additions & 1 deletion apps/controller/scripts/generate-openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ async function main() {
defaultModel: "openai/gpt-4.1-mini",
timeoutMs: null
},
port: 42831
port: 42831,
sessionWorkspaceBaseDirectory: "/tmp/monet-openapi-session-workspaces"
});
const document = app.getOpenAPI31Document({
openapi: "3.1.0",
Expand Down
Loading
Loading