Initialize remote IDE scaffold
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "@git.zone/ide-protocol",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"dist_ts/**/*"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
export const gitZoneIdeProtocolVersion = 1;
|
||||
|
||||
export type TRemoteProcessStatus = 'starting' | 'running' | 'stopped' | 'failed';
|
||||
|
||||
export interface IIdeSshTarget {
|
||||
id: string;
|
||||
label?: string;
|
||||
hostAlias: string;
|
||||
hostName?: string;
|
||||
user?: string;
|
||||
port?: number;
|
||||
workspacePath?: string;
|
||||
}
|
||||
|
||||
export interface IRemoteServerManifest {
|
||||
protocolVersion: number;
|
||||
serverVersion: string;
|
||||
platform: string;
|
||||
arch: string;
|
||||
artifactName: string;
|
||||
sha256?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface IRemoteServerPaths {
|
||||
installRoot: string;
|
||||
versionRoot: string;
|
||||
currentLink: string;
|
||||
logsDir: string;
|
||||
manifestPath: string;
|
||||
}
|
||||
|
||||
export interface IRemoteOpenCodeDescriptor {
|
||||
baseUrl: string;
|
||||
port: number;
|
||||
username: string;
|
||||
password: string;
|
||||
status: TRemoteProcessStatus;
|
||||
}
|
||||
|
||||
export interface IRemoteTheiaDescriptor {
|
||||
baseUrl: string;
|
||||
localPort: number;
|
||||
remotePort: number;
|
||||
status: TRemoteProcessStatus;
|
||||
}
|
||||
|
||||
export interface IRemoteSessionDescriptor {
|
||||
sessionId: string;
|
||||
target: IIdeSshTarget;
|
||||
workspacePath: string;
|
||||
serverVersion: string;
|
||||
createdAt: string;
|
||||
theia: IRemoteTheiaDescriptor;
|
||||
opencode?: IRemoteOpenCodeDescriptor;
|
||||
}
|
||||
|
||||
export interface IRemoteProbeResult {
|
||||
ok: boolean;
|
||||
hostAlias: string;
|
||||
platform?: string;
|
||||
arch?: string;
|
||||
homeDir?: string;
|
||||
shell?: string;
|
||||
nodeVersion?: string;
|
||||
pnpmVersion?: string;
|
||||
gitVersion?: string;
|
||||
opencodeVersion?: string;
|
||||
errors: string[];
|
||||
}
|
||||
|
||||
export interface IPortForwardDescriptor {
|
||||
id: string;
|
||||
label?: string;
|
||||
localHost: string;
|
||||
localPort: number;
|
||||
remoteHost: string;
|
||||
remotePort: number;
|
||||
status: TRemoteProcessStatus;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "ts",
|
||||
"outDir": "dist_ts",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": ["ts/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user