@omnidev-ai/cli 0.5.1 → 0.5.2

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 CHANGED
@@ -1,25 +1,22 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- __require,
4
- __toESM,
5
- debug,
6
- disableCapability,
7
- disableProvider,
8
- discoverCapabilities,
9
- enableCapability,
10
- enableProvider,
11
- generateInstructionsTemplate,
12
- getActiveProfile,
13
- getEnabledCapabilities,
14
- loadCapabilityConfig,
15
- loadConfig,
16
- readEnabledProviders,
17
- resolveEnabledCapabilities,
18
- setActiveProfile,
19
- syncAgentConfiguration,
20
- writeConfig,
21
- writeEnabledProviders
22
- } from "./shared/chunk-7txw9v1e.js";
2
+ import { createRequire } from "node:module";
3
+ var __create = Object.create;
4
+ var __getProtoOf = Object.getPrototypeOf;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __toESM = (mod, isNodeMode, target) => {
9
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
10
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
11
+ for (let key of __getOwnPropNames(mod))
12
+ if (!__hasOwnProp.call(to, key))
13
+ __defProp(to, key, {
14
+ get: () => mod[key],
15
+ enumerable: true
16
+ });
17
+ return to;
18
+ };
19
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
23
20
 
24
21
  // src/index.ts
25
22
  import { run } from "@stricli/core";
@@ -184,6 +181,7 @@ function generateOpencodeTemplate() {
184
181
  `;
185
182
  }
186
183
  // ../adapters/src/registry.ts
184
+ import { readEnabledProviders } from "@omnidev-ai/core";
187
185
  var builtInAdapters = [
188
186
  claudeCodeAdapter,
189
187
  codexAdapter,
@@ -199,6 +197,14 @@ async function getEnabledAdapters() {
199
197
  return enabledIds.map((id) => adapterMap.get(id)).filter((a) => a != null);
200
198
  }
201
199
  // src/commands/capability.ts
200
+ import {
201
+ disableCapability,
202
+ discoverCapabilities,
203
+ enableCapability,
204
+ getEnabledCapabilities,
205
+ loadCapabilityConfig,
206
+ syncAgentConfiguration
207
+ } from "@omnidev-ai/core";
202
208
  import { buildCommand, buildRouteMap } from "@stricli/core";
203
209
  async function runCapabilityList() {
204
210
  try {
@@ -420,8 +426,8 @@ async function checkConfig() {
420
426
  };
421
427
  }
422
428
  try {
423
- const { loadConfig: loadConfig2 } = await import("./shared/chunk-7txw9v1e.js");
424
- await loadConfig2();
429
+ const { loadConfig } = await import("@omnidev-ai/core");
430
+ await loadConfig();
425
431
  return {
426
432
  name: "Configuration",
427
433
  passed: true,
@@ -488,6 +494,14 @@ async function checkCapabilitiesDir() {
488
494
 
489
495
  // src/commands/init.ts
490
496
  import { existsSync as existsSync5, mkdirSync as mkdirSync4 } from "node:fs";
497
+ import {
498
+ generateInstructionsTemplate,
499
+ loadConfig,
500
+ setActiveProfile,
501
+ syncAgentConfiguration as syncAgentConfiguration2,
502
+ writeConfig,
503
+ writeEnabledProviders
504
+ } from "@omnidev-ai/core";
491
505
  import { buildCommand as buildCommand3 } from "@stricli/core";
492
506
 
493
507
  // src/prompts/provider.ts
@@ -558,7 +572,7 @@ async function runInit(_flags, providerArg) {
558
572
  }
559
573
  }
560
574
  const enabledAdapters = await getEnabledAdapters();
561
- await syncAgentConfiguration({ silent: true, adapters: enabledAdapters });
575
+ await syncAgentConfiguration2({ silent: true, adapters: enabledAdapters });
562
576
  console.log("");
563
577
  console.log(`✓ OmniDev initialized for ${selectedAdapters.map((a) => a.displayName).join(" and ")}!`);
564
578
  console.log("");
@@ -643,6 +657,13 @@ ${missingEntries.join(`
643
657
 
644
658
  // src/commands/profile.ts
645
659
  import { existsSync as existsSync6 } from "node:fs";
660
+ import {
661
+ getActiveProfile,
662
+ loadConfig as loadConfig2,
663
+ resolveEnabledCapabilities,
664
+ setActiveProfile as setActiveProfile2,
665
+ syncAgentConfiguration as syncAgentConfiguration3
666
+ } from "@omnidev-ai/core";
646
667
  import { buildCommand as buildCommand4, buildRouteMap as buildRouteMap2 } from "@stricli/core";
647
668
  var listCommand2 = buildCommand4({
648
669
  docs: {
@@ -690,7 +711,7 @@ async function runProfileList() {
690
711
  console.log(" Run: omnidev init");
691
712
  process.exit(1);
692
713
  }
693
- const config = await loadConfig();
714
+ const config = await loadConfig2();
694
715
  const activeProfile = await getActiveProfile() ?? config.active_profile ?? "default";
695
716
  const profiles = config.profiles ?? {};
696
717
  const profileNames = Object.keys(profiles);
@@ -730,7 +751,7 @@ async function runProfileSet(profileName) {
730
751
  console.log(" Run: omnidev init");
731
752
  process.exit(1);
732
753
  }
733
- const config = await loadConfig();
754
+ const config = await loadConfig2();
734
755
  const profiles = config.profiles ?? {};
735
756
  if (!(profileName in profiles)) {
736
757
  console.log(`✗ Profile "${profileName}" not found in omni.toml`);
@@ -746,11 +767,11 @@ async function runProfileSet(profileName) {
746
767
  }
747
768
  process.exit(1);
748
769
  }
749
- await setActiveProfile(profileName);
770
+ await setActiveProfile2(profileName);
750
771
  console.log(`✓ Active profile set to: ${profileName}`);
751
772
  console.log("");
752
773
  const adapters = await getEnabledAdapters();
753
- await syncAgentConfiguration({ adapters });
774
+ await syncAgentConfiguration3({ adapters });
754
775
  } catch (error) {
755
776
  console.error("✗ Error setting profile:", error);
756
777
  process.exit(1);
@@ -758,9 +779,15 @@ async function runProfileSet(profileName) {
758
779
  }
759
780
 
760
781
  // src/commands/provider.ts
782
+ import {
783
+ disableProvider,
784
+ enableProvider,
785
+ readEnabledProviders as readEnabledProviders2,
786
+ syncAgentConfiguration as syncAgentConfiguration4
787
+ } from "@omnidev-ai/core";
761
788
  import { buildCommand as buildCommand5, buildRouteMap as buildRouteMap3 } from "@stricli/core";
762
789
  async function runProviderList() {
763
- const enabled = await readEnabledProviders();
790
+ const enabled = await readEnabledProviders2();
764
791
  const allAdapters = getAllAdapters();
765
792
  console.log("Available providers:");
766
793
  console.log("");
@@ -791,7 +818,7 @@ async function runProviderEnable(_flags, providerId) {
791
818
  await enableProvider(providerId);
792
819
  console.log(`✓ Enabled provider: ${adapter.displayName}`);
793
820
  const enabledAdapters = await getEnabledAdapters();
794
- await syncAgentConfiguration({ silent: false, adapters: enabledAdapters });
821
+ await syncAgentConfiguration4({ silent: false, adapters: enabledAdapters });
795
822
  }
796
823
  async function runProviderDisable(_flags, providerId) {
797
824
  if (!providerId) {
@@ -872,6 +899,7 @@ var providerRoutes = buildRouteMap3({
872
899
  });
873
900
 
874
901
  // src/commands/sync.ts
902
+ import { getActiveProfile as getActiveProfile2, loadConfig as loadConfig3, syncAgentConfiguration as syncAgentConfiguration5 } from "@omnidev-ai/core";
875
903
  import { buildCommand as buildCommand6 } from "@stricli/core";
876
904
  var syncCommand = buildCommand6({
877
905
  docs: {
@@ -886,10 +914,10 @@ async function runSync() {
886
914
  console.log("Syncing OmniDev configuration...");
887
915
  console.log("");
888
916
  try {
889
- const config = await loadConfig();
890
- const activeProfile = await getActiveProfile() ?? config.active_profile ?? "default";
917
+ const config = await loadConfig3();
918
+ const activeProfile = await getActiveProfile2() ?? config.active_profile ?? "default";
891
919
  const adapters = await getEnabledAdapters();
892
- const result = await syncAgentConfiguration({ silent: false, adapters });
920
+ const result = await syncAgentConfiguration5({ silent: false, adapters });
893
921
  console.log("");
894
922
  console.log("✓ Sync completed successfully!");
895
923
  console.log("");
@@ -912,7 +940,9 @@ async function runSync() {
912
940
  process.exit(1);
913
941
  }
914
942
  }
943
+
915
944
  // src/lib/dynamic-app.ts
945
+ import { debug } from "@omnidev-ai/core";
916
946
  async function buildDynamicApp() {
917
947
  const routes = {
918
948
  init: initCommand,
@@ -959,7 +989,7 @@ async function buildDynamicApp() {
959
989
  return app;
960
990
  }
961
991
  async function loadCapabilityCommands() {
962
- const { buildCapabilityRegistry, installCapabilityDependencies } = await import("./shared/chunk-7txw9v1e.js");
992
+ const { buildCapabilityRegistry, installCapabilityDependencies } = await import("@omnidev-ai/core");
963
993
  await installCapabilityDependencies(true);
964
994
  const registry = await buildCapabilityRegistry();
965
995
  const capabilities = registry.getAllCapabilities();
@@ -1025,8 +1055,9 @@ async function loadCapabilityExport(capability) {
1025
1055
  }
1026
1056
 
1027
1057
  // src/index.ts
1058
+ import { debug as debug2 } from "@omnidev-ai/core";
1028
1059
  var app = await buildDynamicApp();
1029
- debug("CLI startup", {
1060
+ debug2("CLI startup", {
1030
1061
  arguments: process.argv.slice(2),
1031
1062
  cwd: process.cwd()
1032
1063
  });
package/package.json CHANGED
@@ -1,37 +1,38 @@
1
1
  {
2
- "name": "@omnidev-ai/cli",
3
- "version": "0.5.1",
4
- "type": "module",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/Nikola-Milovic/omnidev.git",
9
- "directory": "packages/cli"
10
- },
11
- "exports": {
12
- ".": "./dist/index.js"
13
- },
14
- "bin": {
15
- "omnidev": "./dist/index.js"
16
- },
17
- "files": [
18
- "dist",
19
- "README.md"
20
- ],
21
- "publishConfig": {
22
- "access": "public",
23
- "registry": "https://registry.npmjs.org"
24
- },
25
- "scripts": {
26
- "typecheck": "tsc --noEmit",
27
- "build": "bunup"
28
- },
29
- "dependencies": {
30
- "@inquirer/prompts": "^8.1.0",
31
- "@stricli/core": "^1.2.5"
32
- },
33
- "devDependencies": {
34
- "@omnidev-ai/adapters": "0.0.1",
35
- "bunup": "^0.16.20"
36
- }
2
+ "name": "@omnidev-ai/cli",
3
+ "version": "0.5.2",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Nikola-Milovic/omnidev.git",
9
+ "directory": "packages/cli"
10
+ },
11
+ "exports": {
12
+ ".": "./dist/index.js"
13
+ },
14
+ "bin": {
15
+ "omnidev": "./dist/index.js"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public",
23
+ "registry": "https://registry.npmjs.org"
24
+ },
25
+ "scripts": {
26
+ "typecheck": "tsc --noEmit",
27
+ "build": "bunup"
28
+ },
29
+ "dependencies": {
30
+ "@inquirer/prompts": "^8.1.0",
31
+ "@omnidev-ai/core": "0.4.0",
32
+ "@stricli/core": "^1.2.5"
33
+ },
34
+ "devDependencies": {
35
+ "@omnidev-ai/adapters": "0.0.1",
36
+ "bunup": "^0.16.20"
37
+ }
37
38
  }