@gentbajko/slopify 1.3.1 → 1.4.1

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.
Files changed (36) hide show
  1. package/README.md +12 -6
  2. package/dist/adapter-registry.js +11 -1
  3. package/dist/adapters/host-cli/index.js +192 -0
  4. package/dist/adapters/host-cli/transport.js +135 -0
  5. package/dist/adapters/image/codex.js +15 -6
  6. package/dist/adapters/llm/claude-code-models.js +1 -0
  7. package/dist/adapters/llm/claude-code.js +7 -0
  8. package/dist/adapters/llm/cli-login-error.js +16 -0
  9. package/dist/adapters/llm/codex.js +10 -0
  10. package/dist/edge/cli.js +36 -0
  11. package/dist/edge/docker.js +109 -0
  12. package/dist/edge/host-cli.js +58 -0
  13. package/dist/edge/http/actions.js +1 -1
  14. package/dist/edge/http/diagnostics.js +5 -1
  15. package/dist/edge/http/host-cli.js +247 -0
  16. package/dist/edge/http/providers.js +5 -1
  17. package/dist/host-cli/environment.js +25 -0
  18. package/dist/host-cli/install.js +61 -0
  19. package/dist/host-cli/paths.js +68 -0
  20. package/dist/host-cli/runtime.js +78 -0
  21. package/dist/host-cli/server.js +98 -0
  22. package/dist/host-cli/service.js +200 -0
  23. package/dist/host-cli/status.js +134 -0
  24. package/dist/kernel/ports/host-cli.js +95 -0
  25. package/dist/kernel/ports/model.js +1 -0
  26. package/dist/kernel/runner/attempt.js +10 -1
  27. package/dist/main.js +7 -1
  28. package/dist/slices/play-drafts/readiness.js +2 -3
  29. package/dist/slices/rebuild/service-readiness.js +2 -3
  30. package/dist/slices/settings/cli-paths.js +10 -0
  31. package/dist/slices/settings/cli-status.js +2 -0
  32. package/dist/slices/settings/readiness.js +15 -1
  33. package/dist/web/assets/{index-DsumGtv6.js → index-CbGJtCio.js} +21 -21
  34. package/dist/web/index.html +1 -1
  35. package/package.json +1 -1
  36. package/scripts/docker-run.sh +8 -45
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
7
  <meta name="color-scheme" content="dark light" />
8
8
  <title>Slopify</title>
9
- <script type="module" crossorigin src="/assets/index-DsumGtv6.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-CbGJtCio.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-DX1_chKs.css">
11
11
  </head>
12
12
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gentbajko/slopify",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "Turn a prompt into a finished video, locally, with your own provider keys",
5
5
  "license": "MIT",
6
6
  "author": "Gent Bajko",
@@ -2,7 +2,7 @@
2
2
  set -euo pipefail
3
3
 
4
4
  if [[ "$(uname -s)" != Linux ]]; then
5
- echo "Host CLI bridging requires Linux executables. Use the API providers on this host." >&2
5
+ echo "This Docker launcher requires Linux. Use plain Docker with API providers on this host." >&2
6
6
  exit 1
7
7
  fi
8
8
 
@@ -19,58 +19,21 @@ if [[ "$host_port" == 0 ]]; then published_port=""; fi
19
19
 
20
20
  mounts=()
21
21
  environment=()
22
- installations=()
23
- if [[ -n ${GEMINI_API_KEY:-} ]]; then environment+=(--env GEMINI_API_KEY); fi
24
-
25
- bridge_node_package() {
26
- local command_name=$1 expected_package=$2 target=$3
27
- local launcher package_dir actual_package
28
- launcher=$(command -v "$command_name") || return 0
29
- launcher=$(readlink -f "$launcher")
30
- package_dir=$(dirname "$(dirname "$launcher")")
31
- if [[ ! -f "$package_dir/package.json" ]]; then
32
- echo "Cannot bridge $command_name: expected an npm package around $launcher." >&2
33
- exit 1
34
- fi
35
- actual_package=$(node -p 'require(process.argv[1]).name' "$package_dir/package.json")
36
- if [[ "$actual_package" != "$expected_package" ]]; then
37
- echo "Cannot bridge $command_name: $launcher is not from $expected_package." >&2
38
- exit 1
39
- fi
40
- mounts+=(--mount "type=bind,source=$package_dir,target=$target,readonly")
41
- installations+=("$(stat -Lc '%d:%i' "$package_dir")")
42
- echo "Detected $command_name: $launcher" >&2
43
- }
44
-
45
- bridge_node_package codex @openai/codex /opt/host-clis/codex
46
- bridge_node_package gemini @google/gemini-cli /opt/host-clis/gemini
47
-
48
- # Model metadata is separate from login state. Mount only this file, never the
49
- # user's Codex home, which also contains credentials and conversation history.
50
- codex_models=${CODEX_HOME:-$HOME/.codex}/models_cache.json
51
- if command -v codex >/dev/null 2>&1 && [[ -f "$codex_models" ]]; then
52
- codex_models=$(readlink -f "$codex_models")
53
- mounts+=(--mount "type=bind,source=$codex_models,target=/opt/host-cli-data/codex-models.json,readonly")
54
- environment+=(--env SLOPIFY_CODEX_MODELS_FILE=/opt/host-cli-data/codex-models.json)
55
- installations+=("$(stat -Lc '%d:%i' "$codex_models")")
56
- fi
57
-
58
- if command -v claude >/dev/null 2>&1; then
59
- claude_binary=$(readlink -f "$(command -v claude)")
60
- if [[ "$(head -c 4 "$claude_binary")" != $'\177ELF' ]]; then
61
- echo "Cannot bridge claude: this launcher is not a native Linux executable." >&2
22
+ bridge_directory=${SLOPIFY_HOST_CLI_DIR:-}
23
+ if [[ -n "$bridge_directory" ]]; then
24
+ if [[ ! -d "$bridge_directory" || ! -S "$bridge_directory/cli.sock" || ! -f "$bridge_directory/token" || "$bridge_directory" == *,* ]]; then
25
+ echo "Host CLI helper is not ready. Rerun the Slopify Docker launcher." >&2
62
26
  exit 1
63
27
  fi
64
- mounts+=(--mount "type=bind,source=$claude_binary,target=/opt/host-clis/claude,readonly")
65
- installations+=("$(stat -Lc '%d:%i' "$claude_binary")")
66
- echo "Detected claude: $claude_binary" >&2
28
+ mounts+=(--mount "type=bind,source=$bridge_directory,target=/opt/slopify-host,readonly")
29
+ environment+=(--env SLOPIFY_HOST_CLI_DIR=/opt/slopify-host)
67
30
  fi
68
31
 
69
32
  if ! docker image inspect "$image" >/dev/null 2>&1; then docker pull "$image"; fi
70
33
  image_id=$(docker image inspect --format '{{.Id}}' "$image")
71
34
  # Changing an installation path or image requires new bind mounts. Re-running
72
35
  # the launcher reconciles those automatically while keeping the named data volume.
73
- signature=$(printf '%s\0' "$image_id" "$volume" "$host_port" "${mounts[@]}" "${installations[@]}" "${environment[@]}" "${GEMINI_API_KEY:-}" | sha256sum | cut -d ' ' -f 1)
36
+ signature=$(printf '%s\0' "$image_id" "$volume" "$host_port" "$bridge_directory" "host-cli-protocol-1" | sha256sum | cut -d ' ' -f 1)
74
37
  previous=""
75
38
  if docker container inspect "$container" >/dev/null 2>&1; then
76
39
  existing_signature=$(docker inspect --format '{{index .Config.Labels "io.slopify.launcher"}}' "$container")