Documentation Index
Fetch the complete documentation index at: https://mintlify.com/aipoch/open-science/llms.txt
Use this file to discover all available pages before exploring further.
window.api.projects manages the set of research projects persisted in the local SQLite database (accessed via Prisma). Each project has its own working directory, artifact store, and session history. Timestamps are normalized to epoch milliseconds at the repository boundary so they can be compared directly with session timestamps.
The related window.api.preview namespace persists per-project preview panel state — which tabs are open, which is active, and whether the panel is collapsed — in the same SQLite database.
Methods
list()
Returns all projects in the database ordered by creation time.
Returns: Promise<Project[]>
get(id)
Returns a single project by its unique cuid identifier, or null if it does not exist.
The cuid identifier of the project to fetch.
Promise<Project | null>
create(request)
Creates a new project and returns the persisted record.
Promise<Project>
update(request)
Updates one or more fields of an existing project and returns the updated record.
Promise<Project>
delete(request)
Permanently deletes a project from the database. This does not automatically delete the project’s artifact files or session history on disk — use sessions.deleteProjectSessions to remove associated session data first.
Promise<void>
window.api.preview — Preview panel state
window.api.preview persists the preview panel’s open/collapsed state and the set of open file tabs for each project. State is stored in the same SQLite database as projects and is scoped to a projectId.
preview.load(request)
Loads the persisted preview state for a project, or returns null when no state has been saved yet.
Promise<PersistedPreviewState | null>
preview.save(request)
Saves the current preview panel state for a project (upsert semantics).
Promise<void>
preview.delete(request)
Deletes the saved preview state for a project. Typically called when the project itself is deleted.
Promise<void>
PersistedPreviewState type
| Field | Type | Description |
|---|---|---|
version | 1 | File format version |
panelState | 'open' | 'collapsed' | Whether the preview panel is expanded or collapsed |
activeItemId | string | undefined | ID of the currently active tab |
items | PersistedPreviewFileItem[] | Open file preview tabs |
PersistedPreviewFileItem carries id, sessionId, title, path, name, format, and an optional source field.
Notebook tabs are not persisted in preview state because their RPC endpoint changes on every app launch. They are re-registered via
window.api.notebook.onAvailable when the kernel becomes ready.Type reference
Project
The full project record as returned by every projects method.
| Field | Type | Description |
|---|---|---|
id | string | Unique cuid identifier assigned at creation |
name | string | Project display name |
description | string | Project description (empty string when not set) |
isExample | boolean | true for built-in example projects shipped with the app |
createdAt | number | Creation timestamp (epoch milliseconds) |
updatedAt | number | Last-updated timestamp (epoch milliseconds) |
isExample projects are read-only by convention — the UI prevents editing them, but the API does not enforce it. Check this flag before offering edit or delete controls.