Scout's page only: show a job's folder in the file manager
const url = 'http://127.0.0.1:8765/api/jobs-folder/open';const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8765/api/jobs-folder/open \ --header 'Content-Type: application/json' \ --data '{}'Scout’s own page only: show the jobs folder, or one job’s folder, in the computer’s file manager. NOT for agents: it answers only Scout’s own browser page (a request carrying this server’s own Origin); any other caller gets 403 forbidden_origin and nothing is opened. The request never carries a folder path: GigAI finds the folder itself, from the stored job (or from the jobs folder setting), and refuses one that is not inside the jobs folder (422 outside_jobs_folder). A job GigAI has made no folder for, or a folder that is not there, answers 404 folder_missing. It asks the computer to show the folder (macOS open, Linux xdg-open when there is a desktop); the answer is 200 either way: opened false means this computer could not, and message says so in one plain sentence that names the folder so the person can copy it. It shows the folder only: no file is read or changed.
Request Body
Section titled “Request Body”object
Optional: the job whose folder to open (the page’s own identity). Without it, the jobs folder itself is opened.
Optional; taken with job_identity and picks nothing (0.1.11.9: the job names its folder).
Example
{}Responses
Section titled “Responses”Success.
object
Example
{ "message": "Opened ~/Documents/GigAI/jobs/acme/staff-engineer.", "opened": true, "schema_version": "scout-jobs-folder-open:1", "shown": "~/Documents/GigAI/jobs/acme/staff-engineer"}Forbidden_origin
object
object
Example
{ "error": { "code": "forbidden_origin", "message": "..." }}Folder_missing, target_unavailable
object
object
Example
{ "error": { "code": "folder_missing", "message": "..." }}Unsupported_media_type: writes need Content-Type: application/json.
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Unknown_key, wrong_type, invalid_value, outside_jobs_folder
object
object
Example
{ "error": { "code": "unknown_key", "message": "..." }}