oh-my-customcode 0.12.3 → 0.12.4

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 CHANGED
@@ -14074,11 +14074,18 @@ async function generateMCPConfig(targetDir) {
14074
14074
  if (!ontologyExists) {
14075
14075
  return;
14076
14076
  }
14077
+ try {
14078
+ execSync3("uv venv .venv", { cwd: targetDir, stdio: "pipe" });
14079
+ execSync3("uv pip install ontology-rag", { cwd: targetDir, stdio: "pipe" });
14080
+ } catch (error2) {
14081
+ const msg = error2 instanceof Error ? error2.message : String(error2);
14082
+ throw new Error(`Failed to setup Python environment: ${msg}`);
14083
+ }
14077
14084
  const config = {
14078
14085
  mcpServers: {
14079
14086
  "ontology-rag": {
14080
14087
  type: "stdio",
14081
- command: "python",
14088
+ command: ".venv/bin/python",
14082
14089
  args: ["-m", "ontology_rag.mcp_server"],
14083
14090
  env: {
14084
14091
  ONTOLOGY_DIR: ontologyDir
@@ -14107,9 +14114,9 @@ async function generateMCPConfig(targetDir) {
14107
14114
  `);
14108
14115
  }
14109
14116
  }
14110
- async function checkPythonAvailable() {
14117
+ async function checkUvAvailable() {
14111
14118
  try {
14112
- execSync3("python --version", { stdio: "pipe" });
14119
+ execSync3("uv --version", { stdio: "pipe" });
14113
14120
  return true;
14114
14121
  } catch {
14115
14122
  return false;
@@ -14187,16 +14194,17 @@ async function initCommand(options) {
14187
14194
  const installedPaths = buildInstalledPaths(targetDir, installResult.installedComponents);
14188
14195
  logInstallResultInfo(installResult);
14189
14196
  logSuccessDetails(installedPaths, installResult.skippedComponents);
14190
- const pythonAvailable = await checkPythonAvailable();
14191
- if (pythonAvailable) {
14197
+ const uvAvailable = await checkUvAvailable();
14198
+ if (uvAvailable) {
14192
14199
  try {
14193
14200
  await generateMCPConfig(targetDir);
14194
- } catch {
14195
- console.warn("Warning: Failed to generate MCP config. You can configure it manually.");
14201
+ } catch (error2) {
14202
+ const msg = error2 instanceof Error ? error2.message : String(error2);
14203
+ console.warn(`Warning: Failed to setup MCP environment: ${msg}`);
14196
14204
  }
14197
14205
  } else {
14198
- console.warn("Warning: Python not found. Skipping MCP server configuration.");
14199
- console.warn("Install Python 3.10+ and ontology-rag to enable MCP integration.");
14206
+ console.warn("Warning: uv not found. Skipping MCP server configuration.");
14207
+ console.warn("Install uv (https://docs.astral.sh/uv/) to enable MCP integration.");
14200
14208
  }
14201
14209
  return {
14202
14210
  success: true,
package/dist/index.js CHANGED
@@ -1,4 +1,20 @@
1
1
  import { createRequire } from "node:module";
2
+ var __create = Object.create;
3
+ var __getProtoOf = Object.getPrototypeOf;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __toESM = (mod, isNodeMode, target) => {
8
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
9
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
+ for (let key of __getOwnPropNames(mod))
11
+ if (!__hasOwnProp.call(to, key))
12
+ __defProp(to, key, {
13
+ get: () => mod[key],
14
+ enumerable: true
15
+ });
16
+ return to;
17
+ };
2
18
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
3
19
 
4
20
  // src/core/config.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-customcode",
3
- "version": "0.12.3",
3
+ "version": "0.12.4",
4
4
  "description": "Batteries-included agent harness for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {