oh-my-opencode 3.17.13 → 3.17.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +181 -46
- package/dist/cli/run/continuation-state.d.ts +1 -0
- package/dist/features/background-agent/manager.d.ts +1 -0
- package/dist/features/background-agent/process-cleanup.d.ts +4 -0
- package/dist/features/run-continuation-state/types.d.ts +1 -1
- package/dist/features/skill-mcp-manager/types.d.ts +1 -0
- package/dist/index.js +330 -143
- package/dist/shared/bun-spawn-shim.d.ts +39 -0
- package/dist/shared/tmux/tmux-utils/spawn-process.d.ts +1 -1
- package/package.json +14 -13
package/dist/cli/index.js
CHANGED
|
@@ -6653,25 +6653,128 @@ var init_external_plugin_detector = __esm(() => {
|
|
|
6653
6653
|
init_plugin_identity();
|
|
6654
6654
|
});
|
|
6655
6655
|
|
|
6656
|
+
// src/shared/bun-spawn-shim.ts
|
|
6657
|
+
import { spawn as nodeSpawn, spawnSync as nodeSpawnSync } from "child_process";
|
|
6658
|
+
import { Readable, Writable } from "stream";
|
|
6659
|
+
function emptyReadableStream() {
|
|
6660
|
+
return new ReadableStream({
|
|
6661
|
+
start(controller) {
|
|
6662
|
+
controller.close();
|
|
6663
|
+
}
|
|
6664
|
+
});
|
|
6665
|
+
}
|
|
6666
|
+
function toReadableStream(stream) {
|
|
6667
|
+
if (!stream)
|
|
6668
|
+
return emptyReadableStream();
|
|
6669
|
+
return Readable.toWeb(stream);
|
|
6670
|
+
}
|
|
6671
|
+
function emptyWritableStream() {
|
|
6672
|
+
return new Writable({
|
|
6673
|
+
write(_chunk, _encoding, callback) {
|
|
6674
|
+
callback();
|
|
6675
|
+
}
|
|
6676
|
+
});
|
|
6677
|
+
}
|
|
6678
|
+
function resolveCommand(cmdOrOpts, optsArg) {
|
|
6679
|
+
const isObj = !Array.isArray(cmdOrOpts);
|
|
6680
|
+
const opts = isObj ? cmdOrOpts : optsArg ?? {};
|
|
6681
|
+
return {
|
|
6682
|
+
cmd: isObj ? cmdOrOpts.cmd : cmdOrOpts,
|
|
6683
|
+
opts
|
|
6684
|
+
};
|
|
6685
|
+
}
|
|
6686
|
+
function resolveStdio(options) {
|
|
6687
|
+
if (options.stdio)
|
|
6688
|
+
return options.stdio;
|
|
6689
|
+
return [options.stdin ?? "ignore", options.stdout ?? "pipe", options.stderr ?? "inherit"];
|
|
6690
|
+
}
|
|
6691
|
+
function wrapNodeProcess(proc) {
|
|
6692
|
+
let exitCode = null;
|
|
6693
|
+
const exited = new Promise((resolve4, reject) => {
|
|
6694
|
+
proc.on("exit", (code) => {
|
|
6695
|
+
exitCode = code ?? 1;
|
|
6696
|
+
resolve4(exitCode);
|
|
6697
|
+
});
|
|
6698
|
+
proc.on("error", (error) => {
|
|
6699
|
+
if (exitCode === null) {
|
|
6700
|
+
exitCode = 1;
|
|
6701
|
+
reject(error);
|
|
6702
|
+
}
|
|
6703
|
+
});
|
|
6704
|
+
});
|
|
6705
|
+
return {
|
|
6706
|
+
get exitCode() {
|
|
6707
|
+
return exitCode;
|
|
6708
|
+
},
|
|
6709
|
+
exited,
|
|
6710
|
+
stdout: toReadableStream(proc.stdout),
|
|
6711
|
+
stderr: toReadableStream(proc.stderr),
|
|
6712
|
+
stdin: proc.stdin ?? emptyWritableStream(),
|
|
6713
|
+
kill(signal) {
|
|
6714
|
+
if (proc.killed || exitCode !== null)
|
|
6715
|
+
return;
|
|
6716
|
+
try {
|
|
6717
|
+
proc.kill(signal);
|
|
6718
|
+
} catch (error) {
|
|
6719
|
+
if (!String(error).includes("kill"))
|
|
6720
|
+
throw error;
|
|
6721
|
+
}
|
|
6722
|
+
},
|
|
6723
|
+
pid: proc.pid,
|
|
6724
|
+
ref() {
|
|
6725
|
+
proc.ref();
|
|
6726
|
+
},
|
|
6727
|
+
unref() {
|
|
6728
|
+
proc.unref();
|
|
6729
|
+
}
|
|
6730
|
+
};
|
|
6731
|
+
}
|
|
6732
|
+
function spawn(cmdOrOpts, opts) {
|
|
6733
|
+
if (IS_BUN)
|
|
6734
|
+
return runtime.Bun.spawn(cmdOrOpts, opts);
|
|
6735
|
+
const { cmd, opts: options } = resolveCommand(cmdOrOpts, opts);
|
|
6736
|
+
const [bin, ...args] = cmd;
|
|
6737
|
+
const proc = nodeSpawn(bin, args, {
|
|
6738
|
+
cwd: options.cwd,
|
|
6739
|
+
env: options.env,
|
|
6740
|
+
stdio: resolveStdio(options),
|
|
6741
|
+
detached: options.detached
|
|
6742
|
+
});
|
|
6743
|
+
return wrapNodeProcess(proc);
|
|
6744
|
+
}
|
|
6745
|
+
var runtime, IS_BUN;
|
|
6746
|
+
var init_bun_spawn_shim = __esm(() => {
|
|
6747
|
+
runtime = globalThis;
|
|
6748
|
+
IS_BUN = typeof runtime.Bun !== "undefined";
|
|
6749
|
+
});
|
|
6750
|
+
|
|
6656
6751
|
// src/shared/archive-entry-validator.ts
|
|
6657
6752
|
var init_archive_entry_validator = () => {};
|
|
6658
6753
|
|
|
6659
6754
|
// src/shared/zip-entry-listing/python-zip-entry-listing.ts
|
|
6660
|
-
var init_python_zip_entry_listing = () => {
|
|
6755
|
+
var init_python_zip_entry_listing = __esm(() => {
|
|
6756
|
+
init_bun_spawn_shim();
|
|
6757
|
+
});
|
|
6661
6758
|
|
|
6662
6759
|
// src/shared/zip-entry-listing/powershell-zip-entry-listing.ts
|
|
6663
|
-
var init_powershell_zip_entry_listing = () => {
|
|
6760
|
+
var init_powershell_zip_entry_listing = __esm(() => {
|
|
6761
|
+
init_bun_spawn_shim();
|
|
6762
|
+
});
|
|
6664
6763
|
|
|
6665
6764
|
// src/shared/zip-entry-listing/tar-zip-entry-listing.ts
|
|
6666
6765
|
var init_tar_zip_entry_listing = __esm(() => {
|
|
6766
|
+
init_bun_spawn_shim();
|
|
6667
6767
|
init_logger();
|
|
6668
6768
|
});
|
|
6669
6769
|
|
|
6670
6770
|
// src/shared/zip-entry-listing/read-zip-symlink-target.ts
|
|
6671
|
-
var init_read_zip_symlink_target = () => {
|
|
6771
|
+
var init_read_zip_symlink_target = __esm(() => {
|
|
6772
|
+
init_bun_spawn_shim();
|
|
6773
|
+
});
|
|
6672
6774
|
|
|
6673
6775
|
// src/shared/zip-entry-listing/zipinfo-zip-entry-listing.ts
|
|
6674
6776
|
var init_zipinfo_zip_entry_listing = __esm(() => {
|
|
6777
|
+
init_bun_spawn_shim();
|
|
6675
6778
|
init_read_zip_symlink_target();
|
|
6676
6779
|
});
|
|
6677
6780
|
|
|
@@ -6685,6 +6788,7 @@ var init_zip_entry_listing = __esm(() => {
|
|
|
6685
6788
|
|
|
6686
6789
|
// src/shared/zip-extractor.ts
|
|
6687
6790
|
var init_zip_extractor = __esm(() => {
|
|
6791
|
+
init_bun_spawn_shim();
|
|
6688
6792
|
init_archive_entry_validator();
|
|
6689
6793
|
init_zip_entry_listing();
|
|
6690
6794
|
});
|
|
@@ -6697,6 +6801,7 @@ function getCachedBinaryPath(cacheDir, binaryName) {
|
|
|
6697
6801
|
return existsSync6(binaryPath) ? binaryPath : null;
|
|
6698
6802
|
}
|
|
6699
6803
|
var init_binary_downloader = __esm(() => {
|
|
6804
|
+
init_bun_spawn_shim();
|
|
6700
6805
|
init_archive_entry_validator();
|
|
6701
6806
|
init_zip_extractor();
|
|
6702
6807
|
});
|
|
@@ -7143,6 +7248,7 @@ function toLogLabel(cacheLabel) {
|
|
|
7143
7248
|
}
|
|
7144
7249
|
function createJsonFileCacheStore(options) {
|
|
7145
7250
|
let memoryValue;
|
|
7251
|
+
let writtenInCurrentProcess = false;
|
|
7146
7252
|
function getCacheFilePath() {
|
|
7147
7253
|
return join8(options.getCacheDir(), options.filename);
|
|
7148
7254
|
}
|
|
@@ -7177,6 +7283,12 @@ function createJsonFileCacheStore(options) {
|
|
|
7177
7283
|
}
|
|
7178
7284
|
}
|
|
7179
7285
|
function has() {
|
|
7286
|
+
if (memoryValue !== undefined && memoryValue !== null) {
|
|
7287
|
+
return true;
|
|
7288
|
+
}
|
|
7289
|
+
if (writtenInCurrentProcess) {
|
|
7290
|
+
return true;
|
|
7291
|
+
}
|
|
7180
7292
|
return existsSync7(getCacheFilePath());
|
|
7181
7293
|
}
|
|
7182
7294
|
function write(value) {
|
|
@@ -7185,6 +7297,7 @@ function createJsonFileCacheStore(options) {
|
|
|
7185
7297
|
try {
|
|
7186
7298
|
writeFileSync2(cacheFile, options.serialize?.(value) ?? JSON.stringify(value, null, 2));
|
|
7187
7299
|
memoryValue = value;
|
|
7300
|
+
writtenInCurrentProcess = true;
|
|
7188
7301
|
log(`[${options.logPrefix}] ${options.cacheLabel} written`, options.describe(value));
|
|
7189
7302
|
} catch (error) {
|
|
7190
7303
|
log(`[${options.logPrefix}] Error writing ${toLogLabel(options.cacheLabel)}`, {
|
|
@@ -7194,6 +7307,7 @@ function createJsonFileCacheStore(options) {
|
|
|
7194
7307
|
}
|
|
7195
7308
|
function resetMemory() {
|
|
7196
7309
|
memoryValue = undefined;
|
|
7310
|
+
writtenInCurrentProcess = false;
|
|
7197
7311
|
}
|
|
7198
7312
|
return {
|
|
7199
7313
|
read,
|
|
@@ -7244,6 +7358,9 @@ function createConnectedProvidersCacheStore(getCacheDir2 = getOmoOpenCodeCacheDi
|
|
|
7244
7358
|
return providerModelsCacheStore.read();
|
|
7245
7359
|
}
|
|
7246
7360
|
function hasProviderModelsCache() {
|
|
7361
|
+
if (providerModelsCacheWrittenInCurrentProcess) {
|
|
7362
|
+
return true;
|
|
7363
|
+
}
|
|
7247
7364
|
return providerModelsCacheStore.has();
|
|
7248
7365
|
}
|
|
7249
7366
|
function writeProviderModelsCache(data) {
|
|
@@ -7251,6 +7368,7 @@ function createConnectedProvidersCacheStore(getCacheDir2 = getOmoOpenCodeCacheDi
|
|
|
7251
7368
|
...data,
|
|
7252
7369
|
updatedAt: new Date().toISOString()
|
|
7253
7370
|
});
|
|
7371
|
+
providerModelsCacheWrittenInCurrentProcess = true;
|
|
7254
7372
|
}
|
|
7255
7373
|
async function updateConnectedProvidersCache(client) {
|
|
7256
7374
|
if (!client?.provider?.list) {
|
|
@@ -7299,6 +7417,7 @@ function createConnectedProvidersCacheStore(getCacheDir2 = getOmoOpenCodeCacheDi
|
|
|
7299
7417
|
function _resetMemCacheForTesting() {
|
|
7300
7418
|
connectedProvidersCacheStore.resetMemory();
|
|
7301
7419
|
providerModelsCacheStore.resetMemory();
|
|
7420
|
+
providerModelsCacheWrittenInCurrentProcess = false;
|
|
7302
7421
|
}
|
|
7303
7422
|
return {
|
|
7304
7423
|
readConnectedProvidersCache,
|
|
@@ -7328,7 +7447,7 @@ function findProviderModelMetadata(providerID, modelID, cache = defaultConnected
|
|
|
7328
7447
|
}
|
|
7329
7448
|
return;
|
|
7330
7449
|
}
|
|
7331
|
-
var CONNECTED_PROVIDERS_CACHE_FILE = "connected-providers.json", PROVIDER_MODELS_CACHE_FILE = "provider-models.json", defaultConnectedProvidersCacheStore, readConnectedProvidersCache, hasConnectedProvidersCache, readProviderModelsCache, hasProviderModelsCache, writeProviderModelsCache, updateConnectedProvidersCache, _resetMemCacheForTesting;
|
|
7450
|
+
var providerModelsCacheWrittenInCurrentProcess = false, CONNECTED_PROVIDERS_CACHE_FILE = "connected-providers.json", PROVIDER_MODELS_CACHE_FILE = "provider-models.json", defaultConnectedProvidersCacheStore, readConnectedProvidersCache, hasConnectedProvidersCache, readProviderModelsCache, hasProviderModelsCache, writeProviderModelsCache, updateConnectedProvidersCache, _resetMemCacheForTesting;
|
|
7332
7451
|
var init_connected_providers_cache = __esm(() => {
|
|
7333
7452
|
init_logger();
|
|
7334
7453
|
init_data_path();
|
|
@@ -50621,31 +50740,38 @@ var init_server_health = __esm(() => {
|
|
|
50621
50740
|
});
|
|
50622
50741
|
|
|
50623
50742
|
// src/tools/interactive-bash/tmux-path-resolver.ts
|
|
50624
|
-
var init_tmux_path_resolver = () => {
|
|
50743
|
+
var init_tmux_path_resolver = __esm(() => {
|
|
50744
|
+
init_bun_spawn_shim();
|
|
50745
|
+
});
|
|
50625
50746
|
|
|
50626
50747
|
// src/shared/tmux/tmux-utils/pane-dimensions.ts
|
|
50627
50748
|
var init_pane_dimensions = __esm(() => {
|
|
50749
|
+
init_bun_spawn_shim();
|
|
50628
50750
|
init_tmux_path_resolver();
|
|
50629
50751
|
});
|
|
50630
50752
|
|
|
50631
50753
|
// src/shared/tmux/tmux-utils/pane-spawn.ts
|
|
50632
50754
|
var init_pane_spawn = __esm(() => {
|
|
50755
|
+
init_bun_spawn_shim();
|
|
50633
50756
|
init_tmux_path_resolver();
|
|
50634
50757
|
init_server_health();
|
|
50635
50758
|
});
|
|
50636
50759
|
// src/shared/tmux/tmux-utils/pane-replace.ts
|
|
50637
50760
|
var init_pane_replace = __esm(() => {
|
|
50761
|
+
init_bun_spawn_shim();
|
|
50638
50762
|
init_tmux_path_resolver();
|
|
50639
50763
|
});
|
|
50640
50764
|
|
|
50641
50765
|
// src/shared/tmux/tmux-utils/window-spawn.ts
|
|
50642
50766
|
var init_window_spawn = __esm(() => {
|
|
50767
|
+
init_bun_spawn_shim();
|
|
50643
50768
|
init_tmux_path_resolver();
|
|
50644
50769
|
init_server_health();
|
|
50645
50770
|
});
|
|
50646
50771
|
|
|
50647
50772
|
// src/shared/tmux/tmux-utils/session-spawn.ts
|
|
50648
50773
|
var init_session_spawn = __esm(() => {
|
|
50774
|
+
init_bun_spawn_shim();
|
|
50649
50775
|
init_tmux_path_resolver();
|
|
50650
50776
|
init_server_health();
|
|
50651
50777
|
});
|
|
@@ -50654,6 +50780,7 @@ var init_stale_session_sweep = () => {};
|
|
|
50654
50780
|
|
|
50655
50781
|
// src/shared/tmux/tmux-utils/layout.ts
|
|
50656
50782
|
var init_layout = __esm(() => {
|
|
50783
|
+
init_bun_spawn_shim();
|
|
50657
50784
|
init_tmux_path_resolver();
|
|
50658
50785
|
});
|
|
50659
50786
|
|
|
@@ -52040,16 +52167,15 @@ var init_write_omo_config = __esm(() => {
|
|
|
52040
52167
|
});
|
|
52041
52168
|
|
|
52042
52169
|
// src/shared/spawn-with-windows-hide.ts
|
|
52043
|
-
|
|
52044
|
-
import {
|
|
52045
|
-
|
|
52046
|
-
function toReadableStream(stream) {
|
|
52170
|
+
import { spawn as nodeSpawn2 } from "child_process";
|
|
52171
|
+
import { Readable as Readable2 } from "stream";
|
|
52172
|
+
function toReadableStream2(stream) {
|
|
52047
52173
|
if (!stream) {
|
|
52048
52174
|
return;
|
|
52049
52175
|
}
|
|
52050
|
-
return
|
|
52176
|
+
return Readable2.toWeb(stream);
|
|
52051
52177
|
}
|
|
52052
|
-
function
|
|
52178
|
+
function wrapNodeProcess2(proc) {
|
|
52053
52179
|
let resolveExited;
|
|
52054
52180
|
let exitCode = null;
|
|
52055
52181
|
const exited = new Promise((resolve4) => {
|
|
@@ -52070,8 +52196,8 @@ function wrapNodeProcess(proc) {
|
|
|
52070
52196
|
return exitCode;
|
|
52071
52197
|
},
|
|
52072
52198
|
exited,
|
|
52073
|
-
stdout:
|
|
52074
|
-
stderr:
|
|
52199
|
+
stdout: toReadableStream2(proc.stdout),
|
|
52200
|
+
stderr: toReadableStream2(proc.stderr),
|
|
52075
52201
|
kill(signal) {
|
|
52076
52202
|
try {
|
|
52077
52203
|
if (!signal) {
|
|
@@ -52085,19 +52211,21 @@ function wrapNodeProcess(proc) {
|
|
|
52085
52211
|
}
|
|
52086
52212
|
function spawnWithWindowsHide(command, options) {
|
|
52087
52213
|
if (process.platform !== "win32") {
|
|
52088
|
-
return
|
|
52214
|
+
return spawn(command, options);
|
|
52089
52215
|
}
|
|
52090
52216
|
const [cmd, ...args] = command;
|
|
52091
|
-
const proc =
|
|
52217
|
+
const proc = nodeSpawn2(cmd, args, {
|
|
52092
52218
|
cwd: options.cwd,
|
|
52093
52219
|
env: options.env,
|
|
52094
|
-
stdio: [options.stdin ?? "
|
|
52220
|
+
stdio: [options.stdin ?? "ignore", options.stdout ?? "pipe", options.stderr ?? "inherit"],
|
|
52095
52221
|
windowsHide: true,
|
|
52096
52222
|
shell: true
|
|
52097
52223
|
});
|
|
52098
|
-
return
|
|
52224
|
+
return wrapNodeProcess2(proc);
|
|
52099
52225
|
}
|
|
52100
|
-
var init_spawn_with_windows_hide = () => {
|
|
52226
|
+
var init_spawn_with_windows_hide = __esm(() => {
|
|
52227
|
+
init_bun_spawn_shim();
|
|
52228
|
+
});
|
|
52101
52229
|
|
|
52102
52230
|
// src/cli/config-manager/opencode-binary.ts
|
|
52103
52231
|
async function findOpenCodeBinaryWithVersion() {
|
|
@@ -52664,10 +52792,10 @@ var require_resolveCommand = __commonJS((exports, module) => {
|
|
|
52664
52792
|
}
|
|
52665
52793
|
return resolved;
|
|
52666
52794
|
}
|
|
52667
|
-
function
|
|
52795
|
+
function resolveCommand2(parsed) {
|
|
52668
52796
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
52669
52797
|
}
|
|
52670
|
-
module.exports =
|
|
52798
|
+
module.exports = resolveCommand2;
|
|
52671
52799
|
});
|
|
52672
52800
|
|
|
52673
52801
|
// node_modules/cross-spawn/lib/util/escape.js
|
|
@@ -52735,19 +52863,19 @@ var require_readShebang = __commonJS((exports, module) => {
|
|
|
52735
52863
|
// node_modules/cross-spawn/lib/parse.js
|
|
52736
52864
|
var require_parse = __commonJS((exports, module) => {
|
|
52737
52865
|
var path6 = __require("path");
|
|
52738
|
-
var
|
|
52866
|
+
var resolveCommand2 = require_resolveCommand();
|
|
52739
52867
|
var escape = require_escape();
|
|
52740
52868
|
var readShebang = require_readShebang();
|
|
52741
52869
|
var isWin = process.platform === "win32";
|
|
52742
52870
|
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
52743
52871
|
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
52744
52872
|
function detectShebang(parsed) {
|
|
52745
|
-
parsed.file =
|
|
52873
|
+
parsed.file = resolveCommand2(parsed);
|
|
52746
52874
|
const shebang = parsed.file && readShebang(parsed.file);
|
|
52747
52875
|
if (shebang) {
|
|
52748
52876
|
parsed.args.unshift(parsed.file);
|
|
52749
52877
|
parsed.command = shebang;
|
|
52750
|
-
return
|
|
52878
|
+
return resolveCommand2(parsed);
|
|
52751
52879
|
}
|
|
52752
52880
|
return parsed.file;
|
|
52753
52881
|
}
|
|
@@ -52843,21 +52971,21 @@ var require_cross_spawn = __commonJS((exports, module) => {
|
|
|
52843
52971
|
var cp = __require("child_process");
|
|
52844
52972
|
var parse7 = require_parse();
|
|
52845
52973
|
var enoent = require_enoent();
|
|
52846
|
-
function
|
|
52974
|
+
function spawn2(command, args, options) {
|
|
52847
52975
|
const parsed = parse7(command, args, options);
|
|
52848
52976
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
52849
52977
|
enoent.hookChildProcess(spawned, parsed);
|
|
52850
52978
|
return spawned;
|
|
52851
52979
|
}
|
|
52852
|
-
function
|
|
52980
|
+
function spawnSync2(command, args, options) {
|
|
52853
52981
|
const parsed = parse7(command, args, options);
|
|
52854
52982
|
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
52855
52983
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
52856
52984
|
return result;
|
|
52857
52985
|
}
|
|
52858
|
-
module.exports =
|
|
52859
|
-
module.exports.spawn =
|
|
52860
|
-
module.exports.sync =
|
|
52986
|
+
module.exports = spawn2;
|
|
52987
|
+
module.exports.spawn = spawn2;
|
|
52988
|
+
module.exports.sync = spawnSync2;
|
|
52861
52989
|
module.exports._parse = parse7;
|
|
52862
52990
|
module.exports._enoent = enoent;
|
|
52863
52991
|
});
|
|
@@ -53206,7 +53334,7 @@ async function checkForUpdate(directory) {
|
|
|
53206
53334
|
isPinned: pluginInfo.isPinned
|
|
53207
53335
|
};
|
|
53208
53336
|
}
|
|
53209
|
-
const needsUpdate = currentVersion !==
|
|
53337
|
+
const needsUpdate = compareVersions(currentVersion, latestVersion) !== 0;
|
|
53210
53338
|
log(`[auto-update-checker] Current: ${currentVersion}, Latest (${channel}): ${latestVersion}, NeedsUpdate: ${needsUpdate}`);
|
|
53211
53339
|
return {
|
|
53212
53340
|
needsUpdate,
|
|
@@ -53218,6 +53346,7 @@ async function checkForUpdate(directory) {
|
|
|
53218
53346
|
}
|
|
53219
53347
|
var init_check_for_update = __esm(() => {
|
|
53220
53348
|
init_logger();
|
|
53349
|
+
init_opencode_version();
|
|
53221
53350
|
init_local_dev_path();
|
|
53222
53351
|
init_plugin_entry();
|
|
53223
53352
|
init_cached_version();
|
|
@@ -53867,7 +53996,7 @@ var {
|
|
|
53867
53996
|
// package.json
|
|
53868
53997
|
var package_default = {
|
|
53869
53998
|
name: "oh-my-opencode",
|
|
53870
|
-
version: "3.17.
|
|
53999
|
+
version: "3.17.15",
|
|
53871
54000
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
53872
54001
|
main: "./dist/index.js",
|
|
53873
54002
|
types: "dist/index.d.ts",
|
|
@@ -53889,7 +54018,8 @@ var package_default = {
|
|
|
53889
54018
|
"./schema.json": "./dist/oh-my-opencode.schema.json"
|
|
53890
54019
|
},
|
|
53891
54020
|
scripts: {
|
|
53892
|
-
build: "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external zod && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
|
|
54021
|
+
build: "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external zod && bun run build:node-require-shim && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
|
|
54022
|
+
"build:node-require-shim": "bun run script/patch-node-require-shim.ts",
|
|
53893
54023
|
"build:all": "bun run build && bun run build:binaries",
|
|
53894
54024
|
"build:binaries": "bun run script/build-binaries.ts",
|
|
53895
54025
|
"build:schema": "bun run script/build-schema.ts",
|
|
@@ -53947,17 +54077,17 @@ var package_default = {
|
|
|
53947
54077
|
zod: "^4.3.0"
|
|
53948
54078
|
},
|
|
53949
54079
|
optionalDependencies: {
|
|
53950
|
-
"oh-my-opencode-darwin-arm64": "3.17.
|
|
53951
|
-
"oh-my-opencode-darwin-x64": "3.17.
|
|
53952
|
-
"oh-my-opencode-darwin-x64-baseline": "3.17.
|
|
53953
|
-
"oh-my-opencode-linux-arm64": "3.17.
|
|
53954
|
-
"oh-my-opencode-linux-arm64-musl": "3.17.
|
|
53955
|
-
"oh-my-opencode-linux-x64": "3.17.
|
|
53956
|
-
"oh-my-opencode-linux-x64-baseline": "3.17.
|
|
53957
|
-
"oh-my-opencode-linux-x64-musl": "3.17.
|
|
53958
|
-
"oh-my-opencode-linux-x64-musl-baseline": "3.17.
|
|
53959
|
-
"oh-my-opencode-windows-x64": "3.17.
|
|
53960
|
-
"oh-my-opencode-windows-x64-baseline": "3.17.
|
|
54080
|
+
"oh-my-opencode-darwin-arm64": "3.17.15",
|
|
54081
|
+
"oh-my-opencode-darwin-x64": "3.17.15",
|
|
54082
|
+
"oh-my-opencode-darwin-x64-baseline": "3.17.15",
|
|
54083
|
+
"oh-my-opencode-linux-arm64": "3.17.15",
|
|
54084
|
+
"oh-my-opencode-linux-arm64-musl": "3.17.15",
|
|
54085
|
+
"oh-my-opencode-linux-x64": "3.17.15",
|
|
54086
|
+
"oh-my-opencode-linux-x64-baseline": "3.17.15",
|
|
54087
|
+
"oh-my-opencode-linux-x64-musl": "3.17.15",
|
|
54088
|
+
"oh-my-opencode-linux-x64-musl-baseline": "3.17.15",
|
|
54089
|
+
"oh-my-opencode-windows-x64": "3.17.15",
|
|
54090
|
+
"oh-my-opencode-windows-x64-baseline": "3.17.15"
|
|
53961
54091
|
},
|
|
53962
54092
|
overrides: {},
|
|
53963
54093
|
trustedDependencies: [
|
|
@@ -71434,12 +71564,12 @@ function createOpencodeClient(config2) {
|
|
|
71434
71564
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
71435
71565
|
|
|
71436
71566
|
// node_modules/@opencode-ai/sdk/dist/process.js
|
|
71437
|
-
import { spawnSync } from "child_process";
|
|
71567
|
+
import { spawnSync as spawnSync2 } from "child_process";
|
|
71438
71568
|
function stop(proc) {
|
|
71439
71569
|
if (proc.exitCode !== null || proc.signalCode !== null)
|
|
71440
71570
|
return;
|
|
71441
71571
|
if (process.platform === "win32" && proc.pid) {
|
|
71442
|
-
const out =
|
|
71572
|
+
const out = spawnSync2("taskkill", ["/pid", String(proc.pid), "/T", "/F"], { windowsHide: true });
|
|
71443
71573
|
if (!out.error && out.status === 0)
|
|
71444
71574
|
return;
|
|
71445
71575
|
}
|
|
@@ -72328,6 +72458,7 @@ async function getContinuationState(directory, sessionID, client3) {
|
|
|
72328
72458
|
hasActiveRalphLoop: hasActiveRalphLoopContinuation(directory, sessionID),
|
|
72329
72459
|
hasHookMarker: marker !== null,
|
|
72330
72460
|
hasTodoHookMarker: marker?.sources.todo !== undefined,
|
|
72461
|
+
hasActiveBackgroundTaskMarker: marker?.sources["background-task"]?.state === "active",
|
|
72331
72462
|
hasActiveHookMarker: isContinuationMarkerActive(marker),
|
|
72332
72463
|
activeHookMarkerReason: getActiveContinuationMarkerReason(marker)
|
|
72333
72464
|
};
|
|
@@ -72397,6 +72528,10 @@ async function checkCompletionConditions(ctx) {
|
|
|
72397
72528
|
if (!continuationState.hasTodoHookMarker && !await areAllTodosComplete(ctx)) {
|
|
72398
72529
|
return false;
|
|
72399
72530
|
}
|
|
72531
|
+
if (continuationState.hasActiveBackgroundTaskMarker) {
|
|
72532
|
+
logWaiting(ctx, continuationState.activeHookMarkerReason ?? "background tasks are active");
|
|
72533
|
+
return false;
|
|
72534
|
+
}
|
|
72400
72535
|
if (!await areAllChildrenIdle(ctx)) {
|
|
72401
72536
|
return false;
|
|
72402
72537
|
}
|
|
@@ -79755,7 +79890,7 @@ async function findAvailablePort2(startPort = DEFAULT_PORT) {
|
|
|
79755
79890
|
}
|
|
79756
79891
|
|
|
79757
79892
|
// src/features/mcp-oauth/oauth-authorization-flow.ts
|
|
79758
|
-
import { spawn } from "child_process";
|
|
79893
|
+
import { spawn as spawn2 } from "child_process";
|
|
79759
79894
|
import { createHash as createHash2, randomBytes as randomBytes2 } from "crypto";
|
|
79760
79895
|
import { createServer } from "http";
|
|
79761
79896
|
function generateCodeVerifier() {
|
|
@@ -79836,7 +79971,7 @@ function openBrowser(url2) {
|
|
|
79836
79971
|
args = [url2];
|
|
79837
79972
|
}
|
|
79838
79973
|
try {
|
|
79839
|
-
const child =
|
|
79974
|
+
const child = spawn2(command, args, { stdio: "ignore", detached: true });
|
|
79840
79975
|
child.on("error", () => {});
|
|
79841
79976
|
child.unref();
|
|
79842
79977
|
} catch {}
|
|
@@ -84,6 +84,7 @@ export declare class BackgroundManager {
|
|
|
84
84
|
private startTask;
|
|
85
85
|
getTask(id: string): BackgroundTask | undefined;
|
|
86
86
|
getTasksByParentSession(sessionID: string): BackgroundTask[];
|
|
87
|
+
private updateBackgroundTaskMarker;
|
|
87
88
|
getAllDescendantTasks(sessionID: string): BackgroundTask[];
|
|
88
89
|
findBySession(sessionID: string): BackgroundTask | undefined;
|
|
89
90
|
private resolveTaskAttemptBySession;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/** @internal test-only */
|
|
2
|
+
export declare function __disableScheduledForcedExitForTesting(): void;
|
|
3
|
+
/** @internal test-only */
|
|
4
|
+
export declare function __enableScheduledForcedExitForTesting(): void;
|
|
1
5
|
interface CleanupTarget {
|
|
2
6
|
shutdown(): void | Promise<void>;
|
|
3
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ContinuationMarkerSource = "todo" | "stop";
|
|
1
|
+
export type ContinuationMarkerSource = "todo" | "stop" | "background-task";
|
|
2
2
|
export type ContinuationMarkerState = "idle" | "active" | "stopped";
|
|
3
3
|
export interface ContinuationMarkerSourceEntry {
|
|
4
4
|
state: ContinuationMarkerState;
|