ocx 1.4.4 → 1.4.6
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/index.js +35 -20
- package/dist/index.js.map +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10090,9 +10090,9 @@ var targetPathSchema = exports_external.string().refine((path2) => path2.startsW
|
|
|
10090
10090
|
const dir = parts[1];
|
|
10091
10091
|
if (!dir)
|
|
10092
10092
|
return false;
|
|
10093
|
-
return ["agent", "
|
|
10093
|
+
return ["agent", "skills", "plugin", "command", "tool", "philosophy"].includes(dir);
|
|
10094
10094
|
}, {
|
|
10095
|
-
message: 'Target must be in a valid directory: ".opencode/{agent|
|
|
10095
|
+
message: 'Target must be in a valid directory: ".opencode/{agent|skills|plugin|command|tool|philosophy}/..."'
|
|
10096
10096
|
});
|
|
10097
10097
|
var oauthConfigSchema = exports_external.object({
|
|
10098
10098
|
clientId: exports_external.string().optional(),
|
|
@@ -11125,7 +11125,7 @@ class ConfigResolver {
|
|
|
11125
11125
|
// package.json
|
|
11126
11126
|
var package_default = {
|
|
11127
11127
|
name: "ocx",
|
|
11128
|
-
version: "1.4.
|
|
11128
|
+
version: "1.4.6",
|
|
11129
11129
|
description: "OCX CLI - ShadCN-style registry for OpenCode extensions. Install agents, plugins, skills, and MCP servers.",
|
|
11130
11130
|
author: "kdcokenny",
|
|
11131
11131
|
license: "MIT",
|
|
@@ -15323,7 +15323,7 @@ import path7 from "path";
|
|
|
15323
15323
|
var GHOST_CONFIG_FILE = "ghost.jsonc";
|
|
15324
15324
|
var BACKUP_EXT = ".bak";
|
|
15325
15325
|
var CURRENT_SYMLINK = "current";
|
|
15326
|
-
var FLATTEN_DIRS = ["plugin", "agent", "
|
|
15326
|
+
var FLATTEN_DIRS = ["plugin", "agent", "skills", "command"];
|
|
15327
15327
|
function moveAtomically(source, destination, isDir) {
|
|
15328
15328
|
try {
|
|
15329
15329
|
renameSync(source, destination);
|
|
@@ -15814,7 +15814,7 @@ async function copyDir(src, dest) {
|
|
|
15814
15814
|
}
|
|
15815
15815
|
function getReleaseTag() {
|
|
15816
15816
|
if (false) {}
|
|
15817
|
-
return `v${"1.4.
|
|
15817
|
+
return `v${"1.4.6"}`;
|
|
15818
15818
|
}
|
|
15819
15819
|
function getTemplateUrl(version) {
|
|
15820
15820
|
const ref = version === "main" ? "heads/main" : `tags/${version}`;
|
|
@@ -15878,9 +15878,6 @@ async function replacePlaceholders(dir, values) {
|
|
|
15878
15878
|
}
|
|
15879
15879
|
}
|
|
15880
15880
|
|
|
15881
|
-
// src/commands/opencode.ts
|
|
15882
|
-
import { resolve as resolve3 } from "path";
|
|
15883
|
-
|
|
15884
15881
|
// src/utils/terminal-title.ts
|
|
15885
15882
|
import path8 from "path";
|
|
15886
15883
|
var MAX_BRANCH_LENGTH = 20;
|
|
@@ -15947,16 +15944,16 @@ function buildOpenCodeEnv(opts) {
|
|
|
15947
15944
|
};
|
|
15948
15945
|
}
|
|
15949
15946
|
function registerOpencodeCommand(program2) {
|
|
15950
|
-
program2.command("
|
|
15947
|
+
program2.command("oc").alias("opencode").description("Launch OpenCode with resolved configuration").option("-p, --profile <name>", "Use specific profile").option("--no-rename", "Disable terminal/tmux window renaming").allowUnknownOption().allowExcessArguments(true).action(async (options2, command) => {
|
|
15951
15948
|
try {
|
|
15952
|
-
await runOpencode(
|
|
15949
|
+
await runOpencode(command.args, options2);
|
|
15953
15950
|
} catch (error) {
|
|
15954
|
-
handleError(error
|
|
15951
|
+
handleError(error);
|
|
15955
15952
|
}
|
|
15956
15953
|
});
|
|
15957
15954
|
}
|
|
15958
|
-
async function runOpencode(
|
|
15959
|
-
const projectDir =
|
|
15955
|
+
async function runOpencode(args, options2) {
|
|
15956
|
+
const projectDir = process.cwd();
|
|
15960
15957
|
const resolver = await ConfigResolver.create(projectDir, { profile: options2.profile });
|
|
15961
15958
|
const config = resolver.resolve();
|
|
15962
15959
|
const profile = resolver.getProfile();
|
|
@@ -15966,13 +15963,13 @@ async function runOpencode(pathArg, args, options2) {
|
|
|
15966
15963
|
throw new ProfilesNotInitializedError;
|
|
15967
15964
|
}
|
|
15968
15965
|
}
|
|
15969
|
-
if (config.profileName
|
|
15966
|
+
if (config.profileName) {
|
|
15970
15967
|
logger.info(`Using profile: ${config.profileName}`);
|
|
15971
15968
|
}
|
|
15972
15969
|
const ocxConfig = profile?.ocx;
|
|
15973
15970
|
const shouldRename = options2.rename !== false && ocxConfig?.renameWindow !== false;
|
|
15974
15971
|
const profileDir = config.profileName ? getProfileDir(config.profileName) : undefined;
|
|
15975
|
-
if (config.profileName
|
|
15972
|
+
if (config.profileName) {
|
|
15976
15973
|
const profileOpencodePath = getProfileOpencodeConfig(config.profileName);
|
|
15977
15974
|
const profileOpencodeFile = Bun.file(profileOpencodePath);
|
|
15978
15975
|
const hasOpencodeConfig = await profileOpencodeFile.exists();
|
|
@@ -15985,8 +15982,26 @@ async function runOpencode(pathArg, args, options2) {
|
|
|
15985
15982
|
instructions: config.instructions.length > 0 ? config.instructions : undefined
|
|
15986
15983
|
} : undefined;
|
|
15987
15984
|
let proc = null;
|
|
15988
|
-
const sigintHandler = () =>
|
|
15989
|
-
|
|
15985
|
+
const sigintHandler = () => {
|
|
15986
|
+
if (proc) {
|
|
15987
|
+
proc.kill("SIGINT");
|
|
15988
|
+
} else {
|
|
15989
|
+
if (shouldRename) {
|
|
15990
|
+
restoreTerminalTitle();
|
|
15991
|
+
}
|
|
15992
|
+
process.exit(130);
|
|
15993
|
+
}
|
|
15994
|
+
};
|
|
15995
|
+
const sigtermHandler = () => {
|
|
15996
|
+
if (proc) {
|
|
15997
|
+
proc.kill("SIGTERM");
|
|
15998
|
+
} else {
|
|
15999
|
+
if (shouldRename) {
|
|
16000
|
+
restoreTerminalTitle();
|
|
16001
|
+
}
|
|
16002
|
+
process.exit(143);
|
|
16003
|
+
}
|
|
16004
|
+
};
|
|
15990
16005
|
process.on("SIGINT", sigintHandler);
|
|
15991
16006
|
process.on("SIGTERM", sigtermHandler);
|
|
15992
16007
|
const exitHandler = () => {
|
|
@@ -17202,7 +17217,7 @@ function registerSelfUninstallCommand(parent) {
|
|
|
17202
17217
|
|
|
17203
17218
|
// src/self-update/version-provider.ts
|
|
17204
17219
|
class BuildTimeVersionProvider {
|
|
17205
|
-
version = "1.4.
|
|
17220
|
+
version = "1.4.6";
|
|
17206
17221
|
}
|
|
17207
17222
|
var defaultVersionProvider = new BuildTimeVersionProvider;
|
|
17208
17223
|
|
|
@@ -17859,7 +17874,7 @@ function registerUpdateCheckHook(program2) {
|
|
|
17859
17874
|
});
|
|
17860
17875
|
}
|
|
17861
17876
|
// src/index.ts
|
|
17862
|
-
var version = "1.4.
|
|
17877
|
+
var version = "1.4.6";
|
|
17863
17878
|
async function main2() {
|
|
17864
17879
|
const program2 = new Command().name("ocx").description("OpenCode Extensions - Install agents, skills, plugins, and commands").version(version);
|
|
17865
17880
|
registerInitCommand(program2);
|
|
@@ -17891,4 +17906,4 @@ export {
|
|
|
17891
17906
|
buildRegistry
|
|
17892
17907
|
};
|
|
17893
17908
|
|
|
17894
|
-
//# debugId=
|
|
17909
|
+
//# debugId=77F82471CA163CBD64756E2164756E21
|