@hasna/recordings 0.3.1 → 0.3.8

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 (63) hide show
  1. package/README.md +38 -34
  2. package/bun.lock +96 -36
  3. package/dist/__tests__/helpers/installer-guard-execution.d.ts.map +1 -1
  4. package/dist/__tests__/helpers/source-assertions.d.ts +6 -4
  5. package/dist/__tests__/helpers/source-assertions.d.ts.map +1 -1
  6. package/dist/cli/index.js +197 -95
  7. package/dist/cli/macos-shortcut.d.ts +2 -2
  8. package/dist/db/pg-migrations.d.ts +1 -1
  9. package/dist/http/client.d.ts +0 -1
  10. package/dist/http/client.d.ts.map +1 -1
  11. package/dist/index.js +162 -73
  12. package/dist/lib/capture-probe.d.ts +3 -3
  13. package/dist/lib/capture-probe.d.ts.map +1 -1
  14. package/dist/lib/macos-bundle.d.ts +1 -1
  15. package/dist/lib/release-install-policy.d.ts +21 -0
  16. package/dist/lib/release-install-policy.d.ts.map +1 -1
  17. package/dist/mcp/index.js +144 -59
  18. package/dist/sdk/index.d.ts +2 -2
  19. package/dist/sdk/index.js +7 -3
  20. package/dist/sdk/v1.generated.d.ts.map +1 -1
  21. package/dist/server/cloud-config.d.ts +4 -19
  22. package/dist/server/cloud-config.d.ts.map +1 -1
  23. package/dist/server/cloud.d.ts +1 -1
  24. package/dist/server/cloud.d.ts.map +1 -1
  25. package/dist/server/index.js +168 -110
  26. package/dist/server/serve.d.ts.map +1 -1
  27. package/dist/storage.d.ts +1 -1
  28. package/dist/storage.d.ts.map +1 -1
  29. package/dist/storage.js +144 -60
  30. package/dist/store.d.ts.map +1 -1
  31. package/dist/version.d.ts +1 -1
  32. package/dist/version.d.ts.map +1 -1
  33. package/package.json +4 -3
  34. package/packaging/macos/build_release_pkg.sh +10 -4
  35. package/packaging/macos/managed_bootstrap.sh +4 -4
  36. package/packaging/macos/scripts/postinstall +2 -2
  37. package/packaging/macos/scripts/preinstall +2 -0
  38. package/scripts/generate-sdk.ts +17 -16
  39. package/scripts/install_macos_app.sh +75 -28
  40. package/scripts/macos_artifact.ts +162 -45
  41. package/scripts/migrate.ts +2 -2
  42. package/scripts/release-suite-gate.ts +181 -0
  43. package/scripts/set-version.ts +5 -5
  44. package/scripts/smoke_macos_app.sh +80 -34
  45. package/scripts/vacuity-manifests/version-sites.tsv +8 -4
  46. package/src/native/Recordings/App/MenuBarStatusView.swift +9 -4
  47. package/src/native/Recordings/App/RecordingsApp.swift +37 -1
  48. package/src/native/Recordings/RecordingsLib/Info.plist +3 -3
  49. package/src/native/Recordings/RecordingsLib/PermissionRequestLaunchPlan.swift +21 -1
  50. package/src/native/Recordings/RecordingsTests/BarOnlyLaunchPlanTests.swift +99 -0
  51. package/src/native/Recordings/RecordingsTests/CLIRunnerTests.swift +2 -2
  52. package/src/native/Recordings/RecordingsTests/RecordingStartGateTests.swift +1 -1
  53. package/src/native/Recordings/Updater/BootstrapPreflight/BootstrapPreflightMain.swift +1 -1
  54. package/src/native/Recordings/Updater/Broker/ApplicationNamespace.swift +2 -2
  55. package/src/native/Recordings/Updater/Broker/BrokerMain.swift +1 -1
  56. package/src/native/Recordings/Updater/Broker/CanonicalTreeCopy.swift +1 -1
  57. package/src/native/Recordings/Updater/Broker/InstallJournal.swift +1 -1
  58. package/src/native/Recordings/Updater/BrokerTests/ActivationRecoveryPolicyTests.swift +2 -2
  59. package/src/native/Recordings/Updater/Protocol/UpdateProtocol.swift +1 -1
  60. package/src/native/Recordings/Updater/VerifierLauncher/RecordingsVerifierLauncher.c +2 -2
  61. package/src/native/Recordings/build.sh +152 -18
  62. package/dist/lib/retired-deployment-modes.d.ts +0 -24
  63. package/dist/lib/retired-deployment-modes.d.ts.map +0 -1
@@ -126,18 +126,18 @@ require_absolute_canonical_owned_home() {
126
126
  local canonical
127
127
  case "$candidate" in
128
128
  /*) ;;
129
- *) echo "Recordings.app installation requires HOME to be an absolute canonical path." >&2; exit 1 ;;
129
+ *) echo "HasnaRecordings.app installation requires HOME to be an absolute canonical path." >&2; exit 1 ;;
130
130
  esac
131
131
  [ -d "$candidate" ] && [ ! -L "$candidate" ] || {
132
- echo "Recordings.app installation requires HOME to be an absolute canonical path to a non-symlink directory." >&2
132
+ echo "HasnaRecordings.app installation requires HOME to be an absolute canonical path to a non-symlink directory." >&2
133
133
  exit 1
134
134
  }
135
135
  canonical="$(cd "$candidate" 2>/dev/null && builtin pwd -P)" || {
136
- echo "Recordings.app installation could not resolve HOME canonically." >&2
136
+ echo "HasnaRecordings.app installation could not resolve HOME canonically." >&2
137
137
  exit 1
138
138
  }
139
139
  [ "$candidate" = "$canonical" ] || {
140
- echo "Recordings.app installation requires HOME to be an absolute canonical path." >&2
140
+ echo "HasnaRecordings.app installation requires HOME to be an absolute canonical path." >&2
141
141
  exit 1
142
142
  }
143
143
  [ "$("$STAT_EXECUTABLE" -f '%u' "$candidate")" = "$("$ID_EXECUTABLE" -u)" ] || {
@@ -168,6 +168,9 @@ Artifact and version:
168
168
 
169
169
  Target selection:
170
170
  --expected-hostname <name> Require this live short hostname before mutating
171
+ --variant <full|bar> Artifact variant the operator intends to install;
172
+ the manifest variant is verified against this at
173
+ install time (default: full)
171
174
  --artifact-policy <release|local-only>
172
175
  Trust policy to evaluate the artifact under
173
176
  --approved-target <name> Approved target for a local-only artifact
@@ -214,6 +217,7 @@ EXPECTED_NEW_IDENTITY_SHA256=""
214
217
  EXPECTED_HOSTNAME=""
215
218
  EXPECTED_HOSTNAME_SET=0
216
219
  ARTIFACT_POLICY="release"
220
+ INSTALL_VARIANT="full"
217
221
  APPROVED_TARGET="fleet"
218
222
  APPROVED_TARGET_IDENTITY_KIND=""
219
223
  APPROVED_TARGET_IDENTITY_SHA256="none"
@@ -254,6 +258,16 @@ while [ "$#" -gt 0 ]; do
254
258
  EXPECTED_HOSTNAME_SET=1
255
259
  shift 2
256
260
  ;;
261
+ --variant)
262
+ case "${2:-}" in
263
+ full|bar) INSTALL_VARIANT="${2}" ;;
264
+ *)
265
+ echo "Install variant must be full or bar." >&2
266
+ exit 2
267
+ ;;
268
+ esac
269
+ shift 2
270
+ ;;
257
271
  --artifact-policy)
258
272
  case "${2:-}" in
259
273
  release) ARTIFACT_POLICY="release" ;;
@@ -338,7 +352,7 @@ require_absolute_executable "BUN_EXECUTABLE" "$BUN_EXECUTABLE"
338
352
  require_absolute_canonical_owned_home
339
353
 
340
354
  if [ "$("$UNAME_EXECUTABLE" -s)" != "Darwin" ]; then
341
- echo "Recordings.app installation is only supported on macOS." >&2
355
+ echo "HasnaRecordings.app installation is only supported on macOS." >&2
342
356
  exit 1
343
357
  fi
344
358
 
@@ -532,7 +546,8 @@ fi
532
546
  "$BUN_EXECUTABLE" "$ARTIFACT_TOOL" native-fs-guard-check
533
547
  DATA_DIR="${HOME}/.hasna/recordings"
534
548
  DATA_PARENT="$("$DIRNAME_EXECUTABLE" "$DATA_DIR")"
535
- APP_DEST="${HOME}/Applications/Recordings.app"
549
+ MANIFEST_BUNDLE_NAME="HasnaRecordings.app"
550
+ APP_DEST="${HOME}/Applications/${MANIFEST_BUNDLE_NAME}"
536
551
  APP_PARENT="$("$DIRNAME_EXECUTABLE" "$APP_DEST")"
537
552
  ROLLBACK_DIR="${DATA_DIR}/rollbacks"
538
553
  JOURNAL_PATH="${APP_PARENT}/.Recordings-install-transaction.json"
@@ -779,7 +794,7 @@ acquire_install_lock() {
779
794
  if kill -0 "$owner_pid" 2>/dev/null; then
780
795
  actual_start="$("$PS_EXECUTABLE" -o lstart= -p "$owner_pid" 2>/dev/null | "$TR_EXECUTABLE" -s ' ' | "$SED_EXECUTABLE" 's/^ //;s/ $//' || true)"
781
796
  if [ -z "$owner_start" ] || [ -z "$actual_start" ] || [ "$owner_start" = "$actual_start" ]; then
782
- echo "Another Recordings.app installer owns the active install lock." >&2
797
+ echo "Another HasnaRecordings.app installer owns the active install lock." >&2
783
798
  exit 1
784
799
  fi
785
800
  fi
@@ -792,17 +807,17 @@ acquire_install_lock() {
792
807
  now="$("$DATE_EXECUTABLE" +%s)"
793
808
  lock_age=$((now - $("$STAT_EXECUTABLE" -f '%m' "$LOCK_DIR")))
794
809
  if [ "$lock_age" -lt "$stale_seconds" ]; then
795
- echo "Recordings.app install lock is incomplete and too recent to reclaim safely." >&2
810
+ echo "HasnaRecordings.app install lock is incomplete and too recent to reclaim safely." >&2
796
811
  exit 1
797
812
  fi
798
813
  fi
799
814
  stale_claim="${LOCK_DIR}.stale.$$"
800
815
  if ! "$MV_EXECUTABLE" "$LOCK_DIR" "$stale_claim" 2>/dev/null; then
801
- echo "Recordings.app install lock changed during stale-owner recovery." >&2
816
+ echo "HasnaRecordings.app install lock changed during stale-owner recovery." >&2
802
817
  exit 1
803
818
  fi
804
819
  "$RM_EXECUTABLE" -rf "$stale_claim"
805
- "$MKDIR_EXECUTABLE" -m 700 "$LOCK_DIR" || { echo "Could not acquire Recordings.app install lock." >&2; exit 1; }
820
+ "$MKDIR_EXECUTABLE" -m 700 "$LOCK_DIR" || { echo "Could not acquire HasnaRecordings.app install lock." >&2; exit 1; }
806
821
  fi
807
822
  LOCK_OWNED=1
808
823
  local start
@@ -1248,13 +1263,13 @@ stop_uncommitted_candidate() {
1248
1263
  done <<< "$remaining"
1249
1264
  "$SLEEP_EXECUTABLE" 0.1
1250
1265
  [ -z "$(pids_for_exact_executable "$expected")" ] || {
1251
- echo "Uncommitted Recordings.app process could not be stopped before recovery." >&2
1266
+ echo "Uncommitted HasnaRecordings.app process could not be stopped before recovery." >&2
1252
1267
  return 1
1253
1268
  }
1254
1269
  }
1255
1270
 
1256
1271
  if [ -f "$JOURNAL_PATH" ]; then
1257
- echo "Recovering incomplete Recordings.app installation transaction." >&2
1272
+ echo "Recovering incomplete HasnaRecordings.app installation transaction." >&2
1258
1273
  if ! RECOVER_WAS_RUNNING="$("$BUN_EXECUTABLE" "$ARTIFACT_TOOL" journal-get --journal "$JOURNAL_PATH" --field was_running)" || \
1259
1274
  ! RECOVER_PHASE="$("$BUN_EXECUTABLE" "$ARTIFACT_TOOL" journal-get --journal "$JOURNAL_PATH" --field phase)" || \
1260
1275
  ! RECOVER_RUNNING_APP_PATHS_JSON="$("$BUN_EXECUTABLE" "$ARTIFACT_TOOL" journal-get --journal "$JOURNAL_PATH" --field prior_running_app_paths)"; then
@@ -1323,6 +1338,7 @@ MANIFEST_SNAPSHOT="${WORK_DIR}/$("$BASENAME_EXECUTABLE" "$MANIFEST_PATH")"
1323
1338
  --source-sha "$EXPECTED_SOURCE_SHA" \
1324
1339
  --version "$EXPECTED_VERSION" \
1325
1340
  --artifact-policy "$ARTIFACT_POLICY" \
1341
+ --variant "$INSTALL_VARIANT" \
1326
1342
  --approved-target "$APPROVED_TARGET" \
1327
1343
  --approved-target-identity-kind "$APPROVED_TARGET_IDENTITY_KIND" \
1328
1344
  --approved-target-identity-sha256 "$APPROVED_TARGET_IDENTITY_SHA256"
@@ -1330,6 +1346,22 @@ MANIFEST_BUILDER_IDENTITY_KIND="$("$BUN_EXECUTABLE" "$ARTIFACT_TOOL" manifest-ge
1330
1346
  --manifest "$MANIFEST_SNAPSHOT" \
1331
1347
  --manifest-sha256 "$EXPECTED_MANIFEST_SHA256" \
1332
1348
  --field builder_identity_kind)"
1349
+ AUTHENTICATED_BUNDLE_NAME="$("$BUN_EXECUTABLE" "$ARTIFACT_TOOL" manifest-get \
1350
+ --manifest "$MANIFEST_SNAPSHOT" \
1351
+ --manifest-sha256 "$EXPECTED_MANIFEST_SHA256" \
1352
+ --field bundle_name)"
1353
+ case "$AUTHENTICATED_BUNDLE_NAME" in
1354
+ *.app) ;;
1355
+ *)
1356
+ echo "Authenticated artifact manifest carries an invalid bundle name: ${AUTHENTICATED_BUNDLE_NAME}." >&2
1357
+ exit 1
1358
+ ;;
1359
+ esac
1360
+ if [ "$AUTHENTICATED_BUNDLE_NAME" != "$MANIFEST_BUNDLE_NAME" ]; then
1361
+ MANIFEST_BUNDLE_NAME="$AUTHENTICATED_BUNDLE_NAME"
1362
+ APP_DEST="${HOME}/Applications/${MANIFEST_BUNDLE_NAME}"
1363
+ APP_PARENT="$("$DIRNAME_EXECUTABLE" "$APP_DEST")"
1364
+ fi
1333
1365
 
1334
1366
  CURRENT_MACOS="$("$SW_VERS_EXECUTABLE" -productVersion)"
1335
1367
  MINIMUM_MACOS="$("$BUN_EXECUTABLE" "$ARTIFACT_TOOL" manifest-get \
@@ -1344,7 +1376,7 @@ if ! "$BUN_EXECUTABLE" -e '
1344
1376
  if ((actual[i] ?? 0) < (minimum[i] ?? 0)) process.exit(1);
1345
1377
  }
1346
1378
  ' "$CURRENT_MACOS" "$MINIMUM_MACOS"; then
1347
- echo "Recordings.app requires macOS ${MINIMUM_MACOS} or later; target is ${CURRENT_MACOS}." >&2
1379
+ echo "HasnaRecordings.app requires macOS ${MINIMUM_MACOS} or later; target is ${CURRENT_MACOS}." >&2
1348
1380
  exit 1
1349
1381
  fi
1350
1382
  TARGET_ARCH="$("$UNAME_EXECUTABLE" -m)"
@@ -1354,14 +1386,14 @@ MANIFEST_ARCHITECTURES="$("$BUN_EXECUTABLE" "$ARTIFACT_TOOL" manifest-get \
1354
1386
  --field architectures)"
1355
1387
  case " ${MANIFEST_ARCHITECTURES} " in
1356
1388
  *" ${TARGET_ARCH} "*) ;;
1357
- *) echo "Recordings.app artifact does not support target architecture ${TARGET_ARCH}." >&2; exit 1 ;;
1389
+ *) echo "HasnaRecordings.app artifact does not support target architecture ${TARGET_ARCH}." >&2; exit 1 ;;
1358
1390
  esac
1359
1391
 
1360
1392
  verify_secure_parent "$APP_PARENT"
1361
1393
  verify_existing_state_root
1362
1394
 
1363
1395
  STAGING_DIR="$("$MKTEMP_EXECUTABLE" -d "${APP_PARENT}/.Recordings-install.XXXXXX")"
1364
- STAGED_APP="${STAGING_DIR}/Recordings.app"
1396
+ STAGED_APP="${STAGING_DIR}/${MANIFEST_BUNDLE_NAME}"
1365
1397
  "$BUN_EXECUTABLE" "$ARTIFACT_TOOL" verify-archive \
1366
1398
  --archive "$ARTIFACT_SNAPSHOT" \
1367
1399
  --manifest "$MANIFEST_SNAPSHOT" \
@@ -1370,6 +1402,7 @@ STAGED_APP="${STAGING_DIR}/Recordings.app"
1370
1402
  --source-sha "$EXPECTED_SOURCE_SHA" \
1371
1403
  --version "$EXPECTED_VERSION" \
1372
1404
  --artifact-policy "$ARTIFACT_POLICY" \
1405
+ --variant "$INSTALL_VARIANT" \
1373
1406
  --approved-target "$APPROVED_TARGET" \
1374
1407
  --approved-target-identity-kind "$APPROVED_TARGET_IDENTITY_KIND" \
1375
1408
  --approved-target-identity-sha256 "$APPROVED_TARGET_IDENTITY_SHA256"
@@ -1379,7 +1412,7 @@ add_unique_app() {
1379
1412
  local existing
1380
1413
  if [ -e "$candidate" ] || [ -L "$candidate" ]; then
1381
1414
  [ -d "$candidate" ] && [ ! -L "$candidate" ] || {
1382
- echo "Recordings.app path is not a secure directory: ${candidate}" >&2
1415
+ echo "HasnaRecordings.app path is not a secure directory: ${candidate}" >&2
1383
1416
  exit 1
1384
1417
  }
1385
1418
  fi
@@ -1491,7 +1524,7 @@ stop_old_processes() {
1491
1524
  "$SLEEP_EXECUTABLE" 0.1
1492
1525
  done
1493
1526
  if [ "$remaining" -ne 0 ]; then
1494
- echo "Existing Recordings.app process did not stop before replacement." >&2
1527
+ echo "Existing HasnaRecordings.app process did not stop before replacement." >&2
1495
1528
  exit 1
1496
1529
  fi
1497
1530
  }
@@ -1512,7 +1545,7 @@ quiesce_old_processes() {
1512
1545
  fi
1513
1546
  "$SLEEP_EXECUTABLE" 0.1
1514
1547
  done
1515
- echo "Existing Recordings.app processes did not remain quiescent before replacement." >&2
1548
+ echo "Existing HasnaRecordings.app processes did not remain quiescent before replacement." >&2
1516
1549
  exit 1
1517
1550
  }
1518
1551
 
@@ -1647,10 +1680,11 @@ write_journal() {
1647
1680
  --source-sha "$EXPECTED_SOURCE_SHA" \
1648
1681
  --version "$EXPECTED_VERSION" \
1649
1682
  --artifact-policy "$ARTIFACT_POLICY" \
1683
+ --variant "$INSTALL_VARIANT" \
1650
1684
  --approved-target "$APPROVED_TARGET" \
1651
1685
  --approved-target-identity-kind "$APPROVED_TARGET_IDENTITY_KIND" \
1652
1686
  --approved-target-identity-sha256 "$APPROVED_TARGET_IDENTITY_SHA256"
1653
- CANDIDATE_APP="$UNPACK_DIR/Recordings.app"
1687
+ CANDIDATE_APP="$UNPACK_DIR/${MANIFEST_BUNDLE_NAME}"
1654
1688
 
1655
1689
  "$BUN_EXECUTABLE" "$ARTIFACT_TOOL" verify-app \
1656
1690
  --app "$CANDIDATE_APP" \
@@ -1658,6 +1692,7 @@ CANDIDATE_APP="$UNPACK_DIR/Recordings.app"
1658
1692
  --manifest-sha256 "$EXPECTED_MANIFEST_SHA256" \
1659
1693
  --team-id "$EXPECTED_TEAM_ID" \
1660
1694
  --artifact-policy "$ARTIFACT_POLICY" \
1695
+ --variant "$INSTALL_VARIANT" \
1661
1696
  --approved-target "$APPROVED_TARGET" \
1662
1697
  --approved-target-identity-kind "$APPROVED_TARGET_IDENTITY_KIND" \
1663
1698
  --approved-target-identity-sha256 "$APPROVED_TARGET_IDENTITY_SHA256"
@@ -1671,10 +1706,12 @@ fi
1671
1706
  DISCOVERED_APPS=()
1672
1707
  add_unique_app "$APP_DEST"
1673
1708
  add_unique_app "${DATA_DIR}/Recordings.app"
1674
- for candidate in "${HOME}"/Applications/Recordings.app.*; do
1709
+ add_unique_app "${DATA_DIR}/HasnaRecordings.app"
1710
+ for candidate in "${HOME}"/Applications/Recordings.app.* "${HOME}"/Applications/HasnaRecordings.app.*; do
1675
1711
  add_unique_app "$candidate"
1676
1712
  done
1677
1713
  add_unique_app "/Applications/Recordings.app"
1714
+ add_unique_app "/Applications/HasnaRecordings.app"
1678
1715
  if [ -x "$MDFIND_EXECUTABLE" ]; then
1679
1716
  while IFS= read -r candidate; do
1680
1717
  [ -n "$candidate" ] || continue
@@ -1685,12 +1722,12 @@ fi
1685
1722
  MANAGEABLE_APPS=()
1686
1723
  for existing_app in ${DISCOVERED_APPS[@]+"${DISCOVERED_APPS[@]}"}; do
1687
1724
  case "$existing_app" in
1688
- "$APP_DEST"|"${DATA_DIR}/Recordings.app"|"${HOME}/Applications/Recordings.app."*)
1725
+ "$APP_DEST"|"${DATA_DIR}/Recordings.app"|"${DATA_DIR}/HasnaRecordings.app"|"${HOME}/Applications/Recordings.app."*|"${HOME}/Applications/HasnaRecordings.app."*)
1689
1726
  echo "Duplicate disposition: archive transactionally, remove after activation: ${existing_app}"
1690
1727
  MANAGEABLE_APPS+=("$existing_app")
1691
1728
  ;;
1692
1729
  *)
1693
- echo "Duplicate Recordings.app at ${existing_app} is outside the transactional user install paths; archive or remove it before installing." >&2
1730
+ echo "Duplicate HasnaRecordings.app at ${existing_app} is outside the transactional user install paths; archive or remove it before installing." >&2
1694
1731
  exit 1
1695
1732
  ;;
1696
1733
  esac
@@ -1847,6 +1884,7 @@ done
1847
1884
  --manifest-sha256 "$EXPECTED_MANIFEST_SHA256" \
1848
1885
  --team-id "$EXPECTED_TEAM_ID" \
1849
1886
  --artifact-policy "$ARTIFACT_POLICY" \
1887
+ --variant "$INSTALL_VARIANT" \
1850
1888
  --approved-target "$APPROVED_TARGET" \
1851
1889
  --approved-target-identity-kind "$APPROVED_TARGET_IDENTITY_KIND" \
1852
1890
  --approved-target-identity-sha256 "$APPROVED_TARGET_IDENTITY_SHA256"
@@ -1916,7 +1954,7 @@ for ((refresh_attempt = 1; refresh_attempt <= 5; refresh_attempt++)); do
1916
1954
  fi
1917
1955
  done
1918
1956
  [ "$STOPPED_REFRESH_STABLE" -eq 1 ] || {
1919
- echo "Existing Recordings.app writers did not remain quiescent around the stopped-state refresh." >&2
1957
+ echo "Existing HasnaRecordings.app writers did not remain quiescent around the stopped-state refresh." >&2
1920
1958
  exit 1
1921
1959
  }
1922
1960
 
@@ -1966,7 +2004,7 @@ for ((move_index = 0; move_index < MOVED_ORIGINAL_COUNT; move_index++)); do
1966
2004
  existing_app="${MOVED_ORIGINALS[$move_index]}"
1967
2005
  moved_path="${MOVED_PATHS[$move_index]}"
1968
2006
  [ "$("$BUN_EXECUTABLE" "$ARTIFACT_TOOL" tree-digest --path "$existing_app")" = "${MOVED_DIGESTS[$move_index]}" ] || {
1969
- echo "Installed Recordings.app changed after transactional backup planning." >&2
2007
+ echo "Installed HasnaRecordings.app changed after transactional backup planning." >&2
1970
2008
  exit 1
1971
2009
  }
1972
2010
  RECORDINGS_TEST_INSTALLER_PID="$$" \
@@ -2012,6 +2050,7 @@ write_journal candidate-installed
2012
2050
  --manifest-sha256 "$EXPECTED_MANIFEST_SHA256" \
2013
2051
  --team-id "$EXPECTED_TEAM_ID" \
2014
2052
  --artifact-policy "$ARTIFACT_POLICY" \
2053
+ --variant "$INSTALL_VARIANT" \
2015
2054
  --approved-target "$APPROVED_TARGET" \
2016
2055
  --approved-target-identity-kind "$APPROVED_TARGET_IDENTITY_KIND" \
2017
2056
  --approved-target-identity-sha256 "$APPROVED_TARGET_IDENTITY_SHA256"
@@ -2027,11 +2066,12 @@ fi
2027
2066
  --manifest-sha256 "$EXPECTED_MANIFEST_SHA256" \
2028
2067
  --team-id "$EXPECTED_TEAM_ID" \
2029
2068
  --artifact-policy "$ARTIFACT_POLICY" \
2069
+ --variant "$INSTALL_VARIANT" \
2030
2070
  --approved-target "$APPROVED_TARGET" \
2031
2071
  --approved-target-identity-kind "$APPROVED_TARGET_IDENTITY_KIND" \
2032
2072
  --approved-target-identity-sha256 "$APPROVED_TARGET_IDENTITY_SHA256"
2033
2073
  SMOKE_TOOL_PATH="/usr/bin:/bin:/usr/sbin:/sbin:$("$DIRNAME_EXECUTABLE" "$BUN_EXECUTABLE")"
2034
- PATH="$SMOKE_TOOL_PATH" "$RUNTIME_SMOKE" "$APP_DEST" "$BUN_EXECUTABLE"
2074
+ PATH="$SMOKE_TOOL_PATH" "$RUNTIME_SMOKE" "$APP_DEST" "$BUN_EXECUTABLE" --variant "$INSTALL_VARIANT"
2035
2075
  write_journal activated
2036
2076
 
2037
2077
  write_journal committed
@@ -2043,7 +2083,14 @@ STOPPED_RUNNING_APP=0
2043
2083
  if [ "$LAUNCH_APP" -eq 1 ] || [ "$was_running" -eq 1 ]; then
2044
2084
  EXPECTED_EXECUTABLE="$APP_DEST/Contents/MacOS/Recordings"
2045
2085
  RUNNING_EXECUTABLES+=("$EXPECTED_EXECUTABLE")
2046
- "$OPEN_EXECUTABLE" -n "$APP_DEST"
2086
+ if [ "$INSTALL_VARIANT" = "bar" ]; then
2087
+ # Bar installs relaunch with an explicit --bar-only so the launch record is
2088
+ # self-describing; the compile-time RECORDINGS_BAR_ONLY default makes the bar
2089
+ # windowless even without the argument.
2090
+ "$OPEN_EXECUTABLE" -n "$APP_DEST" --args --bar-only
2091
+ else
2092
+ "$OPEN_EXECUTABLE" -n "$APP_DEST"
2093
+ fi
2047
2094
  attempts=$((LAUNCH_TIMEOUT_SECONDS * 10))
2048
2095
  launched_pid=""
2049
2096
  launched_start_identity=""
@@ -2070,7 +2117,7 @@ if [ "$LAUNCH_APP" -eq 1 ] || [ "$was_running" -eq 1 ]; then
2070
2117
  fi
2071
2118
 
2072
2119
  if [ "$ARTIFACT_POLICY" = "local_only" ]; then
2073
- echo "Installed local-only Recordings.app for ${APPROVED_TARGET}; this artifact is ad-hoc signed and non-notarized."
2120
+ echo "Installed local-only HasnaRecordings.app for ${APPROVED_TARGET}; this artifact is ad-hoc signed and non-notarized."
2074
2121
  if [ "$identity_migration" -eq 1 ]; then
2075
2122
  # Not a maybe: the designated requirement did change, under an explicit approval.
2076
2123
  echo "Code identity changed under --allow-adhoc-identity-migration; the Microphone and Accessibility grants held by the replaced app no longer apply and must be reauthorized."
@@ -2080,5 +2127,5 @@ if [ "$ARTIFACT_POLICY" = "local_only" ]; then
2080
2127
  elif [ "$identity_migration" -eq 1 ]; then
2081
2128
  echo "Installed a new signing identity; macOS will require one-time permission approval for this migration."
2082
2129
  else
2083
- echo "Installed verified Recordings.app release artifact: ${APP_DEST}"
2130
+ echo "Installed verified HasnaRecordings.app release artifact: ${APP_DEST}"
2084
2131
  fi