Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
#!/usr/bin/env bash# Launch Code OSS (VS Code from sources) with:# - a fresh, slimmed copy of the authenticated user-data-dir (so Copilot/GitHub auth works)# - an isolated --shared-data-dir (otherwise two instances share ~/.vscode-oss-shared and crash each other)# - unique debug ports for renderer (CDP), extension host, main process, and agent host## Auth on macOS comes from the OS keychain (per-app, shared automatically) plus# the encrypted blob in User/globalStorage/state.vscdb (per-UDD). The slim copy# keeps the auth-relevant state and drops caches / workspaceStorage / logs.## Prints a single JSON line to stdout with the chosen ports + paths so the# caller can pick them up programmatically. Logs go to stderr.## Usage:# launch.sh [--agents] [--source-user-data-dir <path>] [--repo <vscode-repo-root>]# [--clone-extensions] [--full] [--skip-prelaunch]# [--disable-workspace-trust] [-- <extra code.sh args>]## Flags:# --clone-extensions Copy the source extensions/ into the new profile (~10s).# Default: start with an EMPTY extensions/ dir - fastest# and conflict-free, but no third-party extensions.# --full Copy the entire profile (incl. extensions). Use if the# slim copy is missing something you need.# --skip-prelaunch Skip build/lib/preLaunch.ts after a successful prepared# launch while build outputs remain current.# --disable-workspace-trust# Disable trust prompts for unattended automation. Only# use with content you trust.## Defaults:
pipefail
077
--agents
--source-user-data-dir
--repo
--clone-extensions--copy-extensions
--full
--skip-prelaunch
--disable-workspace-trust
--
*
node
CDP_PORT EXTHOST_PORT MAIN_PORT AGENTHOST_PORT
-
/tmp
-a
--exclude
-
ELECTRON_RUN_AS_NODE
build/lib/preLaunch.ts
/dev/null
disown /dev/null
/waitForCdp.tslaunch.sh CDP ready after mslaunch.sh timed out waiting CDP on port Log tail:launch.sh code.sh PID exited before CDP came up. Log tail:launch.sh failed waiting CDP on port Log tail:"
# without reparsing the whole file. Avoids dropping user comments and
# string values containing `//` (e.g. URLs). Fails loudly if the file
# exists but has no recognizable JSON object shape — never silently
# overwrites with `{}`.
if
!
node
"$SETTINGS_FILE"
<<
'NODE'
const fs = require('fs');
const f = process.argv[2];
const KEY = 'files.simpleDialog.enable';
let text;
try { text = fs.readFileSync(f, 'utf8'); }
catch (e) {
if (e.code === 'ENOENT') text = '';
else { console.error('[launch.sh] cannot read ' + f + ': ' + e.message); process.exit(1); }
}
// Empty file → write a fresh object.
if (text.trim() === '') {
fs.writeFileSync(f, '{\n "' + KEY + '": true\n}\n');
process.exit(0);
}
// Key already present (with any value) → update its value to `true`
// via a targeted regex on the value slot only.
const keyValueRe = new RegExp('("' + KEY.replace(/\./g, '\\.') + '"\\s*:\\s*)(true|false|null|"[^"\\n]*"|-?\\d+(?:\\.\\d+)?)', 'g');
if (keyValueRe.test(text)) {
const updated = text.replace(keyValueRe, '$1true');
fs.writeFileSync(f, updated);
process.exit(0);
}
// Otherwise: find the LAST `}` and insert the new key before it.
// We deliberately don't parse JSONC — this preserves comments and
// any other content the source profile had.
const lastBrace = text.lastIndexOf('}');
if (lastBrace === -1) {
console.error('[launch.sh] settings.json has no closing brace — refusing to clobber it: ' + f);
process.exit(1);
}
// Decide whether to add a leading comma. If the only thing between the
// first `{` and the last `}` is whitespace and comments, the object is
// empty for our purposes and no comma is needed.
const firstBrace = text.indexOf('{');
if (firstBrace === -1 || firstBrace >= lastBrace) {
console.error('[launch.sh] settings.json has no opening brace — refusing to clobber it: ' + f);
process.exit(1);
}
const between = text.slice(firstBrace + 1, lastBrace)
.replace(/\/\*[\s\S]*?\*\//g, '')
.replace(/\/\/[^\n]*/g, '')
.trim();
const separator = between.length === 0 || between.endsWith(',') ? '' : ',';
const insertion = separator + '\n "' + KEY + '": true\n';
fs.writeFileSync(f, text.slice(0, lastBrace) + insertion + text.slice(lastBrace));
NODE
then
echo
"[launch.sh] failed to ensure files.simpleDialog.enable=true in $SETTINGS_FILE — automation may need to fall back to per-key input"
>
&2
exit
1
fi
echo
"[launch.sh] ensured files.simpleDialog.enable=true in $SETTINGS_FILE"
>
&2
PROFILE_READY_MS
=
$(monotonic_ms)
# Strip ELECTRON_RUN_AS_NODE, commonly inherited from VS Code's integrated
# terminal / agent runtimes; it breaks ./scripts/code.sh.
unset
CODE_SH
=
"$REPO/scripts/code.sh"
if
[
[
!
-x
"$CODE_SH"
]
]
;
then
echo
"Could not find an executable Code OSS launcher at $CODE_SH. Pass --repo <vscode-repo-root>."
>
&2
exit
2
fi
ARGS
=
(
"--user-data-dir=$DEST_UDD"
"--extensions-dir=$EXT_DIR"
"--shared-data-dir=$SHARED_DATA_DIR"
"--remote-debugging-port=$CDP_PORT"
"--inspect-extensions=$EXTHOST_PORT"
"--inspect=$MAIN_PORT"
"--inspect-agenthost=$AGENTHOST_PORT"
)
if
[
[
"$DISABLE_WORKSPACE_TRUST"
==
"1"
]
]
;
then
ARGS
+=
(
"--disable-workspace-trust"
)
fi
if
[
[
"$AGENTS"
==
"1"
]
]
;
then
ARGS
=
(
"--agents"
"${ARGS[@]}"
)
fi
if
(( ${#EXTRA_ARGS[@]} ))
;
then
ARGS
+=
(
"${EXTRA_ARGS[@]}"
)
fi
LOG_FILE
=
"$RUN_DIR/code.log"
echo
"[launch.sh] launching: $CODE_SH${ARGS[*]}"
>
&2
echo
"[launch.sh] logs: $LOG_FILE"
>
&2
# Run pre-launch (electron download, compile-if-missing, built-in extensions) in the
# foreground so any errors surface synchronously. Then skip code.sh's own pre-launch.
if
[
[
"$SKIP_PRELAUNCH"
==
"1"
]
]
;
then
echo
"[launch.sh] skipping pre-launch by request"
>
&2
else
echo
"[launch.sh] running pre-launch (ensures electron + compiled output + built-ins)..."
>
&2
if
!
(
cd
"$REPO"
&&
node
)
>>
"$LOG_FILE"
2>
&1
;
then
echo
"[launch.sh] pre-launch FAILED. Log tail:"
>
&2
tail
-n
80
"$LOG_FILE"
>
&2
exit
1
fi
fi
PRELAUNCH_READY_MS
=
$(monotonic_ms)
# Launch code.sh in the background. Detaching with `nohup ... & disown` is
# sufficient: by the time we return below, CDP is up and Electron is fully
# forked into its own process tree, so it's robust to its launching shell
# going away. (Earlier failures came from returning while Electron was still
# mid-bootstrap, not from process-group concerns.)
nohup
env
VSCODE_SKIP_PRELAUNCH
=
1
"$CODE_SH"
"${ARGS[@]}"
\
<
>>
"$LOG_FILE"
2>
&1
&
PID
=
$!
$PID
2>
||
true
# Block until the renderer's CDP endpoint is responding so the caller can attach
# immediately. If code.sh dies or we time out, dump the log so the failure is
# visible.
echo
"[launch.sh] waiting for CDP on port $CDP_PORT (timeout 90s)..."
>
&2
WAIT_FOR_CDP
=
"$(cd "$(dirname"$0")"
&&
pwd
)
"
if READY_MS=$(node"$WAIT_FOR_CDP""$PID""$CDP_PORT"); then
echo "