mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-13 23:53:25 +00:00
Compare commits
2 Commits
fix/patch-
...
feat/openc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
341025d8e9 | ||
|
|
4599934bb4 |
@@ -15,8 +15,8 @@ import {
|
||||
OpenClawAgentNotFoundError,
|
||||
OpenClawInvalidAgentNameError,
|
||||
OpenClawProtectedAgentError,
|
||||
} from '../../services/openclaw/errors'
|
||||
import { getOpenClawService } from '../../services/openclaw/openclaw-service'
|
||||
} from '../services/openclaw/errors'
|
||||
import { getOpenClawService } from '../services/openclaw/openclaw-service'
|
||||
|
||||
export function createOpenClawRoutes() {
|
||||
return new Hono()
|
||||
|
||||
@@ -4,12 +4,12 @@ import { logger } from '../../lib/logger'
|
||||
import {
|
||||
parseTerminalClientMessage,
|
||||
serializeTerminalServerMessage,
|
||||
} from '../../services/terminal/terminal-protocol'
|
||||
} from '../services/terminal/terminal-protocol'
|
||||
import {
|
||||
createTerminalSession,
|
||||
TERMINAL_HOME_DIR,
|
||||
type TerminalSession,
|
||||
} from '../../services/terminal/terminal-session'
|
||||
} from '../services/terminal/terminal-session'
|
||||
import type { Env } from '../types'
|
||||
|
||||
export const TERMINAL_WS_PATH = '/terminal/ws'
|
||||
|
||||
@@ -22,7 +22,6 @@ import { initializeOAuth } from '../lib/clients/oauth'
|
||||
import { getDb } from '../lib/db'
|
||||
import { logger } from '../lib/logger'
|
||||
import { Sentry } from '../lib/sentry'
|
||||
import { getPodmanRuntime } from '../services/openclaw/podman-runtime'
|
||||
import { createChatRoutes } from './routes/chat'
|
||||
import { createCreditsRoutes } from './routes/credits'
|
||||
import { createHealthRoute } from './routes/health'
|
||||
@@ -43,6 +42,7 @@ import {
|
||||
connectKlavisProxy,
|
||||
type KlavisProxyHandle,
|
||||
} from './services/klavis/strata-proxy'
|
||||
import { getPodmanRuntime } from './services/openclaw/podman-runtime'
|
||||
import type { Env, HttpServerConfig } from './types'
|
||||
import { defaultCorsConfig } from './utils/cors'
|
||||
import { requireTrustedAppOrigin } from './utils/request-auth'
|
||||
|
||||
@@ -13,7 +13,7 @@ import crypto from 'node:crypto'
|
||||
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'
|
||||
import { join } from 'node:path'
|
||||
import { OPENCLAW_CONTAINER_HOME } from '@browseros/shared/constants/openclaw'
|
||||
import { logger } from '../../lib/logger'
|
||||
import { logger } from '../../../lib/logger'
|
||||
|
||||
const RPC_TIMEOUT_MS = 15_000
|
||||
const RECONNECT_DELAY_MS = 2_000
|
||||
@@ -13,8 +13,8 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises'
|
||||
import { join, resolve } from 'node:path'
|
||||
import { OPENCLAW_GATEWAY_PORT } from '@browseros/shared/constants/openclaw'
|
||||
import { DEFAULT_PORTS } from '@browseros/shared/constants/ports'
|
||||
import { getOpenClawDir } from '../../lib/browseros-dir'
|
||||
import { logger } from '../../lib/logger'
|
||||
import { getOpenClawDir } from '../../../lib/browseros-dir'
|
||||
import { logger } from '../../../lib/logger'
|
||||
import { ContainerRuntime } from './container-runtime'
|
||||
import {
|
||||
OpenClawAgentAlreadyExistsError,
|
||||
@@ -37,7 +37,7 @@ import { getPodmanRuntime } from './podman-runtime'
|
||||
|
||||
const COMPOSE_RESOURCE = resolve(
|
||||
import.meta.dir,
|
||||
'../../../resources/openclaw-compose.yml',
|
||||
'../../../../resources/openclaw-compose.yml',
|
||||
)
|
||||
const OPENCLAW_CONFIG_FILE = 'openclaw.json'
|
||||
const READY_TIMEOUT_MS = 30_000
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
OPENCLAW_CONTAINER_HOME,
|
||||
OPENCLAW_TERMINAL_SHELL,
|
||||
} from '@browseros/shared/constants/openclaw'
|
||||
import { logger } from '../../lib/logger'
|
||||
import { logger } from '../../../lib/logger'
|
||||
|
||||
export const TERMINAL_HOME_DIR = OPENCLAW_CONTAINER_HOME
|
||||
const DEFAULT_COLS = 80
|
||||
@@ -13,6 +13,7 @@ import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { EXIT_CODES } from '@browseros/shared/constants/exit-codes'
|
||||
import { createHttpServer } from './api/server'
|
||||
import { getOpenClawService } from './api/services/openclaw/openclaw-service'
|
||||
import { CdpBackend } from './browser/backends/cdp'
|
||||
import { Browser } from './browser/browser'
|
||||
import type { ServerConfig } from './config'
|
||||
@@ -30,7 +31,6 @@ import { metrics } from './lib/metrics'
|
||||
import { isPortInUseError } from './lib/port-binding'
|
||||
import { Sentry } from './lib/sentry'
|
||||
import { seedSoulTemplate } from './lib/soul'
|
||||
import { getOpenClawService } from './services/openclaw/openclaw-service'
|
||||
import { migrateBuiltinSkills } from './skills/migrate'
|
||||
import {
|
||||
startSkillSync,
|
||||
|
||||
@@ -7,11 +7,11 @@ import { describe, expect, it } from 'bun:test'
|
||||
import {
|
||||
parseTerminalClientMessage,
|
||||
serializeTerminalServerMessage,
|
||||
} from '../../../src/services/terminal/terminal-protocol'
|
||||
} from '../../../src/api/services/terminal/terminal-protocol'
|
||||
import {
|
||||
buildTerminalExecCommand,
|
||||
TERMINAL_HOME_DIR,
|
||||
} from '../../../src/services/terminal/terminal-session'
|
||||
} from '../../../src/api/services/terminal/terminal-session'
|
||||
|
||||
describe('terminal protocol', () => {
|
||||
it('parses input messages', () => {
|
||||
|
||||
Reference in New Issue
Block a user