Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
91 changes: 91 additions & 0 deletions CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# ssync

ssync is a local workflow surface for monitoring and operating SLURM work across configured HPC clusters. The language below keeps the user-facing concepts precise across the CLI, web UI, mobile app, VS Code extension, and Raycast extension.

## Language

**Host**:
A configured HPC cluster endpoint that can report and operate on SLURM jobs. Jobs are grouped by host when showing cross-cluster status.
_Avoid_: Backend, cluster when referring to the configured endpoint

**ssync API Server**:
The local service that exposes ssync status, job detail, output, launch, watcher, and configuration endpoints to clients.
_Avoid_: Backend

**ssync API URL**:
The URL where a client reaches the ssync API server.
_Avoid_: Server URL

**ssync API Key**:
The credential used by a client when the ssync API server requires authentication.
_Avoid_: Token, password

**ssync Connection**:
A client configuration consisting of an ssync API URL and an optional ssync API key that has passed a connection test.
_Avoid_: Configuration when specifically referring to the tested client connection

**Job**:
A SLURM workload tracked by ssync on a host. A job may be active, waiting, completed, failed, cancelled, timed out, or unknown.
_Avoid_: Task, run when referring to the scheduler object

**Running Job**:
A job that is currently executing on allocated resources.
_Avoid_: Active job when specifically meaning running only

**Pending Job**:
A job that is waiting for scheduling or resources before execution.
_Avoid_: Queued task

**Historical Job**:
A job that is no longer running or pending, such as completed, failed, cancelled, timed out, or unknown work.
_Avoid_: The rest, old job

**Historical Job Window**:
The time range used when loading historical jobs for a client view.
_Avoid_: Completed jobs window

**Job Detail**:
The focused view of one job, including its scheduler metadata, resource allocation, timing, paths, outputs, script, manifest, and related watcher information when available.
_Avoid_: Job page when speaking across multiple clients

**Job Output**:
The stdout and stderr content associated with a job.
_Avoid_: Logs when specifically referring to scheduler output files

**Local Job Output Copy**:
A desktop-local copy of Job Output used when a client opens the output in an external application.
_Avoid_: Remote output file

**Job Script**:
The submitted batch script associated with a job.
_Avoid_: Launch script

**Manual Relaunch**:
A user-initiated launch of a new job based on a previous job's script or stored launch request.
_Avoid_: Resubmit when the user is manually starting a new job

**Watcher**:
A persistent rule attached to a job or workflow that observes job output or state and can perform follow-up behavior.
_Avoid_: Monitor, daemon when referring to the rule itself

**Watcher Event**:
A recorded occurrence from watcher evaluation or action execution.
_Avoid_: Notification event, log line

**Watcher Resubmission**:
A watcher-initiated launch of a new job from cached job script or manifest context.
_Avoid_: Manual relaunch

## Example Dialogue

Dev: Should the Raycast extension show every job in one flat list?

Domain expert: No. Group jobs by host, show running jobs first, then pending jobs, then historical jobs.

Dev: When a user opens a job, should watcher information live somewhere else?

Domain expert: No. Job detail should include related watchers and watcher events so the user can understand what follow-up behavior is attached to that job.

Dev: Should a user action and a watcher action both be called resubmit?

Domain expert: No. A user starts a manual relaunch; a watcher performs watcher resubmission.
60 changes: 60 additions & 0 deletions docs/raycast-extension-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Raycast Extension Plan

## Scope

The first Raycast extension release is a monitoring surface for ssync jobs. It should make running and pending work easy to inspect without adding background load to the ssync API server.

## V1 Features

- Configure and test an ssync connection before first use.
- Load jobs cache-first, then revalidate when the cached snapshot is older than 60 seconds.
- Show the main Jobs command as lifecycle-first sections:
- Running Jobs
- Pending Jobs
- Historical Jobs
- Default historical job window: `3d`.
- Default job limit: `50`.
- Search locally across the loaded job snapshot.
- Show Job Detail as a sectioned read-only inspector list with lazy secondary actions.
- Fetch Job Output only when requested.
- Default Job Output to stdout, tail-limited.
- Allow switching from stdout to stderr when needed.
- Allow opening a refreshed Local Job Output Copy in a configured external editor.
- Fetch Job Script only when requested.
- Fetch Watchers and Watcher Events only when requested.
- Keep watchers read-only in v1.
- Include a menu-bar command with running jobs first and pending jobs second.
- Keep menu-bar background refresh conservative, defaulting to 5 minutes.
- Allow blank API keys when the ssync API server accepts the connection.
- Guard cancellation behind confirmation.

## Deferred

- Manual relaunch.
- Watcher edit, delete, attach, pause, resume, or trigger actions.
- WebSocket support.
- Launch recipe browsing or submission.
- Historical jobs in the menu-bar dropdown.

## Backend Load Rules

- Do not poll on every search keystroke.
- Do not fetch output, script, manifest, watchers, or watcher events while rendering the main Jobs list.
- Do not fetch both stdout and stderr by default.
- Do not force-refresh main job status by default.
- Manual refresh may ask the ssync API server for fresh job status.
- Background menu-bar refresh must only fetch job status.
- Opening Job Output should force-refresh the selected stream once, then perform at most one delayed follow-up read if the ssync API server queued a background output refresh.

## Output And Script Views

- Job Detail uses a Raycast `List` inspector so status, placement, timing, paths, and related views are selectable with native keyboard navigation.
- Job Output defaults to `output_type=stdout&lines=300`.
- Stderr is a secondary action, not loaded by default.
- Full output is a deliberate secondary action, not the default.
- Opening a Local Job Output Copy downloads the full selected stream and stores it under the system temporary directory before opening it externally.
- The external output editor is user-configurable: system default, Visual Studio Code, Cursor, Neovim in Ghostty, or a custom Raycast app picker value.
- Job Script opens as a separate formatted detail view.
- Output and script text should be displayed in a monospace code block with job metadata in Raycast metadata sidebars.
- Avoid markdown tables in Raycast views; use `Detail.Metadata` or `List.Item.Detail.Metadata` for structured facts.
- Raycast action shortcuts may support view-level commands such as refresh, switch to stderr, copy, and load full output. Custom vim-style single-key scrolling is not assumed to be available inside Raycast extension views.
4 changes: 4 additions & 0 deletions raycast-extension/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": false,
"trailingComma": "all"
}
Binary file added raycast-extension/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions raycast-extension/assets/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading