@taskforcehq/taskforce 0.3.168 → 0.3.170

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/cli.js CHANGED
@@ -100,7 +100,6 @@ async function main() {
100
100
  console.log(' taskforce <command> [options]');
101
101
  console.log('\nAvailable commands:');
102
102
  console.log(' open [port] - Starts Taskforce on an unused port and opens it (default start port 5174)');
103
- console.log(' open <production|staging|performance> [port] - Starts Taskforce with preset cloud endpoints');
104
103
  console.log(' mcp [path] - Starts the Model Context Protocol (MCP) server for the specified project');
105
104
  console.log(' help - Shows this help message');
106
105
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taskforcehq/taskforce",
3
- "version": "0.3.168",
3
+ "version": "0.3.170",
4
4
  "description": "Mission Command center for AI-powered task management (beta - under active development)",
5
5
  "author": "Stratnexus <hello@stratnexus.ai> (https://stratnexus.ai)",
6
6
  "license": "MIT",
@@ -1,38 +1,108 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- if [[ $# -ne 5 ]]; then
4
+ if [[ $# -lt 2 || $# -gt 5 ]]; then
5
5
  cat <<'EOF'
6
6
  Usage:
7
- scripts/update-homebrew-formula.sh <formula_path> <org> <repo> <version> <sha256>
7
+ scripts/update-homebrew-formula.sh <formula_path> [npm_package] <version> [--sha256 <sha>]
8
8
 
9
9
  Example:
10
- scripts/update-homebrew-formula.sh packaging/homebrew/Formula/taskforce.rb stratnexus taskforce 0.3.13 abc123...
10
+ scripts/update-homebrew-formula.sh packaging/homebrew/Formula/taskforce.rb @taskforcehq/taskforce 0.3.168
11
+ scripts/update-homebrew-formula.sh packaging/homebrew/Formula/taskforce.rb 0.3.168 --sha256 abc123...
11
12
  EOF
12
13
  exit 1
13
14
  fi
14
15
 
15
16
  FORMULA_PATH="$1"
16
- ORG="$2"
17
- REPO="$3"
18
- VERSION="$4"
19
- SHA256="$5"
17
+ shift
18
+
19
+ NPM_PACKAGE="@taskforcehq/taskforce"
20
+ if [[ "${1:-}" == @*/* ]]; then
21
+ NPM_PACKAGE="$1"
22
+ shift
23
+ fi
24
+
25
+ if [[ $# -lt 1 ]]; then
26
+ echo "Missing required <version> argument." >&2
27
+ exit 1
28
+ fi
29
+
30
+ VERSION="$1"
31
+ shift
32
+
33
+ SHA256="${HOMEBREW_SHA256:-}"
34
+ while [[ $# -gt 0 ]]; do
35
+ case "$1" in
36
+ --sha256)
37
+ if [[ $# -lt 2 ]]; then
38
+ echo "--sha256 requires a value" >&2
39
+ exit 1
40
+ fi
41
+ SHA256="$2"
42
+ shift 2
43
+ ;;
44
+ *)
45
+ echo "Unknown argument: $1" >&2
46
+ exit 1
47
+ ;;
48
+ esac
49
+ done
20
50
 
21
51
  if [[ ! -f "$FORMULA_PATH" ]]; then
22
52
  echo "Formula file not found: $FORMULA_PATH" >&2
23
53
  exit 1
24
54
  fi
25
55
 
26
- URL="https://github.com/${ORG}/${REPO}/archive/refs/tags/v${VERSION}.tar.gz"
56
+ if [[ "$NPM_PACKAGE" != @*/* ]]; then
57
+ echo "npm package must be scoped (for example: @taskforcehq/taskforce)." >&2
58
+ exit 1
59
+ fi
60
+
61
+ PACKAGE_SCOPE="${NPM_PACKAGE#@}"
62
+ PACKAGE_SCOPE="${PACKAGE_SCOPE%%/*}"
63
+ PACKAGE_NAME="${NPM_PACKAGE##*/}"
64
+ URL="https://registry.npmjs.org/${NPM_PACKAGE}/-/$(printf '%s-%s.tgz' "${PACKAGE_NAME}" "${VERSION}")"
65
+
66
+ if [[ -z "$SHA256" ]]; then
67
+ TMP_TGZ="$(mktemp "/tmp/${PACKAGE_NAME}-${VERSION}.XXXXXX.tgz")"
68
+ trap 'rm -f "$TMP_TGZ"' EXIT
69
+ echo "Downloading npm tarball: $URL"
70
+ CURL_ARGS=(-fsSL "$URL" -o "$TMP_TGZ")
71
+ AUTH_TOKEN="${NODE_AUTH_TOKEN:-${NPM_TOKEN:-}}"
72
+ if [[ -n "$AUTH_TOKEN" ]]; then
73
+ CURL_ARGS=(-fsSL -H "Authorization: Bearer ${AUTH_TOKEN}" "$URL" -o "$TMP_TGZ")
74
+ fi
75
+ if ! curl "${CURL_ARGS[@]}"; then
76
+ echo "Direct npm tarball download failed (likely private package auth). Falling back to npm pack..."
77
+ rm -f "$TMP_TGZ"
78
+ TMP_DIR="$(mktemp -d "/tmp/${PACKAGE_NAME}-${VERSION}.XXXXXX")"
79
+ trap 'rm -rf "$TMP_DIR"' EXIT
80
+ npm pack "${NPM_PACKAGE}@${VERSION}" --pack-destination "$TMP_DIR" >/dev/null
81
+ PACKED_TGZ="$(ls "$TMP_DIR"/*.tgz | head -n 1)"
82
+ if [[ -z "$PACKED_TGZ" || ! -f "$PACKED_TGZ" ]]; then
83
+ echo "Failed to locate tarball produced by npm pack." >&2
84
+ exit 1
85
+ fi
86
+ TMP_TGZ="$PACKED_TGZ"
87
+ fi
88
+ if command -v shasum >/dev/null 2>&1; then
89
+ SHA256="$(shasum -a 256 "$TMP_TGZ" | awk '{print $1}')"
90
+ else
91
+ SHA256="$(sha256sum "$TMP_TGZ" | awk '{print $1}')"
92
+ fi
93
+ fi
27
94
 
28
95
  sed -i.bak \
29
- -e "s#homepage \".*\"#homepage \"https://github.com/${ORG}/${REPO}\"#g" \
96
+ -e "s#homepage \".*\"#homepage \"https://github.com/Stratnexus/taskforce\"#g" \
30
97
  -e "s#url \".*\"#url \"${URL}\"#g" \
31
98
  -e "s#sha256 \".*\"#sha256 \"${SHA256}\"#g" \
32
99
  "$FORMULA_PATH"
33
100
 
34
101
  rm -f "${FORMULA_PATH}.bak"
35
102
  echo "Updated ${FORMULA_PATH}"
36
- echo " homepage: https://github.com/${ORG}/${REPO}"
103
+ echo " npm package: ${NPM_PACKAGE}"
104
+ echo " package scope: ${PACKAGE_SCOPE}"
105
+ echo " package name: ${PACKAGE_NAME}"
106
+ echo " homepage: https://github.com/Stratnexus/taskforce"
37
107
  echo " url: ${URL}"
38
108
  echo " sha256: ${SHA256}"