@tantawowa/hosanna-tools 3.17.0 → 3.18.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 (80) hide show
  1. package/README.md +35 -11
  2. package/dist/build-info.json +3 -3
  3. package/dist/capture/mcp-tools.d.ts +1 -0
  4. package/dist/capture/mcp-tools.js +3 -1
  5. package/dist/capture/mcp-tools.js.map +1 -1
  6. package/dist/capture/video-capture.d.ts +1 -1
  7. package/dist/cli.js +121 -13
  8. package/dist/cli.js.map +1 -1
  9. package/dist/device/device-cli.d.ts +11 -0
  10. package/dist/device/device-cli.js +36 -2
  11. package/dist/device/device-cli.js.map +1 -1
  12. package/dist/device/devices-file.js +8 -5
  13. package/dist/device/devices-file.js.map +1 -1
  14. package/dist/device/driver-registry.js +27 -3
  15. package/dist/device/driver-registry.js.map +1 -1
  16. package/dist/device/drivers/tizen-driver.d.ts +19 -0
  17. package/dist/device/drivers/tizen-driver.js +178 -0
  18. package/dist/device/drivers/tizen-driver.js.map +1 -0
  19. package/dist/device/drivers/webos-driver.d.ts +15 -0
  20. package/dist/device/drivers/webos-driver.js +175 -0
  21. package/dist/device/drivers/webos-driver.js.map +1 -0
  22. package/dist/device/external-command.d.ts +12 -0
  23. package/dist/device/external-command.js +56 -0
  24. package/dist/device/external-command.js.map +1 -0
  25. package/dist/device/setup.d.ts +39 -0
  26. package/dist/device/setup.js +168 -0
  27. package/dist/device/setup.js.map +1 -0
  28. package/dist/device/types.d.ts +5 -2
  29. package/dist/run/destination-picker.js +14 -8
  30. package/dist/run/destination-picker.js.map +1 -1
  31. package/dist/run/executor.d.ts +8 -0
  32. package/dist/run/executor.js +82 -21
  33. package/dist/run/executor.js.map +1 -1
  34. package/dist/run/planner.d.ts +16 -1
  35. package/dist/run/planner.js +302 -27
  36. package/dist/run/planner.js.map +1 -1
  37. package/dist/run/run-config.d.ts +6 -0
  38. package/dist/run/run-config.js +25 -6
  39. package/dist/run/run-config.js.map +1 -1
  40. package/dist/run/run-controller.d.ts +9 -3
  41. package/dist/run/run-controller.js +37 -20
  42. package/dist/run/run-controller.js.map +1 -1
  43. package/dist/run/session-manager.d.ts +3 -3
  44. package/dist/run/session-manager.js +14 -4
  45. package/dist/run/session-manager.js.map +1 -1
  46. package/dist/run/targets.js +28 -4
  47. package/dist/run/targets.js.map +1 -1
  48. package/dist/run/tv-build.d.ts +56 -0
  49. package/dist/run/tv-build.js +670 -0
  50. package/dist/run/tv-build.js.map +1 -0
  51. package/dist/run/tv-test-config.d.ts +13 -0
  52. package/dist/run/tv-test-config.js +70 -0
  53. package/dist/run/tv-test-config.js.map +1 -0
  54. package/dist/run/types.d.ts +5 -2
  55. package/dist/run/types.js +10 -4
  56. package/dist/run/types.js.map +1 -1
  57. package/dist/support-tools/build-config-resolver.d.ts +2 -0
  58. package/dist/support-tools/build-config-resolver.js +41 -3
  59. package/dist/support-tools/build-config-resolver.js.map +1 -1
  60. package/dist/support-tools/command-debugger.d.ts +2 -0
  61. package/dist/support-tools/command-debugger.js +12 -2
  62. package/dist/support-tools/command-debugger.js.map +1 -1
  63. package/dist/support-tools/dev-runner.d.ts +28 -0
  64. package/dist/support-tools/dev-runner.js +103 -33
  65. package/dist/support-tools/dev-runner.js.map +1 -1
  66. package/dist/support-tools/mcp-server/types.d.ts +2 -0
  67. package/dist/support-tools/mcp-server/types.js.map +1 -1
  68. package/dist/testing/client.d.ts +1 -0
  69. package/dist/testing/client.js +36 -0
  70. package/dist/testing/client.js.map +1 -1
  71. package/dist/testing/launcher.d.ts +9 -0
  72. package/dist/testing/launcher.js +72 -19
  73. package/dist/testing/launcher.js.map +1 -1
  74. package/dist/testing/native-simulator.d.ts +1 -0
  75. package/dist/testing/native-simulator.js +1 -1
  76. package/dist/testing/native-simulator.js.map +1 -1
  77. package/dist/testing/physical-tv.d.ts +11 -0
  78. package/dist/testing/physical-tv.js +52 -0
  79. package/dist/testing/physical-tv.js.map +1 -0
  80. package/package.json +1 -1
package/README.md CHANGED
@@ -3,7 +3,8 @@
3
3
  ## Documentation
4
4
 
5
5
  - **[MCP debugger](src/support-tools/mcp-server/README.md)** — `hst mcp:start`, debugger tools, commands by use case, examples, and RASP certification capture.
6
- - **[Video capture](docs/video-capture.md)** — standalone, agent-driven, and test-run recording for Apple simulators, Roku capture cards, and macOS windows.
6
+ - **[Video capture](docs/video-capture.md)** — standalone, agent-driven, and test-run recording for Apple simulators, physical-TV capture cards, and macOS windows.
7
+ - **[Browser, Tizen, and webOS](docs/browser-tizen-webos.md)** — canonical commands, desktop previews, package/device workflows, vendor trust, and CSP/LAN policy.
7
8
  - **[docs/README.md](docs/README.md)** — index of docs in this repo (MCP + source-map note).
8
9
  - **hosanna-ui** (separate repo): `docs/README.md` for agentic debugging and links back to this README.
9
10
 
@@ -102,7 +103,7 @@ Common build-script replacements:
102
103
 
103
104
  Long-running APIs such as `dev.run`, `debugger.start`, `mcp.start`, and RASP-owned certification capture workflows keep the same operational behavior as the corresponding CLI commands: they start services, attach to debuggers, or wait for user/session activity. `mcp.start` and `dev.run` are wired for programmatic no-exit behavior through the top-level API.
104
105
 
105
- ### Installable web builds
106
+ ### Installable Browser builds
106
107
 
107
108
  `hosannaPwaPlugin` is a build-only Vite plugin for the generic install shell. The
108
109
  host application supplies its identity, artwork, launch selection, offline page,
@@ -205,7 +206,7 @@ Useful commands:
205
206
  ```bash
206
207
  npx hst app-config:compile --expression tv --platform web \
207
208
  --static-bundle-manifest asset-bundles/static-bundles.json
208
- npx hst run web dev browser --rebuild-app-config
209
+ npx hst run browser dev emulator --rebuild-app-config
209
210
  npx hst app-config:clean --expression tv --platform web \
210
211
  --static-bundle-manifest asset-bundles/static-bundles.json
211
212
  ```
@@ -303,8 +304,10 @@ Hosanna Tools is a comprehensive CLI toolset for the Hosanna framework that prov
303
304
  The CLI commands are organized into logical groups using colon-separated namespacing:
304
305
 
305
306
  ### Development Commands
306
- - `run` - Canonical cross-platform app launcher. Bare interactive runs show one destination picker; explicit platform options support web, Roku, iOS, Apple TV, Android, and Android TV launch targets.
307
- - `capture` - Record an Apple simulator, Roku capture-card input, or macOS screen/window. The default timeout is 180 seconds; use `--timeout` to override it.
307
+ - `run` - Canonical cross-platform app launcher. Bare interactive runs show one destination picker; explicit platform options include Browser, Samsung Tizen, LG webOS, Roku, Apple, and Android hosts.
308
+ - `build` - Build/package without device discovery, deployment, launch, browser opening, or log streaming. Successful Tizen/webOS builds print their absolute `.wgt`/`.ipk` path.
309
+ - `device:setup <tizen|webos>` - Guided, dry-runnable vendor setup: connect/authorize Samsung with SDB and verify an external signing profile, or register an LG ares alias and optionally run the official interactive key flow. HST never stores keys, certificates, or passphrases.
310
+ - `capture` - Record an Apple simulator, a physical-TV capture-card input, or a macOS screen/window. The default timeout is 180 seconds; use `--timeout` to override it.
308
311
  - `target:list` - List launch targets for humans or agents, including web emulators, sims, and physical devices.
309
312
  - `dev:start` - Run dev processes: vite, generator watch, and optional debugger
310
313
  - `debugger:start` - Start the command debugger WebSocket proxy (only one debugger is needed for multiple apps; if the port is already in use, a friendly message is shown instead of crashing)
@@ -314,7 +317,13 @@ Examples:
314
317
  ```bash
315
318
  hst run
316
319
  hst run --last
317
- hst run --platform web
320
+ hst run browser dev emulator
321
+ hst run tizen dev emulator
322
+ hst run webos dev emulator
323
+ hst build tizen dev device --signing-profile samsung-tv-dev
324
+ hst build webos dev device
325
+ hst run tizen dev device "Samsung living room" --signing-profile samsung-tv-dev
326
+ hst run webos dev device "LG living room"
318
327
  hst run --platform roku --target emulator
319
328
  hst run --platform ios --target emulator
320
329
  hst run --platform android --target emulator
@@ -337,7 +346,7 @@ hst target:list --form-factor tv --json
337
346
 
338
347
  Bare `hst run` in an interactive terminal discovers runnable web previews, vendor simulators, and online physical devices, then presents one flat destination picker. The last selection is placed first, so pressing Enter repeats it; `hst run --last` skips discovery and immediately uses that remembered destination. The selection is stored in the user-level `~/.hosanna-tools/run.json`, preserving existing defaults. Explicit commands remain deterministic, and non-interactive runs never open the picker.
339
348
 
340
- `--target emulator` starts or reuses the shared Vite/debugger dev services for any platform and opens a profiled DOM runtime URL for interactive runs; use `--device <preset-id>` to override defaults such as `iphone-15`, `pixel-8`, `apple-tv-4k`, `android-tv-1080p`, or `rokufhd`, and use `--no-open` for server-only launches. `--target sim` launches the vendor virtual device for platforms that have one: Apple Simulator for iOS and Apple TV, Android Emulator for Android and Android TV. `--target device` launches or deploys to physical local hardware. `web` and `browser` remain accepted aliases for the web emulator; `simulator` and `simulated` remain accepted aliases for `sim`; `emulated` remains an accepted alias for the web emulator. Device/sim runs record the target and refuse to overwrite a recorded session or safe-to-kill occupied resource in non-interactive mode unless `--replace` is passed. Preferred run defaults live in `.hosanna-tools/run.json`, and preferred devices live in `.hosanna-tools/devices.json` or `~/.hosanna-tools/devices.json`. Legacy `.hs-devices.json` files are still read for compatibility.
349
+ `browser` is the canonical public platform; legacy platform input `web` is normalized to `browser`. `emulator` is the public desktop-preview target and HST retains internal target kind `web`. For Tizen and webOS, emulator mode launches the target-specific Vite config so compile-time initializers are selected; it is not a vendor simulator. `--target sim` launches a real vendor virtual device only for supported Apple/Android platforms. `--target device` launches or deploys to physical local hardware. Device/sim runs record the target and refuse to overwrite a recorded session or safe-to-kill occupied resource in non-interactive mode unless `--replace` is passed. Tizen/webOS previews cannot reuse a Browser session because their compiled alias graphs differ. Preferred run defaults live in `.hosanna-tools/run.json`, and friendly device aliases live in `.hosanna-tools/devices.json` or `~/.hosanna-tools/devices.json`; signing keys and device passphrases remain in vendor stores.
341
350
 
342
351
  ### Roku Commands (`roku:*`) - Roku Deployment & Packaging
343
352
  - `roku:run` - Deploy a Roku app to a device (supports .zip file or folder)
@@ -402,6 +411,14 @@ Production JavaScript bundles strip `console.*` calls by default. Configure this
402
411
 
403
412
  Roku builds also populate `assetServer.baseUrl` when an overlay does not define it. `hst run` uses the resolved project Vite port and a reachable LAN IPv4 address. Override either the complete URL with `HS_ASSET_SERVER_BASE_URL`, or its parts with `HS_ASSET_SERVER_HOST` and `HS_ASSET_SERVER_PORT`; the equivalent `HOSANNA_ASSET_SERVER_*` names are also accepted. Explicit build-config overlays remain authoritative. The legacy `game.assetBaseUrl` setting is generated independently for backward compatibility.
404
413
 
414
+ Tizen/webOS builds prefer exact target overlays and fall back to the matching
415
+ Web overlay only when the exact file is absent. Physical development builds
416
+ resolve remote-debug loopback hosts to a reachable LAN address; override with
417
+ `HS_REMOTE_DEBUG_HOST`. Production TV builds force remote debugging off. Exact
418
+ non-secret service origins can be supplied with `--connect-origin` or
419
+ `HS_TV_CONNECT_ORIGINS`; unresolved package tokens and wildcard origins fail
420
+ staging. See [Browser, Tizen, and webOS](docs/browser-tizen-webos.md).
421
+
405
422
  Native builds can resolve config immediately before the platform build:
406
423
 
407
424
  ```bash
@@ -511,7 +528,7 @@ silently break an install.
511
528
  - `mcp:start` - Start the Hosanna MCP server for AI agent debugging
512
529
  - `mcp:stop` - Stop the Hosanna MCP server
513
530
 
514
- **Cursor and MCP:** Cursor does not magically attach to a terminal `hst mcp:start`. Add Hosanna as a Command MCP server (project **`.cursor/mcp.json`** or **Cursor Settings → MCP → Add Custom MCP**) so Cursor spawns **`hosanna-mcp`** over stdio. Start the command debugger/app explicitly with `hst run --platform web --target web`, `hst run --platform ios --target web`, `hst run --platform android-tv --target web`, or `hst run --platform roku --target device`.
531
+ **Cursor and MCP:** Cursor does not magically attach to a terminal `hst mcp:start`. Add Hosanna as a Command MCP server (project **`.cursor/mcp.json`** or **Cursor Settings → MCP → Add Custom MCP**) so Cursor spawns **`hosanna-mcp`** over stdio. Start the command debugger/app explicitly with `hst run browser dev emulator`, `hst run tizen dev emulator`, `hst run webos dev emulator`, or `hst run roku dev device`.
515
532
 
516
533
  ### Deterministic UI testing
517
534
 
@@ -534,8 +551,9 @@ defineHosannaTestConfig({
534
551
  The finalized recording is written below
535
552
  `test-results/<testRunId>/<platform>-<target>/` and embedded in the HTML report.
536
553
  Browser targets use Playwright WebM. iOS/Apple TV simulators use `simctl` MP4.
537
- Physical Roku targets use AVFoundation or a configured macOS screen/window
538
- source. Native/device capture defaults to 180 seconds; override it with
554
+ Physical Roku, Tizen, and webOS targets use AVFoundation or a configured macOS
555
+ screen/window source; HST does not claim vendor-native TV recording.
556
+ Native/device capture defaults to 180 seconds; override it with
539
557
  `timeoutSeconds`. This is a review artifact, not a replay format or executable
540
558
  test source.
541
559
 
@@ -611,7 +629,13 @@ For Roku device suites, the launcher builds and deploys before the test launch,
611
629
 
612
630
  ```bash
613
631
  # Development workflow
614
- hst run --platform web # Start/reuse web dev services
632
+ hst run browser dev emulator # Canonical Browser host
633
+ hst run tizen dev emulator # Desktop Tizen composition preview
634
+ hst run webos dev emulator # Desktop webOS composition preview
635
+ hst build tizen dev device --signing-profile samsung-tv-dev
636
+ hst build webos dev device
637
+ hst run tizen dev device "Samsung living room" --signing-profile samsung-tv-dev
638
+ hst run webos dev device "LG living room"
615
639
  hst run --platform roku --target emulator
616
640
  hst run --platform ios --target emulator
617
641
  hst run --platform android --target emulator
@@ -1,6 +1,6 @@
1
1
  {
2
- "buildDate": "2026-08-13T19:41:42+00:00",
3
- "buildDateISO": "2026-08-13T19:41:42.252Z",
2
+ "buildDate": "2026-08-14T06:25:48+00:00",
3
+ "buildDateISO": "2026-08-14T06:25:48.573Z",
4
4
  "timeZone": "UTC",
5
- "gitHash": "40dd06c"
5
+ "gitHash": "ba52fa6"
6
6
  }
@@ -1,5 +1,6 @@
1
1
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { type VideoCaptureManager } from './video-capture.js';
3
+ export declare const VIDEO_CAPTURE_PLATFORMS: readonly ["ios", "apple-tv", "roku", "tizen", "webos", "macos"];
3
4
  export declare function registerVideoCaptureTools(server: McpServer, options?: {
4
5
  cwd?: string;
5
6
  manager?: VideoCaptureManager;
@@ -3,10 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.VIDEO_CAPTURE_PLATFORMS = void 0;
6
7
  exports.registerVideoCaptureTools = registerVideoCaptureTools;
7
8
  const node_path_1 = __importDefault(require("node:path"));
8
9
  const zod_1 = require("zod");
9
10
  const video_capture_js_1 = require("./video-capture.js");
11
+ exports.VIDEO_CAPTURE_PLATFORMS = ['ios', 'apple-tv', 'roku', 'tizen', 'webos', 'macos'];
10
12
  function registerVideoCaptureTools(server, options = {}) {
11
13
  var _a, _b;
12
14
  const cwd = node_path_1.default.resolve((_a = options.cwd) !== null && _a !== void 0 ? _a : process.cwd());
@@ -14,7 +16,7 @@ function registerVideoCaptureTools(server, options = {}) {
14
16
  server.tool('start_video_capture', `Start an independent video capture session for an agent-driven scenario, manual demonstration, or test.
15
17
 
16
18
  The capture stops and finalizes automatically after ${video_capture_js_1.DEFAULT_VIDEO_CAPTURE_TIMEOUT_SECONDS} seconds by default. Override timeoutSeconds for a shorter or longer recording. Only one capture can be active in this MCP process at a time.`, {
17
- platform: zod_1.z.enum(['ios', 'apple-tv', 'roku', 'macos']).describe('Platform being recorded'),
19
+ platform: zod_1.z.enum(exports.VIDEO_CAPTURE_PLATFORMS).describe('Platform being recorded'),
18
20
  source: zod_1.z.enum(['apple-simulator', 'avfoundation', 'macos-screen', 'macos-window']).optional()
19
21
  .describe('Capture source. Defaults from platform and supplied window/screen options.'),
20
22
  outputPath: zod_1.z.string().optional().describe('Output video path, relative to the project when not absolute'),
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-tools.js","sourceRoot":"","sources":["../../src/capture/mcp-tools.ts"],"names":[],"mappings":";;;;;AAUA,8DAmHC;AA7HD,0DAA6B;AAE7B,6BAAwB;AACxB,yDAK4B;AAE5B,SAAgB,yBAAyB,CACvC,MAAiB,EACjB,UAGI,EAAE;;IAEN,MAAM,GAAG,GAAG,mBAAI,CAAC,OAAO,CAAC,MAAA,OAAO,CAAC,GAAG,mCAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACvD,MAAM,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AE,EAAE,IAAI,CAAC;gBAChE,CAAC,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAClE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc,EAAE,OAAO,GAAG,KAAK;IACxD,uBACE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,IACvE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACrC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,iBAAiB,CAAC,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;AACpG,CAAC"}
@@ -2,7 +2,7 @@ import { spawn } from 'node:child_process';
2
2
  import { listIosSimulatorTargets } from '../run/ios-simulator.js';
3
3
  import { listAppleTvSimulatorTargets } from '../run/apple-tv.js';
4
4
  export declare const DEFAULT_VIDEO_CAPTURE_TIMEOUT_SECONDS = 180;
5
- export type VideoCapturePlatform = 'ios' | 'apple-tv' | 'roku' | 'macos';
5
+ export type VideoCapturePlatform = 'ios' | 'apple-tv' | 'roku' | 'tizen' | 'webos' | 'macos';
6
6
  export type VideoCaptureSource = 'apple-simulator' | 'avfoundation' | 'macos-screen' | 'macos-window';
7
7
  export type VideoCaptureStopReason = 'requested' | 'timeout' | 'signal' | 'shutdown' | 'process-exit' | 'start-failed';
8
8
  export type VideoCaptureState = 'recording' | 'stopping' | 'completed' | 'failed';
package/dist/cli.js CHANGED
@@ -139,6 +139,11 @@ function runPlanFlagsFromCliArgs(args, format) {
139
139
  fontDelivery: rawHasFlag('font-delivery') ? args['font-delivery'] : undefined,
140
140
  bundleRevision: rawHasFlag('bundle-revision') ? args['bundle-revision'] : undefined,
141
141
  rebuildAppConfig: rawHasFlag('rebuild-app-config') ? Boolean(args['rebuild-app-config']) : undefined,
142
+ buildCmd: rawHasFlag('build-cmd') ? args['build-cmd'] : undefined,
143
+ viteConfig: rawHasFlag('vite-config') ? args['vite-config'] : undefined,
144
+ signingProfile: rawHasFlag('signing-profile') ? args['signing-profile'] : undefined,
145
+ appId: rawHasFlag('app-id') ? args['app-id'] : undefined,
146
+ connectOrigins: rawHasFlag('connect-origin') ? args['connect-origin'] : undefined,
142
147
  passthroughArgs: args['--'],
143
148
  };
144
149
  }
@@ -212,6 +217,9 @@ async function runRunPlanCommand(command, args) {
212
217
  else if (result.url) {
213
218
  console.info(`hst ${command}: ${(_c = result.appName) !== null && _c !== void 0 ? _c : 'app'} available at ${result.url}`);
214
219
  }
220
+ else if (result.artifactPath) {
221
+ console.info(`hst ${command}: package created at ${path.resolve(result.artifactPath)}`);
222
+ }
215
223
  }
216
224
  catch (err) {
217
225
  console.error(`❌ ${command} failed`);
@@ -240,7 +248,7 @@ const NATIVE_PLATFORM_CHOICES = [
240
248
  'cars', 'watches', 'all',
241
249
  ];
242
250
  const RUN_PLATFORM_CHOICES = [
243
- 'web', 'roku', 'ios', 'apple-tv', 'carplay', 'apple-watch', 'watchos',
251
+ 'browser', 'web', 'tizen', 'webos', 'roku', 'ios', 'apple-tv', 'carplay', 'apple-watch', 'watchos',
244
252
  'android', 'android-tv', 'android-auto', 'wear-os', 'wearos', 'android-watch',
245
253
  ];
246
254
  function nativeInputFromArgs(args) {
@@ -305,7 +313,7 @@ async function runVideoCaptureCommand(args) {
305
313
  try {
306
314
  const platform = ((_a = args.platform) !== null && _a !== void 0 ? _a : args.platformArg);
307
315
  if (!platform)
308
- throw new Error('Capture platform is required. Use ios, apple-tv, roku, or macos.');
316
+ throw new Error('Capture platform is required. Use ios, apple-tv, roku, tizen, webos, or macos.');
309
317
  const mod = await Promise.resolve().then(() => __importStar(require('./capture/video-capture.js')));
310
318
  const session = await mod.startVideoCapture({
311
319
  platform,
@@ -404,12 +412,12 @@ catch (err) {
404
412
  .command('capture [platformArg]', 'Record an Apple simulator, capture-card input, or macOS screen/window', yargs => yargs
405
413
  .positional('platformArg', {
406
414
  type: 'string',
407
- choices: ['ios', 'apple-tv', 'roku', 'macos'],
415
+ choices: ['ios', 'apple-tv', 'roku', 'tizen', 'webos', 'macos'],
408
416
  describe: 'Platform being recorded',
409
417
  })
410
418
  .option('platform', {
411
419
  type: 'string',
412
- choices: ['ios', 'apple-tv', 'roku', 'macos'],
420
+ choices: ['ios', 'apple-tv', 'roku', 'tizen', 'webos', 'macos'],
413
421
  describe: 'Platform being recorded (alternative to the positional argument)',
414
422
  })
415
423
  .option('source', {
@@ -1774,11 +1782,45 @@ catch (err) {
1774
1782
  console.error('❌ complib:serve failed:', err instanceof Error ? err.message : err);
1775
1783
  process.exit(1);
1776
1784
  }
1785
+ })
1786
+ .command('device:setup <type>', 'Run the automatable, credential-safe portion of Samsung Tizen or LG webOS device setup', yargs => yargs
1787
+ .positional('type', { type: 'string', choices: ['tizen', 'webos'] })
1788
+ .option('host', { type: 'string', demandOption: true, describe: 'TV IP address or hostname' })
1789
+ .option('alias', { type: 'string', default: 'myTV', describe: 'webOS ares device alias' })
1790
+ .option('port', { type: 'number', default: 9922, describe: 'webOS Developer Mode SSH port' })
1791
+ .option('username', { type: 'string', default: 'prisoner', describe: 'webOS Developer Mode SSH username' })
1792
+ .option('default', { type: 'boolean', default: false, describe: 'Make the webOS alias the ares default' })
1793
+ .option('get-key', { type: 'boolean', default: false, describe: 'Run the official interactive webOS ares-novacom key flow' })
1794
+ .option('signing-profile', { type: 'string', describe: 'Verify an existing external Samsung signing profile' })
1795
+ .option('dry-run', { type: 'boolean', default: false, describe: 'Print exact commands and manual prerequisites without changing vendor state' })
1796
+ .example('$0 device:setup tizen --host 192.168.1.50 --signing-profile samsung-tv-dev --dry-run', 'Preview Samsung connection/profile checks')
1797
+ .example('$0 device:setup webos --host 192.168.1.60 --alias living-room --get-key', 'Register an LG alias and enter the passphrase only in the official ares prompt'), async (args) => {
1798
+ try {
1799
+ const mod = await Promise.resolve().then(() => __importStar(require('./device/setup.js')));
1800
+ const result = await mod.setupTvDevice({
1801
+ cwd: process.cwd(),
1802
+ type: args.type,
1803
+ host: args.host,
1804
+ alias: stringArg(args.alias),
1805
+ port: args.port,
1806
+ username: stringArg(args.username),
1807
+ makeDefault: Boolean(args.default),
1808
+ getKey: Boolean(args['get-key']),
1809
+ signingProfile: stringArg(args['signing-profile']),
1810
+ dryRun: Boolean(args['dry-run']),
1811
+ env: process.env,
1812
+ });
1813
+ console.info(mod.formatDeviceSetupResult(result, Boolean(args['dry-run'])));
1814
+ }
1815
+ catch (error) {
1816
+ console.error(`❌ device:setup failed: ${error instanceof Error ? error.message : String(error)}`);
1817
+ process.exitCode = 1;
1818
+ }
1777
1819
  })
1778
1820
  .command('device:list', 'List devices discovered by hst, merged with .hosanna-tools/devices.json preferences', yargs => yargs
1779
1821
  .option('type', {
1780
1822
  type: 'string',
1781
- choices: ['roku', 'ios', 'apple-tv', 'android', 'android-tv'],
1823
+ choices: ['roku', 'tizen', 'webos', 'ios', 'apple-tv', 'android', 'android-tv'],
1782
1824
  describe: 'Filter devices by platform type',
1783
1825
  })
1784
1826
  .option('json', {
@@ -1804,6 +1846,48 @@ catch (err) {
1804
1846
  console.error(err instanceof Error ? err.message : String(err));
1805
1847
  process.exit(1);
1806
1848
  }
1849
+ })
1850
+ .command('device:inspect <type>', 'Open the supported vendor inspector for an installed application', yargs => yargs
1851
+ .positional('type', { type: 'string', choices: ['tizen', 'webos'] })
1852
+ .option('device', { type: 'string', describe: 'Configured device alias, serial, IP, or name' })
1853
+ .option('app-id', { type: 'string', describe: 'Application id override' })
1854
+ .option('source-root', { type: 'string', describe: 'Staged project root containing the platform manifest' }), async (args) => {
1855
+ try {
1856
+ const mod = await Promise.resolve().then(() => __importStar(require('./device/device-cli.js')));
1857
+ await mod.runDeviceInspectCommand({
1858
+ cwd: process.cwd(),
1859
+ type: args.type,
1860
+ device: stringArg(args.device),
1861
+ appId: stringArg(args['app-id']),
1862
+ sourceRoot: stringArg(args['source-root']),
1863
+ env: process.env,
1864
+ });
1865
+ }
1866
+ catch (error) {
1867
+ console.error(`❌ device:inspect failed: ${error instanceof Error ? error.message : String(error)}`);
1868
+ process.exitCode = 1;
1869
+ }
1870
+ })
1871
+ .command('device:terminate <type>', 'Terminate an installed application through the supported vendor CLI', yargs => yargs
1872
+ .positional('type', { type: 'string', choices: ['tizen', 'webos'] })
1873
+ .option('device', { type: 'string', describe: 'Configured device alias, serial, IP, or name' })
1874
+ .option('app-id', { type: 'string', describe: 'Application id override' })
1875
+ .option('source-root', { type: 'string', describe: 'Staged project root containing the platform manifest' }), async (args) => {
1876
+ try {
1877
+ const mod = await Promise.resolve().then(() => __importStar(require('./device/device-cli.js')));
1878
+ await mod.runDeviceTerminateCommand({
1879
+ cwd: process.cwd(),
1880
+ type: args.type,
1881
+ device: stringArg(args.device),
1882
+ appId: stringArg(args['app-id']),
1883
+ sourceRoot: stringArg(args['source-root']),
1884
+ env: process.env,
1885
+ });
1886
+ }
1887
+ catch (error) {
1888
+ console.error(`❌ device:terminate failed: ${error instanceof Error ? error.message : String(error)}`);
1889
+ process.exitCode = 1;
1890
+ }
1807
1891
  })
1808
1892
  .command('target:list [platform]', 'List run targets discovered by hst, including web emulators, sims, and physical devices', yargs => yargs
1809
1893
  .positional('platform', {
@@ -1874,7 +1958,7 @@ catch (err) {
1874
1958
  .parserConfiguration({ 'boolean-negation': false, 'populate--': true })
1875
1959
  .positional('platform', {
1876
1960
  type: 'string',
1877
- describe: 'Build platform. Defaults from flags, env, .hosanna-tools/run.json, then web.',
1961
+ describe: 'Build platform. Defaults from flags, env, .hosanna-tools/run.json, then Browser.',
1878
1962
  })
1879
1963
  .positional('env', {
1880
1964
  type: 'string',
@@ -1934,19 +2018,26 @@ catch (err) {
1934
2018
  .option('hsc-project', { type: 'string', describe: 'Explicit Roku HSC project file for hst build planning' })
1935
2019
  .option('config', { type: 'string', describe: 'Back-compatible alias for --hsconfig / --hsc-project' })
1936
2020
  .option('source-root', { type: 'string', describe: 'Roku source root to preserve in build planning output' })
2021
+ .option('build-cmd', { type: 'string', describe: 'Override the platform bundle command; parsed and executed without a shell' })
2022
+ .option('vite-config', { type: 'string', describe: 'Target Vite config for Browser/Tizen/webOS builds' })
2023
+ .option('signing-profile', { type: 'string', describe: 'External Samsung certificate profile name (env: TIZEN_SECURITY_PROFILE)' })
2024
+ .option('app-id', { type: 'string', describe: 'Override the packaged TV application id for launch/inspect' })
2025
+ .option('connect-origin', { type: 'array', string: true, describe: 'Exact non-secret origin to allow in packaged-TV CSP/WARP; repeat as needed' })
1937
2026
  .example('$0 build roku dev device', 'Build the dev Roku output without deploying or streaming logs')
1938
2027
  .example('$0 build roku prod device --hsc-project platforms/hsconfig-roku.prod.json', 'Build Roku with an explicit HSC project file')
1939
2028
  .example('$0 build ios dev sim --device "iPhone 17 Pro"', 'Build an iOS simulator target without install, launch, or logs')
1940
2029
  .example('$0 build apple-watch dev sim --device "Apple Watch Series 11 (46mm)"', 'Build the paired Apple Watch simulator target')
1941
2030
  .example('$0 build wear-os dev sim --device "Wear_OS_Large_Round"', 'Build the Wear OS emulator target')
1942
- .example('$0 build web dev emulator', 'Resolve web runtime build config without opening a browser'), async (args) => {
2031
+ .example('$0 build browser dev emulator', 'Resolve Browser runtime build config without opening a browser')
2032
+ .example('$0 build tizen dev device --signing-profile samsung-tv-dev', 'Create a signed Samsung .wgt without contacting a TV')
2033
+ .example('$0 build webos dev device', 'Create an LG .ipk without contacting a TV'), async (args) => {
1943
2034
  await runRunPlanCommand('build', args);
1944
2035
  })
1945
2036
  .command('run [platform] [env] [target] [deviceSelector]', 'Launch a Hosanna app on a platform target, including car and watch surfaces', yargs => yargs
1946
2037
  .parserConfiguration({ 'boolean-negation': false, 'populate--': true })
1947
2038
  .positional('platform', {
1948
2039
  type: 'string',
1949
- describe: 'Launch platform. Bare interactive runs show a destination picker; non-interactive runs default to web.',
2040
+ describe: 'Launch platform. Bare interactive runs show a destination picker; non-interactive runs default to Browser.',
1950
2041
  })
1951
2042
  .positional('env', {
1952
2043
  type: 'string',
@@ -2010,7 +2101,11 @@ catch (err) {
2010
2101
  .option('no-build', { type: 'boolean', default: false, describe: 'Skip the platform build step for device runs' })
2011
2102
  .option('build-only', { type: 'boolean', default: false, describe: 'Plan or run build steps without opening browser/log streams where supported' })
2012
2103
  .option('no-logs', { type: 'boolean', default: false, describe: 'Do not stream device logs after launch where supported' })
2013
- .option('build-cmd', { type: 'string', describe: 'Override the platform build command for device runs' })
2104
+ .option('build-cmd', { type: 'string', describe: 'Override the platform bundle or emulator dev command; parsed and executed without a shell' })
2105
+ .option('vite-config', { type: 'string', describe: 'Target Vite config for Browser/Tizen/webOS builds' })
2106
+ .option('signing-profile', { type: 'string', describe: 'External Samsung certificate profile name (env: TIZEN_SECURITY_PROFILE)' })
2107
+ .option('app-id', { type: 'string', describe: 'Override the packaged TV application id for launch/inspect' })
2108
+ .option('connect-origin', { type: 'array', string: true, describe: 'Exact non-secret origin to allow in packaged-TV CSP/WARP; repeat as needed' })
2014
2109
  .option('hsconfig', { type: 'string', describe: 'Explicit hsconfig file for Roku/native run planning' })
2015
2110
  .option('hsc-project', { type: 'string', describe: 'Explicit Roku HSC project file for hst run planning' })
2016
2111
  .option('config', { type: 'string', describe: 'Back-compatible alias for --hsconfig / --hsc-project' })
@@ -2022,7 +2117,9 @@ catch (err) {
2022
2117
  .option('installer-password', { type: 'string', describe: 'Roku installer password (env: ROKU_DEVPASSWORD)' })
2023
2118
  .option('logs', { type: 'boolean', default: false, describe: 'Enable verbose deploy logging where supported' })
2024
2119
  .option('applySourceMapToPaths', { type: 'boolean', default: true, describe: 'Resolve Roku stack trace paths with source maps during log streaming' })
2025
- .example('$0 run --platform web', 'Start/reuse web dev services for this app')
2120
+ .example('$0 run browser dev emulator', 'Start or reuse the canonical Browser preview')
2121
+ .example('$0 run tizen dev emulator', 'Start or reuse the Samsung Tizen desktop preview')
2122
+ .example('$0 run webos dev emulator', 'Start or reuse the LG webOS desktop preview')
2026
2123
  .example('$0 run', 'Choose once from all available web, simulator, and physical-device destinations')
2027
2124
  .example('$0 run --last', 'Immediately run on the last selected destination')
2028
2125
  .example('$0 run --platform roku --target emulator', 'Start/reuse the Roku TV web emulator')
@@ -2041,6 +2138,8 @@ catch (err) {
2041
2138
  .example('$0 run --platform apple-watch --target sim --device "Apple Watch Series 11 (46mm)"', 'Build and launch through the paired Apple Watch simulator')
2042
2139
  .example('$0 run --platform wear-os --target sim --device "Wear_OS_Large_Round"', 'Build, install, and launch on a Wear OS emulator')
2043
2140
  .example('$0 run --platform roku --target device --device "living room"', 'Build, deploy, launch, and stream logs on a Roku device')
2141
+ .example('$0 run tizen dev device "living room" --signing-profile samsung-tv-dev', 'Build, install, and launch on a trusted Samsung TV')
2142
+ .example('$0 run webos dev device "living room"', 'Build, install, and launch on a paired LG TV')
2044
2143
  .example('$0 run roku dev device --app criterion', 'Run a configured monorepo app/flavor')
2045
2144
  .example('$0 run roku prod device --hsc-project platforms/hsconfig.criterion.prod.json', 'Override the Roku HSC project file'), async (args) => {
2046
2145
  await runRunPlanCommand('run', args);
@@ -2049,7 +2148,7 @@ catch (err) {
2049
2148
  .parserConfiguration({ 'boolean-negation': false })
2050
2149
  .option('type', {
2051
2150
  type: 'string',
2052
- choices: ['roku', 'ios', 'apple-tv', 'android', 'android-tv'],
2151
+ choices: ['roku', 'tizen', 'webos', 'ios', 'apple-tv', 'android', 'android-tv'],
2053
2152
  demandOption: true,
2054
2153
  describe: 'Target platform type',
2055
2154
  })
@@ -2073,7 +2172,11 @@ catch (err) {
2073
2172
  })
2074
2173
  .option('app-package', {
2075
2174
  type: 'string',
2076
- describe: 'Roku app .zip or folder to deploy',
2175
+ describe: 'Built Roku .zip/folder, Tizen .wgt, or webOS .ipk to deploy',
2176
+ })
2177
+ .option('app-id', {
2178
+ type: 'string',
2179
+ describe: 'Packaged Tizen/webOS application id override',
2077
2180
  })
2078
2181
  .option('source-root', {
2079
2182
  type: 'string',
@@ -2102,7 +2205,9 @@ catch (err) {
2102
2205
  describe: 'Resolve Roku stack trace paths with source maps during log streaming',
2103
2206
  })
2104
2207
  .example('$0 device:run --type roku', 'Build, deploy, launch, and stream Roku logs')
2105
- .example('$0 device:run --type roku --device "living room" --no-build', 'Deploy to a preferred Roku by name'), async (args) => {
2208
+ .example('$0 device:run --type roku --device "living room" --no-build', 'Deploy to a preferred Roku by name')
2209
+ .example('$0 device:run --type tizen --device "living room" --no-build --app-package ./app.wgt', 'Install and launch an existing Samsung package')
2210
+ .example('$0 device:run --type webos --device "living room" --no-build --app-package ./app.ipk', 'Install and launch an existing LG package'), async (args) => {
2106
2211
  try {
2107
2212
  const mod = await Promise.resolve().then(() => __importStar(require('./device/device-cli.js')));
2108
2213
  await mod.runDeviceRunCommand({
@@ -2113,6 +2218,7 @@ catch (err) {
2113
2218
  noLogs: Boolean(args['no-logs']),
2114
2219
  buildCmd: args['build-cmd'],
2115
2220
  appPackage: args['app-package'],
2221
+ appId: args['app-id'],
2116
2222
  sourceRoot: args['source-root'],
2117
2223
  sourceMapRoot: args['source-map-root'],
2118
2224
  files: args.files,
@@ -2283,6 +2389,7 @@ catch (err) {
2283
2389
  .option('deviceAppPort', { type: 'number', description: 'Port for device app client', default: 59152 })
2284
2390
  .option('extensionPort', { type: 'number', description: 'Port for extension client', default: 59153 })
2285
2391
  .option('defaultClientType', { type: 'string', choices: ['web', 'device'], default: 'web', description: 'Default target client for extension messages' })
2392
+ .option('vite-config', { type: 'string', description: 'Project-relative Vite config selecting the Web DOM host composition' })
2286
2393
  .option('appName', { type: 'string', description: 'App name for multi-app debugger (e.g. FanDuel). Shown in the extension and used when registering with assign-port. Exposed as VITE_HOSANNA_APP_NAME.' }), async (args) => {
2287
2394
  if (args.verbose) {
2288
2395
  process.env.HOSANNA_VERBOSE = '1';
@@ -2295,6 +2402,7 @@ catch (err) {
2295
2402
  deviceAppPort: args.deviceAppPort,
2296
2403
  extensionPort: args.extensionPort,
2297
2404
  defaultClientType: args.defaultClientType || 'web',
2405
+ viteConfig: args['vite-config'],
2298
2406
  appName: args.appName,
2299
2407
  });
2300
2408
  })