@gentbajko/slopify 1.3.1 → 1.4.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.
@@ -29,6 +29,11 @@ export function cliBinary(db, id) {
29
29
  return cliPathStatus(db, id).command;
30
30
  }
31
31
  export async function saveCliPath(deps, id, raw) {
32
+ if (deps.hostCliStatus)
33
+ return {
34
+ ok: false,
35
+ message: "CLI paths are managed on the host. Rerun the Docker launcher after changing installations.",
36
+ };
32
37
  // A slow version probe must not overwrite a later Save or Reset from another tab.
33
38
  let queue = saves.get(deps.db);
34
39
  if (queue === undefined) {
@@ -43,6 +43,7 @@ export function readinessFromProbe(result, provider) {
43
43
  return {
44
44
  kind: "cli",
45
45
  installed: true,
46
+ issueKind: "version",
46
47
  issue: `Slopify could not verify this Codex CLI version. Install Codex CLI ${minimumCodexCliVersion} or newer, then try again.`,
47
48
  };
48
49
  if (!versionAtLeast(version, minimumCodexCliVersion))
@@ -50,6 +51,7 @@ export function readinessFromProbe(result, provider) {
50
51
  kind: "cli",
51
52
  installed: true,
52
53
  version,
54
+ issueKind: "version",
53
55
  issue: `Codex CLI ${minimumCodexCliVersion} or newer is required; version ${version} is installed. Update Codex CLI and try again.`,
54
56
  };
55
57
  return { kind: "cli", installed: true, version };
@@ -1,6 +1,6 @@
1
1
  import { cliPathStatus } from "./cli-paths.js";
2
2
  import { cliProbeTimeoutMs, readinessFromProbe } from "./cli-status.js";
3
- import { providers } from "./model.js";
3
+ import { isLocalCliProvider, providers } from "./model.js";
4
4
  import { keyedProviders } from "./repo.js";
5
5
  // Every supported provider is listed, keyed or not, found or not, so Play can grey one out with
6
6
  // a reason instead of hiding it. A keyed provider is ready when a key is stored; a CLI provider
@@ -12,6 +12,20 @@ export async function providerStatuses(deps) {
12
12
  const base = { id: provider.id, family: provider.family, displayName: provider.displayName };
13
13
  if (provider.auth !== "cli")
14
14
  return { ...base, readiness: keyedReadiness(keyed, provider.id) };
15
+ if (deps.hostCliStatus && isLocalCliProvider(provider.id)) {
16
+ const status = await deps.hostCliStatus(provider.id);
17
+ return {
18
+ ...base,
19
+ cliPath: { configured: null, command: status.command, managedOnHost: true },
20
+ readiness: {
21
+ kind: "cli",
22
+ installed: status.installed,
23
+ ...(status.version === undefined ? {} : { version: status.version }),
24
+ ...(status.issueKind === undefined ? {} : { issueKind: status.issueKind }),
25
+ ...(status.issue === undefined ? {} : { issue: status.issue }),
26
+ },
27
+ };
28
+ }
15
29
  const cliPath = cliPathStatus(deps.db, provider.id);
16
30
  const probeKey = JSON.stringify([cliPath.command, provider.versionArgs]);
17
31
  let result = probes.get(probeKey);