myshell-tools 2.15.0 → 3.0.0

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.
@@ -10,12 +10,16 @@
10
10
  * each — which automatically activates cross-vendor review in the orchestrator.
11
11
  */
12
12
  import type { Provider, ProviderId } from './port.js';
13
+ import type { EnvironmentStatus } from './detect.js';
13
14
  /**
14
- * Discover which providers are available in the current environment and build
15
- * the provider map for OrchestrateDeps.
15
+ * Build the provider map for OrchestrateDeps from an already-detected
16
+ * EnvironmentStatus. The caller is responsible for running detectEnvironment()
17
+ * once and passing the result here — this avoids a second round of
18
+ * `--version` spawns when the caller already holds the detection result.
16
19
  *
17
20
  * @param _cwd - Working directory (used by real adapters to locate project-
18
21
  * level config; may be forwarded to adapters in a future phase).
19
- * @returns A (possibly empty) map of available providers.
22
+ * @param env - The environment status produced by detectEnvironment().
23
+ * @returns A (possibly empty) map of available providers.
20
24
  */
21
- export declare function buildProviders(_cwd: string): Promise<Partial<Record<ProviderId, Provider>>>;
25
+ export declare function buildProviders(_cwd: string, env: EnvironmentStatus): Partial<Record<ProviderId, Provider>>;
@@ -9,20 +9,21 @@
9
9
  * With multiple providers installed, `deps.providers` will have entries for
10
10
  * each — which automatically activates cross-vendor review in the orchestrator.
11
11
  */
12
- import { detectEnvironment } from './detect.js';
13
12
  import { createClaudeProvider } from './claude.js';
14
13
  import { createCodexProvider } from './codex.js';
15
14
  import { createOpencodeProvider } from './opencode.js';
16
15
  /**
17
- * Discover which providers are available in the current environment and build
18
- * the provider map for OrchestrateDeps.
16
+ * Build the provider map for OrchestrateDeps from an already-detected
17
+ * EnvironmentStatus. The caller is responsible for running detectEnvironment()
18
+ * once and passing the result here — this avoids a second round of
19
+ * `--version` spawns when the caller already holds the detection result.
19
20
  *
20
21
  * @param _cwd - Working directory (used by real adapters to locate project-
21
22
  * level config; may be forwarded to adapters in a future phase).
22
- * @returns A (possibly empty) map of available providers.
23
+ * @param env - The environment status produced by detectEnvironment().
24
+ * @returns A (possibly empty) map of available providers.
23
25
  */
24
- export async function buildProviders(_cwd) {
25
- const env = await detectEnvironment();
26
+ export function buildProviders(_cwd, env) {
26
27
  const providers = {};
27
28
  if (env.claude.installed) {
28
29
  providers.claude = createClaudeProvider();
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,IAAY;IAEZ,MAAM,GAAG,GAAG,MAAM,iBAAiB,EAAE,CAAC;IACtC,MAAM,SAAS,GAA0C,EAAE,CAAC;IAE5D,IAAI,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACzB,SAAS,CAAC,MAAM,GAAG,oBAAoB,EAAE,CAAC;IAC5C,CAAC;IAED,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QACxB,SAAS,CAAC,KAAK,GAAG,mBAAmB,EAAE,CAAC;IAC1C,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;QAC3B,SAAS,CAAC,QAAQ,GAAG,sBAAsB,EAAE,CAAC;IAChD,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAC5B,IAAY,EACZ,GAAsB;IAEtB,MAAM,SAAS,GAA0C,EAAE,CAAC;IAE5D,IAAI,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACzB,SAAS,CAAC,MAAM,GAAG,oBAAoB,EAAE,CAAC;IAC5C,CAAC;IAED,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QACxB,SAAS,CAAC,KAAK,GAAG,mBAAmB,EAAE,CAAC;IAC1C,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;QAC3B,SAAS,CAAC,QAAQ,GAAG,sBAAsB,EAAE,CAAC;IAChD,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myshell-tools",
3
- "version": "2.15.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "myshell-tools": "dist/cli.js",