@motionharness/cli 0.1.8 → 0.2.4

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/NOTICE CHANGED
@@ -1,13 +1,14 @@
1
- MotionHarness
2
- Copyright 2026 MH contributors
1
+ MotionHarness (@motionharness/cli)
2
+ Copyright 2026 MotionHarness contributors
3
3
 
4
- The SDK is MIT. The local application and selected supporting source are
5
- GPL-3.0-only. LICENSE defines the scope in this checkout. Each package includes
6
- its complete applicable license and its own third-party notices.
4
+ MotionHarness-authored source and binaries distributed in @motionharness/cli
5
+ and its platform packages are licensed under GPL-3.0-only. The complete license
6
+ text is included in LICENSE.
7
7
 
8
- Third-party code, fonts, assets and adapted components retain their licenses.
9
- Keep all third-party notices, including OpenFX, shadcn/ui and font notices.
10
- The media rebuild materials retain their scoped 0BSD license.
8
+ Third-party libraries, bundled standalone FFmpeg/ffprobe binaries (GPL-2.0-or-later
9
+ on macOS and Windows, with corresponding sources and rebuild scripts under
10
+ licenses/media), fonts, assets and adapted components retain their original
11
+ licenses and notices.
11
12
 
12
13
  Rights already granted for previously distributed versions, including under
13
14
  the Apache License, Version 2.0, are unaffected.
package/README.md CHANGED
@@ -30,7 +30,7 @@ dependencies. Run `mh skill` for the authoring and Agent guide.
30
30
 
31
31
  Use `mh render ./clip.wav --project ./my-project` to export the audio mix, or
32
32
  `mh render ./frames.zip --project ./my-project` for a numbered PNG sequence.
33
- The macOS and Windows packages include standalone LGPL FFmpeg and ffprobe,
33
+ The macOS and Windows packages include standalone GPL FFmpeg and ffprobe (GPL-2.0-or-later with libx264 and libx265),
34
34
  extracted automatically on first use. Corresponding
35
35
  sources, licenses and the rebuild recipe are included under licenses/media in
36
36
  the runtime resource directory reported by mh doctor. On Ubuntu, install
@@ -52,8 +52,8 @@ platform package. `@motionharness/cli-darwin-arm64` and
52
52
  `@motionharness/cli-linux-arm64` contain `MotionHarness`;
53
53
  `@motionharness/cli-win32-x64` contains `MotionHarness.exe`. The native process uses
54
54
  this full product name; the command remains `mh`. Install the main package
55
- for the command. The Linux packages target x64 and Arm64 with glibc. Keep optional dependencies enabled. Installation works with
56
- `--ignore-scripts`: installation still works; run `mh studio home` to open Studio and start the guide. The postinstall hook can open Studio on desktop installs and does not download another binary.
55
+ for the command. The Linux packages target x64 and Arm64 with glibc. Keep optional dependencies enabled. Installation also works with
56
+ `--ignore-scripts`; run `mh studio home` to open Studio and start the guide. The postinstall hook can open Studio on desktop installs and does not download another binary.
57
57
 
58
58
  For installations predating this native filename, update with
59
59
  `npm install -g @motionharness/cli@latest --include=optional`.
@@ -62,15 +62,26 @@ The npm command verifies the platform package and its version. On macOS and Linu
62
62
  experimental `process.execve()` to replace Node with Rust; unavailable API support
63
63
  produces an upgrade prompt. On Windows it starts and waits for `MotionHarness.exe`, preserving
64
64
  arguments, stdin/stdout/stderr and exit status.
65
- `mh open [directory]` returns a Studio URL and exits. Project commands default to
65
+ `mh open [directory]` returns `urls` (loopback first, then candidate network URLs) and exits.
66
+ It enables network access for the entire Studio service, not just the named project.
67
+ Use `mh open --local-only` to disable network access for all projects without restarting the daemon;
68
+ a later plain `mh open` enables it again. Other commands do not enable it implicitly.
69
+ Anyone who can reach the network port can use Studio; use it only on a trusted network.
70
+ If a firewall is configured, Standard preview also needs the returned `networkPreviewPort`.
71
+ The CLI's daemon management stays on loopback. Scripts that read `url` from `mh open` should switch to `urls[0]`.
72
+ When upgrading from an older version that returns `url`, close the projects and run `mh update` from
73
+ a terminal; that version's Studio update worker cannot reopen projects using the new receipt.
74
+ Project commands default to
66
75
  the current working directory (`--project` selects another) and start sessions
67
76
  on demand. Normal opening/editing commands automatically open or reuse Studio
68
- once per session, initially paused, without waiting for its connection. `preview`,
77
+ once per working round, initially paused, without waiting for its connection. A
78
+ round ends after 30 minutes without commands or Studio activity, and its first
79
+ command receipt includes the project's stable Studio link as `studio.url`. `preview`,
69
80
  `render` and `render plan` stay in the background even on first preparation; a
70
81
  later normal command can still open Studio once. Use `mh open` to present a new
71
82
  runnable project. The interactive Studio shows Quick Start once when the first
72
83
  project's preview is ready. Edits and exports keep the
73
- user's page open and do not reopen a closed tab. Set `MH_NO_BROWSER=1` for batch
84
+ user's page open and do not reopen a tab closed during the round. Set `MH_NO_BROWSER=1` for batch
74
85
  or server use. `mh open --browser` explicitly reopens or reuses Studio and waits
75
86
  for its connection, even with automatic opening disabled. If the browser fails
76
87
  to launch or connect, the explicit command exits nonzero and includes the Studio
@@ -79,7 +90,7 @@ failure does not fail project preparation. If local network permission is
79
90
  denied, `mh open` reports a command to open the same project from your terminal.
80
91
  `mh status` and `mh close` inspect or release the current project; `mh daemon
81
92
  status` lists all projects and `mh daemon stop` explicitly stops everything.
82
- A session closes after 30 idle minutes without connected Studios or running work.
93
+ `inspect`, `preview` and `render` release their session when they finish unless a Studio page is open, reconnecting or loading; other background sessions close after five idle minutes without connected Studios or running work. An interactive Studio session keeps its 30-minute reconnect grace.
83
94
  An empty daemon exits after 10 minutes. Busy projects and failed saves prevent
84
95
  normal close/reclamation. Node runs only for transient build/dependency tasks;
85
96
  Chrome automation uses Rust chromiumoxide.
@@ -100,6 +111,17 @@ and daemon state use separate `auth` and `daemon` directories under `%LOCALAPPDA
100
111
  These directories require current-user ownership and private ACLs, with no reparse
101
112
  points. `MH_CACHE_DIR` can select an
102
113
  absolute private writable base; `mh doctor` reports the resource location.
114
+ When an agent sandbox denies writes to the default cache or daemon directory and no
115
+ override is set, MotionHarness uses a private `mh-<uid>` directory (`%TEMP%\mh` on
116
+ Windows) under the process temporary directory for that run and says so on stderr.
117
+ Settings, credentials and telemetry choices never move. On Windows the daemon leaves the
118
+ caller's Job when the Job allows it, so it survives the command that started it.
119
+
120
+ `mh doctor` checks state directories, loopback networking, an actual Chrome page load,
121
+ encoders and internet reachability. Its `status` is `ready` (exit 0), `install-broken`
122
+ (exit 1) or `environment-blocked` (exit 3, usually an agent sandbox); `capabilities`
123
+ names what each check blocks; when not ready, `next` tells an agent in one sentence what
124
+ is wrong and what to do, including how to allow it.
103
125
  The new Windows default leaves the old `%LOCALAPPDATA%\mh\cache` in place, so a
104
126
  cache created with the wrong owner by an earlier CLI does not block startup.
105
127
  A damaged cache is an error: stop processes using the affected hash, remove only
@@ -109,12 +131,21 @@ Upgrade with `mh update` (or `npm install -g @motionharness/cli@latest`); uninst
109
131
  `npm uninstall -g @motionharness/cli`. Cached runtime resources remain on disk.
110
132
  The independently distributed native binary continues to work without npm.
111
133
 
112
- The public CLI collects anonymous usage events by default: command and run
113
- outcomes, Studio control clicks and keys outside text editors, versions, system
114
- details, and the coding agent when identifiable. An installation uses a random
115
- local ID. Source code, projects, assets, paths, command arguments, and typed text
116
- are not uploaded. A bounded local queue retries failed uploads without changing
117
- command output or exit status.
134
+ The public CLI collects anonymous usage events by default when built with a
135
+ configured telemetry endpoint: command and run outcomes, Studio control clicks
136
+ and keys outside text editors, versions, system details, and the coding agent
137
+ when identifiable. An installation uses a random local ID. Source code,
138
+ projects, assets, paths, command arguments, and typed text are not uploaded. A
139
+ bounded local queue retries failed uploads without changing command output or
140
+ exit status.
141
+
142
+ To opt out at any time, run `mh telemetry disable` (or toggle usage telemetry
143
+ in local Studio settings). CLI and Studio share this persistent preference,
144
+ stopping collection/uploads and clearing queued events. You can also check the
145
+ active setting with `mh telemetry status`, or disable uploads per process with
146
+ `MH_TELEMETRY_DISABLED=1`, `DO_NOT_TRACK=1`, or `MH_TELEMETRY_ENDPOINT=""`.
147
+ Full field and retention details are documented in
148
+ [docs/telemetry.md](https://github.com/MotionHarness/motionharness/blob/main/docs/telemetry.md).
118
149
 
119
150
  ## Updates
120
151
 
@@ -184,3 +215,9 @@ successful exit status is 0 even when an update is available. Default JSON outpu
184
215
  `ok`, `currentVersion`, `latestVersion`, `updateAvailable` and `updated`; successful
185
216
  installation additionally includes `installedVersion`. Errors and unsupported
186
217
  installation attempts exit nonzero; npm logs never mix into JSON stdout.
218
+
219
+ ## License
220
+
221
+ `@motionharness/cli` and its platform binaries are licensed under [GPL-3.0-only](https://github.com/MotionHarness/motionharness/blob/main/products/cli/LICENSE).
222
+ Bundled macOS and Windows FFmpeg/ffprobe binaries are licensed under GPL-2.0-or-later, with corresponding sources and rebuild scripts included under `licenses/media`.
223
+ See `LICENSE` and `NOTICE` in the package for details.
@@ -5,7 +5,9 @@ import { existsSync } from 'node:fs';
5
5
  import { join, dirname } from 'node:path';
6
6
  import { createRequire } from 'node:module';
7
7
  const request=JSON.parse(await readFile(process.argv[2],'utf8'));
8
- const {prefix,root,packageJson,latest,summary,json,timeoutSeconds}=request;
8
+ const {prefix,root,packageJson,latest,summary,json,timeoutSeconds,channel}=request;
9
+ const registryArgs=typeof channel?.registry==='string'&&channel.registry.length>0?['--registry',channel.registry]:[];
10
+ const isPrerelease=value=>value.split('+')[0].includes('-');
9
11
  let lock, installedStarted=false, interrupted=false, activeChild;
10
12
  const deadline=Date.now()+timeoutSeconds*1000;
11
13
  const env={...process.env};delete env.MH_WINDOWS_UPDATE_REQUEST;
@@ -62,7 +64,8 @@ try {
62
64
  await acquire();
63
65
  const manifest=JSON.parse(await readFile(packageJson,'utf8'));
64
66
  if(manifest.name!=='@motionharness/cli')throw new Error('Invalid npm entry package');
65
- summary.currentVersion=manifest.version;summary.updateAvailable=newer(latest,manifest.version);
67
+ summary.currentVersion=manifest.version;
68
+ summary.updateAvailable=latest!==manifest.version&&(channel?.custom?true:!isPrerelease(latest)&&(newer(latest,manifest.version)||isPrerelease(manifest.version)));
66
69
  if(!summary.updateAvailable) {
67
70
  console.log(json?JSON.stringify(summary):`MotionHarness is up to date (${manifest.version})`);
68
71
  } else {
@@ -76,7 +79,7 @@ try {
76
79
  catch(error) {if(!['EBUSY','EPERM','EACCES'].includes(error.code))throw error;if(Date.now()>=deadline)throw new Error('Close other MotionHarness commands before updating; the executable is still in use');await pause();}
77
80
  }
78
81
  installedStarted=true;
79
- await npm(['install','--global','--prefix',prefix,`@motionharness/cli@${latest}`,'--include=optional','--ignore-scripts','--no-audit','--no-fund']);
82
+ await npm(['install','--global','--prefix',prefix,`@motionharness/cli@${latest}`,'--include=optional','--ignore-scripts','--no-audit','--no-fund',...registryArgs]);
80
83
  const installed=JSON.parse(await readFile(packageJson,'utf8'));
81
84
  const platformJson=platformManifest();
82
85
  const platform=JSON.parse(await readFile(platformJson,'utf8'));
package/package.json CHANGED
@@ -1,10 +1,22 @@
1
1
  {
2
- "version": "0.1.8",
2
+ "version": "0.2.4",
3
3
  "license": "GPL-3.0-only",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22.15.0"
7
7
  },
8
+ "author": "MotionHarness contributors",
9
+ "homepage": "https://github.com/MotionHarness/motionharness#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/MotionHarness/motionharness/issues"
12
+ },
13
+ "keywords": [
14
+ "motion-graphics",
15
+ "animation",
16
+ "video",
17
+ "cli",
18
+ "motionharness"
19
+ ],
8
20
  "repository": {
9
21
  "type": "git",
10
22
  "url": "git+https://github.com/MotionHarness/motionharness.git",
@@ -32,11 +44,11 @@
32
44
  "x64"
33
45
  ],
34
46
  "optionalDependencies": {
35
- "@motionharness/cli-darwin-arm64": "0.1.8",
36
- "@motionharness/cli-darwin-x64": "0.1.8",
37
- "@motionharness/cli-win32-x64": "0.1.8",
38
- "@motionharness/cli-linux-x64": "0.1.8",
39
- "@motionharness/cli-linux-arm64": "0.1.8"
47
+ "@motionharness/cli-darwin-arm64": "0.2.4",
48
+ "@motionharness/cli-darwin-x64": "0.2.4",
49
+ "@motionharness/cli-win32-x64": "0.2.4",
50
+ "@motionharness/cli-linux-x64": "0.2.4",
51
+ "@motionharness/cli-linux-arm64": "0.2.4"
40
52
  },
41
53
  "files": [
42
54
  "bin/mh",