diff --git a/backend/cli/package.json b/backend/cli/package.json index 5acf8c00..e11ddf14 100644 --- a/backend/cli/package.json +++ b/backend/cli/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "2.0.22", + "version": "2.0.23", "name": "@synsci/openscience", "type": "module", "description": "AI-powered CLI for ML research and development workflows", diff --git a/bun.lock b/bun.lock index 9578fb8e..d76d161b 100644 --- a/bun.lock +++ b/bun.lock @@ -19,7 +19,7 @@ }, "backend/cli": { "name": "@synsci/openscience", - "version": "2.0.22", + "version": "2.0.23", "bin": { "openscience": "./bin/openscience", }, @@ -125,7 +125,7 @@ }, "frontend/docs": { "name": "@synsci/docs", - "version": "2.0.22", + "version": "2.0.23", "dependencies": { "lucide-react": "^0.453.0", "react": "^19.0.0", @@ -143,7 +143,7 @@ }, "frontend/ui": { "name": "@synsci/ui", - "version": "2.0.22", + "version": "2.0.23", "dependencies": { "@kobalte/core": "catalog:", "@pierre/diffs": "catalog:", @@ -188,7 +188,7 @@ }, "frontend/workspace": { "name": "@synsci/workspace", - "version": "2.0.22", + "version": "2.0.23", "dependencies": { "@fontsource-variable/inter": "5.3.0", "@kobalte/core": "catalog:", @@ -242,14 +242,14 @@ }, "tooling/launcher": { "name": "synsci", - "version": "2.0.22", + "version": "2.0.23", "bin": { "synsci": "bin/synsci.mjs", }, }, "tooling/plugin": { "name": "@synsci/plugin", - "version": "2.0.22", + "version": "2.0.23", "dependencies": { "@synsci/sdk": "workspace:*", "zod": "catalog:", @@ -269,7 +269,7 @@ }, "tooling/sdk/js": { "name": "@synsci/sdk", - "version": "2.0.22", + "version": "2.0.23", "devDependencies": { "@hey-api/openapi-ts": "0.90.10", "@tsconfig/node22": "catalog:", @@ -280,7 +280,7 @@ }, "tooling/util": { "name": "@synsci/util", - "version": "2.0.22", + "version": "2.0.23", "dependencies": { "zod": "catalog:", }, diff --git a/frontend/docs/package.json b/frontend/docs/package.json index 79ef4e17..72b69275 100644 --- a/frontend/docs/package.json +++ b/frontend/docs/package.json @@ -2,7 +2,7 @@ "name": "@synsci/docs", "private": true, "type": "module", - "version": "2.0.22", + "version": "2.0.23", "license": "Apache-2.0", "scripts": { "dev": "vite", diff --git a/frontend/landing/package.json b/frontend/landing/package.json index e9d647db..7eb3ac50 100644 --- a/frontend/landing/package.json +++ b/frontend/landing/package.json @@ -1,7 +1,7 @@ { "name": "openscience-landing", "private": true, - "version": "2.0.22", + "version": "2.0.23", "type": "module", "scripts": { "dev": "vite", diff --git a/frontend/ui/package.json b/frontend/ui/package.json index 923cb027..3dd58533 100644 --- a/frontend/ui/package.json +++ b/frontend/ui/package.json @@ -1,6 +1,6 @@ { "name": "@synsci/ui", - "version": "2.0.22", + "version": "2.0.23", "type": "module", "license": "Apache-2.0", "exports": { diff --git a/frontend/workspace/package.json b/frontend/workspace/package.json index 9d406e70..3efd9e32 100644 --- a/frontend/workspace/package.json +++ b/frontend/workspace/package.json @@ -1,6 +1,6 @@ { "name": "@synsci/workspace", - "version": "2.0.22", + "version": "2.0.23", "description": "", "type": "module", "exports": { diff --git a/tooling/launcher/package.json b/tooling/launcher/package.json index d2d9ec57..c10d157d 100644 --- a/tooling/launcher/package.json +++ b/tooling/launcher/package.json @@ -1,6 +1,6 @@ { "name": "synsci", - "version": "2.0.22", + "version": "2.0.23", "description": "Install wizard for OpenScience, the open-source AI research workspace (optionally with Atlas)", "license": "Apache-2.0", "type": "module", diff --git a/tooling/plugin/package.json b/tooling/plugin/package.json index 7b80bff9..6c2615af 100644 --- a/tooling/plugin/package.json +++ b/tooling/plugin/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@synsci/plugin", - "version": "2.0.22", + "version": "2.0.23", "type": "module", "license": "Apache-2.0", "scripts": { diff --git a/tooling/sdk/js/package.json b/tooling/sdk/js/package.json index 7121bdce..01ef776e 100644 --- a/tooling/sdk/js/package.json +++ b/tooling/sdk/js/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@synsci/sdk", - "version": "2.0.22", + "version": "2.0.23", "type": "module", "license": "Apache-2.0", "scripts": { diff --git a/tooling/sdk/js/src/v2/gen/sdk.gen.ts b/tooling/sdk/js/src/v2/gen/sdk.gen.ts index 673eb193..b990ec65 100644 --- a/tooling/sdk/js/src/v2/gen/sdk.gen.ts +++ b/tooling/sdk/js/src/v2/gen/sdk.gen.ts @@ -114,10 +114,12 @@ import type { McpLocalConfig, McpRemoteConfig, McpStatusResponses, + NotebookCommandsResponses, + NotebookCommandStopErrors, + NotebookCommandStopResponses, NotebookComputeResponses, NotebookExecuteResponses, NotebookInterruptResponses, - NotebookKernelCreateResponses, NotebookKernelDeleteResponses, NotebookKernelInterruptResponses, NotebookKernelRestartResponses, @@ -1915,7 +1917,7 @@ export class Trust extends HeyApiClient { /** * Inspect project trust * - * Inspect whether project-local code may execute. Projects are untrusted by default; read-only project opening remains available. + * Inspect whether project-local code may execute. Project code is enabled by default and remains disabled only after an explicit revocation. */ public get( parameters: { @@ -5239,16 +5241,15 @@ export class File extends HeyApiClient { } } -export class Kernel extends HeyApiClient { +export class Command extends HeyApiClient { /** - * Create a named session kernel record + * Stop a live shell command */ - public create( - parameters?: { + public stop( + parameters: { + commandID: string directory?: string sessionID?: string - name?: string - language?: "python" | "r" }, options?: Options, ) { @@ -5257,26 +5258,29 @@ export class Kernel extends HeyApiClient { [ { args: [ + { in: "path", key: "commandID" }, { in: "query", key: "directory" }, { in: "body", key: "sessionID" }, - { in: "body", key: "name" }, - { in: "body", key: "language" }, ], }, ], ) - return (options?.client ?? this.client).post({ - url: "/notebook/kernels", - ...options, - ...params, - headers: { - "Content-Type": "application/json", - ...options?.headers, - ...params.headers, + return (options?.client ?? this.client).post( + { + url: "/notebook/commands/{commandID}/stop", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, }, - }) + ) } +} +export class Kernel extends HeyApiClient { /** * Restart a kernel in a fresh runtime */ @@ -5415,7 +5419,7 @@ export class Kernel extends HeyApiClient { export class Notebook extends HeyApiClient { /** - * Report host compute capacity + * Report live local compute capacity */ public compute( parameters?: { @@ -5431,6 +5435,34 @@ export class Notebook extends HeyApiClient { }) } + /** + * List live project shell commands + */ + public commands( + parameters?: { + directory?: string + sessionID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "sessionID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/notebook/commands", + ...options, + ...params, + }) + } + /** * List session kernel records */ @@ -5647,6 +5679,11 @@ export class Notebook extends HeyApiClient { }) } + private _command?: Command + get command(): Command { + return (this._command ??= new Command({ client: this.client })) + } + private _kernel?: Kernel get kernel(): Kernel { return (this._kernel ??= new Kernel({ client: this.client })) @@ -6307,7 +6344,7 @@ export class Vcs extends HeyApiClient { } } -export class Command extends HeyApiClient { +export class Command2 extends HeyApiClient { /** * List commands * @@ -6797,9 +6834,9 @@ export class OpenScienceClient extends HeyApiClient { return (this._vcs ??= new Vcs({ client: this.client })) } - private _command?: Command - get command(): Command { - return (this._command ??= new Command({ client: this.client })) + private _command?: Command2 + get command(): Command2 { + return (this._command ??= new Command2({ client: this.client })) } private _app?: App diff --git a/tooling/sdk/js/src/v2/gen/types.gen.ts b/tooling/sdk/js/src/v2/gen/types.gen.ts index 7a7b6f2f..5f8c39c9 100644 --- a/tooling/sdk/js/src/v2/gen/types.gen.ts +++ b/tooling/sdk/js/src/v2/gen/types.gen.ts @@ -10735,7 +10735,70 @@ export type NotebookComputeData = { export type NotebookComputeResponses = { /** - * Machine capacity and the share kernels hold + * Machine capacity and the share live kernels and commands hold + */ + 200: unknown +} + +export type NotebookCommandsData = { + body?: never + path?: never + query?: { + directory?: string + sessionID?: string + } + url: "/notebook/commands" +} + +export type NotebookCommandsResponses = { + /** + * Live shell commands and process resource usage + */ + 200: { + commands: Array<{ + id: string + projectID: string + sessionID: string + messageID: string + callID?: string + description: string + command: string + state: "running" + process_id: number + started_at: number + resources?: { + cpu_percent?: number + memory_bytes?: number + } + }> + } +} + +export type NotebookCommandsResponse = NotebookCommandsResponses[keyof NotebookCommandsResponses] + +export type NotebookCommandStopData = { + body?: { + sessionID: string + } + path: { + commandID: string + } + query?: { + directory?: string + } + url: "/notebook/commands/{commandID}/stop" +} + +export type NotebookCommandStopErrors = { + /** + * Command not found + */ + 404: unknown +} + +export type NotebookCommandStopResponses = { + /** + * Command stopped */ 200: unknown } @@ -10836,6 +10899,15 @@ export type NotebookKernelsResponses = { } } } | null + last_cell: { + title: string | null + source: string | null + code: string + status: "running" | "succeeded" | "failed" + execution_count: number | null + message_id: string | null + call_id: string | null + } | null resources?: { cpu_percent?: number memory_bytes?: number @@ -10848,115 +10920,6 @@ export type NotebookKernelsResponses = { export type NotebookKernelsResponse = NotebookKernelsResponses[keyof NotebookKernelsResponses] -export type NotebookKernelCreateData = { - body?: { - sessionID: string - name: string - language: "python" | "r" - } - path?: never - query?: { - directory?: string - } - url: "/notebook/kernels" -} - -export type NotebookKernelCreateResponses = { - /** - * Lazy named kernel record - */ - 200: { - id: string - active: boolean - state: "lazy" | "starting" | "idle" | "running" | "stopped" | "crashed" - projectID: string - sessionID: string - name: string - language: string - target: { - kind: "local" - } - incarnation: number | null - execution_count: number - queue_depth: number - environment: { - cwd: string - atlas: { - access: "host_broker" - credentials: "withheld" - sources: "source_ids_only" - } - sandbox: { - requested: boolean - enforced: boolean - backend: "seatbelt" | "bubblewrap" | "none" - network: "allow" | "deny" - platform: string - available: boolean - tool?: string - reason?: string - warning?: string - } - } | null - process_id: number | null - process_started_at: number | null - process_identity_verified: boolean | null - started_at: number | null - last_activity_at: number | null - authority: { - allowed: boolean - reason: "allowed" | "project_untrusted" | "sandbox_unavailable" - capability: - | "terminal" - | "kernel" - | "shell" - | "local_job" - | "remote_job" - | "package_install" - | "project_plugin" - | "project_mcp" - | "project_formatter" - | "project_lsp" - | "provider_token_command" - mode: "read_only" | "sandboxed" | "host" - projectID: string - sessionID: string - trustRevision: number - grantRevision: number - generation: string - workspace: string - writable: Array - sandbox: { - enabled: boolean - network: "allow" | "deny" - allowWrite: Array - onUnavailable: "warn" | "error" | "allow" - backend: "seatbelt" | "bubblewrap" | "none" - available: boolean - enforced: boolean - } - remediation?: { - code: "trust_project_required" - message: string - method: "PUT" - path: string - body: { - trusted: true - root: string - } - } - } | null - resources?: { - cpu_percent?: number - memory_bytes?: number - gpu_percent?: number - vram_bytes?: number - } - } -} - -export type NotebookKernelCreateResponse = NotebookKernelCreateResponses[keyof NotebookKernelCreateResponses] - export type NotebookKernelRestartData = { body?: { sessionID: string @@ -11055,6 +11018,15 @@ export type NotebookKernelRestartResponses = { } } } | null + last_cell: { + title: string | null + source: string | null + code: string + status: "running" | "succeeded" | "failed" + execution_count: number | null + message_id: string | null + call_id: string | null + } | null resources?: { cpu_percent?: number memory_bytes?: number @@ -11164,6 +11136,15 @@ export type NotebookKernelStopResponses = { } } } | null + last_cell: { + title: string | null + source: string | null + code: string + status: "running" | "succeeded" | "failed" + execution_count: number | null + message_id: string | null + call_id: string | null + } | null resources?: { cpu_percent?: number memory_bytes?: number @@ -11273,6 +11254,15 @@ export type NotebookKernelInterruptResponses = { } } } | null + last_cell: { + title: string | null + source: string | null + code: string + status: "running" | "succeeded" | "failed" + execution_count: number | null + message_id: string | null + call_id: string | null + } | null resources?: { cpu_percent?: number memory_bytes?: number @@ -11425,6 +11415,15 @@ export type NotebookStatusResponses = { } } } | null + last_cell: { + title: string | null + source: string | null + code: string + status: "running" | "succeeded" | "failed" + execution_count: number | null + message_id: string | null + call_id: string | null + } | null resources?: { cpu_percent?: number memory_bytes?: number @@ -11534,6 +11533,15 @@ export type NotebookRestartResponses = { } } } | null + last_cell: { + title: string | null + source: string | null + code: string + status: "running" | "succeeded" | "failed" + execution_count: number | null + message_id: string | null + call_id: string | null + } | null resources?: { cpu_percent?: number memory_bytes?: number @@ -11643,6 +11651,15 @@ export type NotebookStopResponses = { } } } | null + last_cell: { + title: string | null + source: string | null + code: string + status: "running" | "succeeded" | "failed" + execution_count: number | null + message_id: string | null + call_id: string | null + } | null resources?: { cpu_percent?: number memory_bytes?: number @@ -11752,6 +11769,15 @@ export type NotebookInterruptResponses = { } } } | null + last_cell: { + title: string | null + source: string | null + code: string + status: "running" | "succeeded" | "failed" + execution_count: number | null + message_id: string | null + call_id: string | null + } | null resources?: { cpu_percent?: number memory_bytes?: number diff --git a/tooling/util/package.json b/tooling/util/package.json index 5e644348..36ec9cb2 100644 --- a/tooling/util/package.json +++ b/tooling/util/package.json @@ -1,6 +1,6 @@ { "name": "@synsci/util", - "version": "2.0.22", + "version": "2.0.23", "private": true, "type": "module", "license": "Apache-2.0",