docks-kit 0.1.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.
Files changed (49) hide show
  1. package/AGENTS.md +99 -0
  2. package/LICENSE +21 -0
  3. package/README.md +124 -0
  4. package/SoT/.agents/skills.txt +14 -0
  5. package/SoT/.claude/CLAUDE.md +146 -0
  6. package/SoT/.claude/fetch-usage.sh +66 -0
  7. package/SoT/.claude/hooks/notify.sh +14 -0
  8. package/SoT/.claude/mcp-servers.json +10 -0
  9. package/SoT/.claude/settings.json +258 -0
  10. package/SoT/.claude/statusline.sh +175 -0
  11. package/SoT/.codex/AGENTS.md +75 -0
  12. package/SoT/.codex/agents/.gitkeep +1 -0
  13. package/SoT/.codex/config.toml +45 -0
  14. package/SoT/.codex/plugins/marketplace.json +50 -0
  15. package/SoT/.codex/rules/docks.rules +116 -0
  16. package/SoT/models.json +28 -0
  17. package/SoT/toolchain.json +26 -0
  18. package/cli/docs/flags.md +48 -0
  19. package/cli/docs/install.md +56 -0
  20. package/cli/docs/models.md +42 -0
  21. package/cli/docs/modifiers.md +33 -0
  22. package/cli/docs/overview.md +37 -0
  23. package/cli/docs/platforms.md +31 -0
  24. package/cli/docs/plugins.md +44 -0
  25. package/cli/docs/sync-layers.md +43 -0
  26. package/cli/docs/toolchain.md +54 -0
  27. package/cli/src/commands/docs.ts +65 -0
  28. package/cli/src/commands/model.ts +60 -0
  29. package/cli/src/commands/models.ts +46 -0
  30. package/cli/src/commands/plugins.ts +34 -0
  31. package/cli/src/commands/skills.ts +37 -0
  32. package/cli/src/commands/status.ts +79 -0
  33. package/cli/src/commands/sync.ts +134 -0
  34. package/cli/src/commands/toolchain.ts +42 -0
  35. package/cli/src/engine.ts +36 -0
  36. package/cli/src/kitHome.ts +31 -0
  37. package/cli/src/main.ts +60 -0
  38. package/cli/src/manifests.ts +105 -0
  39. package/cli/src/md.d.ts +4 -0
  40. package/cli/tsconfig.json +14 -0
  41. package/docks-kit +61 -0
  42. package/lib/claude.sh +846 -0
  43. package/lib/codex.sh +518 -0
  44. package/lib/common.sh +229 -0
  45. package/lib/engine.sh +153 -0
  46. package/lib/skills.sh +373 -0
  47. package/lib/toolchain.sh +222 -0
  48. package/notification.mp3 +0 -0
  49. package/package.json +39 -0
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "Preserve",
5
+ "moduleResolution": "bundler",
6
+ "types": ["bun"],
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "verbatimModuleSyntax": true
12
+ },
13
+ "include": ["src/**/*.ts", "src/**/*.d.ts"]
14
+ }
package/docks-kit ADDED
@@ -0,0 +1,61 @@
1
+ #!/bin/bash
2
+ # docks-kit — launcher. Resolution order:
3
+ # 1. compiled binary in cli/dist/ (bun build --compile output)
4
+ # 2. Bun from source (auto-installs Bun + node_modules when missing)
5
+ # Zero-dependency escape hatch (no Bun at all): bash lib/engine.sh <args>
6
+ set -euo pipefail
7
+
8
+ REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
9
+
10
+ case "$(uname -s)-$(uname -m)" in
11
+ Linux-x86_64) KIT_BIN="docks-kit-linux-x64" ;;
12
+ Linux-aarch64) KIT_BIN="docks-kit-linux-arm64" ;;
13
+ Darwin-x86_64) KIT_BIN="docks-kit-darwin-x64" ;;
14
+ Darwin-arm64) KIT_BIN="docks-kit-darwin-arm64" ;;
15
+ *) KIT_BIN="" ;;
16
+ esac
17
+ if [[ -n "$KIT_BIN" && -x "$REPO_DIR/cli/dist/$KIT_BIN" ]]; then
18
+ exec "$REPO_DIR/cli/dist/$KIT_BIN" "$@"
19
+ fi
20
+
21
+ # Locate bun: PATH, then the known install locations that sit off the
22
+ # non-interactive PATH (~/.bun/bin, ~/.local/bin).
23
+ find_bun() {
24
+ local c
25
+ c="$(command -v bun 2>/dev/null || true)"
26
+ [[ -n "$c" ]] && { printf '%s\n' "$c"; return 0; }
27
+ for c in "${BUN_INSTALL:-$HOME/.bun}/bin/bun" "$HOME/.bun/bin/bun" "$HOME/.local/bin/bun"; do
28
+ [[ -x "$c" ]] && { printf '%s\n' "$c"; return 0; }
29
+ done
30
+ return 1
31
+ }
32
+
33
+ if ! BUN="$(find_bun)"; then
34
+ echo "[docks-kit] Bun not found — installing (download-then-run)..." >&2
35
+ if ! command -v curl >/dev/null 2>&1; then
36
+ echo "[docks-kit] curl missing too. Install Bun manually (https://bun.sh) or use the escape hatch: bash $REPO_DIR/lib/engine.sh" >&2
37
+ exit 1
38
+ fi
39
+ # Pin the Bun release to the kit-verified version when jq can read it
40
+ # (the installer takes a bun-vX.Y.Z release tag as $1); latest otherwise.
41
+ BUN_PIN=""
42
+ if command -v jq >/dev/null 2>&1; then
43
+ BUN_PIN="$(jq -r '.tools.bun.verified // empty' "$REPO_DIR/SoT/toolchain.json" 2>/dev/null || true)"
44
+ fi
45
+ tmp_installer=$(mktemp 2>/dev/null || echo "/tmp/bun-install-$$.sh")
46
+ curl -fsSL https://bun.sh/install -o "$tmp_installer" && bash "$tmp_installer" ${BUN_PIN:+"bun-v$BUN_PIN"} >/dev/null 2>&1 || true
47
+ rm -f "$tmp_installer"
48
+ if ! BUN="$(find_bun)"; then
49
+ echo "[docks-kit] Bun install failed. Escape hatch: bash $REPO_DIR/lib/engine.sh <args>" >&2
50
+ exit 1
51
+ fi
52
+ fi
53
+
54
+ # Sentinel is a real dependency dir, not bare node_modules/ — a failed or
55
+ # partial install leaves node_modules/ present and would suppress the repair.
56
+ if [[ ! -d "$REPO_DIR/node_modules/@effect/cli" ]]; then
57
+ echo "[docks-kit] Installing CLI dependencies (bun install --frozen-lockfile)..." >&2
58
+ (cd "$REPO_DIR" && "$BUN" install --frozen-lockfile >/dev/null)
59
+ fi
60
+
61
+ exec "$BUN" "$REPO_DIR/cli/src/main.ts" "$@"