@moxuli/moremote 0.1.5 → 0.1.6
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/README.md +6 -1
- package/dist/cli.js +2 -1
- package/dist/local-enrollment.d.ts +1 -1
- package/dist/local-enrollment.js +1 -1
- package/docs/STATE.md +16 -4
- package/docs/configuration.md +9 -1
- package/docs/plans/2026-11-14-custom-api-origin.md +69 -0
- package/docs/specs/05-endpoint-and-lifecycle.md +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ This explicit command authenticates the existing official daemon, enables cloud
|
|
|
50
50
|
and automatic local enrollment, and installs/starts only the CLI's owned per-user
|
|
51
51
|
background service. It preserves configured targets/custom HTTPS origins, active
|
|
52
52
|
and revoked phones, and existing update preferences. With no origin configured,
|
|
53
|
-
it selects `https://moremote
|
|
53
|
+
it selects `https://api.moremote.moxuli.com`. It never starts, modifies
|
|
54
54
|
or upgrades Paseo or global tools. Source-checkout setup without managed state
|
|
55
55
|
binds the current source frontend and retains manual updates. Installed packages
|
|
56
56
|
or retained managed state require an enrollment-capable runtime: explicit setup
|
|
@@ -59,6 +59,11 @@ the automatic-update opt-out. A missing current package/capability fails clearly
|
|
|
59
59
|
before enabling enrollment, never by substituting old public code. The immutable
|
|
60
60
|
old package stays retained; its selected runtime/bootstrap move to capable code.
|
|
61
61
|
|
|
62
|
+
Existing installations keep their configured API origin, including
|
|
63
|
+
`https://moremote-cloud-ingress.pages.dev`. Retained pair origins and pending
|
|
64
|
+
offers remain unchanged; both domains must serve the same notification backend
|
|
65
|
+
directly, without an HTTP redirect or another pairing.
|
|
66
|
+
|
|
62
67
|
Pair the computer **only in official Paseo**. A compatible MoRemote app uses
|
|
63
68
|
that already authenticated connection's ordinary file channel to discover the
|
|
64
69
|
optional CLI and enroll its own phone automatically, even before a workspace
|
package/dist/cli.js
CHANGED
|
@@ -17,6 +17,7 @@ import { OperationJournal } from './journal.js';
|
|
|
17
17
|
const VERSION = await packageVersion();
|
|
18
18
|
import { setupEnrollment } from './setup.js';
|
|
19
19
|
import { setupServiceEntry } from './setup-upgrade.js';
|
|
20
|
+
import { DEFAULT_API_ORIGIN } from './local-enrollment.js';
|
|
20
21
|
const HELP = `MoRemote CLI ${VERSION} — optional Paseo 0.15.3 enhancement
|
|
21
22
|
Usage: moremote-cli <command> [options]
|
|
22
23
|
setup --yes Enable automatic enrollment and own background service
|
|
@@ -179,7 +180,7 @@ async function main() {
|
|
|
179
180
|
await stopped(dir);
|
|
180
181
|
if (config.pairs.length >= 16)
|
|
181
182
|
throw Error('PAIRING_LIMIT');
|
|
182
|
-
const origin = validateOrigin(config.apiOrigin ??
|
|
183
|
+
const origin = validateOrigin(config.apiOrigin ?? DEFAULT_API_ORIGIN, config.allowLoopbackHttp);
|
|
183
184
|
const official = new OfficialClient(config);
|
|
184
185
|
try {
|
|
185
186
|
await official.connect();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Config, type Pair } from './config.js';
|
|
2
2
|
import { CloudClient } from './cloud-client.js';
|
|
3
3
|
import { EnrollmentFiles, type DiscoveryOptions } from './enrollment-files.js';
|
|
4
|
-
export declare const DEFAULT_API_ORIGIN = "https://moremote
|
|
4
|
+
export declare const DEFAULT_API_ORIGIN = "https://api.moremote.moxuli.com";
|
|
5
5
|
export interface LocalEnrollmentOptions {
|
|
6
6
|
clock?: () => number;
|
|
7
7
|
files?: (options: DiscoveryOptions) => EnrollmentFiles;
|
package/dist/local-enrollment.js
CHANGED
|
@@ -2,7 +2,7 @@ import { saveConfig, validateOrigin } from './config.js';
|
|
|
2
2
|
import { makeOffer, tokenHash } from './pairing.js';
|
|
3
3
|
import { EnrollmentFiles } from './enrollment-files.js';
|
|
4
4
|
import { parseEnrollmentRequest, requestFingerprint } from './enrollment-protocol.js';
|
|
5
|
-
export const DEFAULT_API_ORIGIN = 'https://moremote
|
|
5
|
+
export const DEFAULT_API_ORIGIN = 'https://api.moremote.moxuli.com';
|
|
6
6
|
// The runtime's existing serialized cycle owns this consumer and its Config.
|
|
7
7
|
// No watcher, background config writer, listener or official mutation is added.
|
|
8
8
|
export class LocalEnrollment {
|
package/docs/STATE.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Current state — 2026-11-14
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Released0.1.5 — 2026-11-14
|
|
4
|
+
|
|
5
|
+
Owner-authorized tagv0.1.5 targets `ba8a428b63562cdd4b258cd79f7a8251af067dbd`.
|
|
6
|
+
GitHub CI43567209765 passes complete checks and real packaged upgrade/rollback
|
|
7
|
+
on Windows, Linux and macOS. Release43567215583 succeeds through the existing
|
|
8
|
+
scoped-secret npm/provenance and GitHub publication workflow. Anonymous registry
|
|
9
|
+
readback confirms version/latest0.1.5. The public npm and GitHub tarballs are
|
|
10
|
+
byte-identical, match registry SHA512 and GitHub SHA256SUMS, and the isolated
|
|
11
|
+
public installation reports0.1.5. Tarball:137104bytes, SHA256
|
|
12
|
+
`8ad64844cab23dea5c0295e6e9b7ef3d4f0e88785c517ec182c783bdd23147dd`.
|
|
4
13
|
|
|
5
14
|
Cloudflare retains only notifications and explicit notification replies/approvals.
|
|
6
15
|
Deleted activity interests, optional surface lane, widget fingerprints and quota
|
|
@@ -16,9 +25,12 @@ question/approval encoding,3s control cadence, normal/outage pause fences,
|
|
|
16
25
|
immutable lost acknowledgements, drain/receipt ownership and zero idle surface or
|
|
17
26
|
directory calls. Projection tests first exposed leaked title/host/usage fields
|
|
18
27
|
and silently dropped oversized requests; all now pass. Read-only independent
|
|
19
|
-
review found no remaining authority/replay blocker.
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
review found no remaining authority/replay blocker. The initial local aliased
|
|
29
|
+
frontend smoke exceeded its10second budget during concurrent builds; the exact
|
|
30
|
+
preserved frontend subsequently ran in0.58seconds, and the complete unchanged
|
|
31
|
+
upgrade/rollback smoke passed. No timeout or production behavior was relaxed.
|
|
32
|
+
No everyday service, installed runtime or production host session was changed.
|
|
33
|
+
The previous0.1.4 publication below remains historical.
|
|
22
34
|
|
|
23
35
|
## Released0.1.4 — 2026-11-13
|
|
24
36
|
|
package/docs/configuration.md
CHANGED
|
@@ -14,7 +14,7 @@ existing official daemon and preserve its exact identity, then enable cloud and
|
|
|
14
14
|
local enrollment before installing/starting the existing owned service.
|
|
15
15
|
Configured custom HTTPS origin/target, existing active/revoked phones and update
|
|
16
16
|
policy are preserved. An absent origin selects
|
|
17
|
-
`https://moremote
|
|
17
|
+
`https://api.moremote.moxuli.com`. Source checkout without managed state
|
|
18
18
|
binds its own current frontend and stays manual-update. Installed packages and
|
|
19
19
|
retained managed state use capability-aware setup: if selected code predates
|
|
20
20
|
enrollment, explicit setup installs/verifies the exact current version before
|
|
@@ -24,6 +24,14 @@ packages, pairs/custom origin and the independent auto-update opt-out.
|
|
|
24
24
|
never enabled success or an older-package fallback. Nothing patches/upgrades
|
|
25
25
|
official Paseo or global tools. This capability requires CLI0.1.4 or later.
|
|
26
26
|
|
|
27
|
+
The custom-domain default applies only when `apiOrigin` is absent. Every saved
|
|
28
|
+
origin remains authoritative, including the former default
|
|
29
|
+
`https://moremote-cloud-ingress.pages.dev`; setup, expert pairing and runtime do
|
|
30
|
+
not migrate it. Existing per-phone origins, original pending offers and exact
|
|
31
|
+
cloud-create bytes retain their original authority. Both domains must directly
|
|
32
|
+
serve the same notification service; redirects are not a migration mechanism.
|
|
33
|
+
Release the new default only after custom-domain DNS and TLS are verified.
|
|
34
|
+
|
|
27
35
|
Optional schema-1 fields are `localEnrollment:{home:<absolute user home>}` and
|
|
28
36
|
at most16 `enrollmentRequests`. Only explicit setup supplies that home; ordinary
|
|
29
37
|
`run`/tests with legacy configuration never create discovery in the real HOME.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Custom notification API origin
|
|
2
|
+
|
|
3
|
+
Owner-authorized preparation for the registered `moxuli.com` domain. Keep DNS
|
|
4
|
+
with Aliyun and bind `api.moremote.moxuli.com` to the existing Pages/Worker
|
|
5
|
+
notification service. This CLI branch performs no DNS/service deployment,
|
|
6
|
+
version bump, publication, real enrollment or service registration.
|
|
7
|
+
|
|
8
|
+
## Acceptance and authority
|
|
9
|
+
|
|
10
|
+
- New explicit setup, its published local descriptor and expert `pair` use
|
|
11
|
+
`https://api.moremote.moxuli.com` only when config has no API origin.
|
|
12
|
+
- Reuse the existing `DEFAULT_API_ORIGIN` export; remove the separate expert
|
|
13
|
+
pairing literal. Default selection is not an implicit configuration migration.
|
|
14
|
+
- Preserve every existing configured origin, including the Pages default, and
|
|
15
|
+
every active/revoked/pending pair's original API authority and secrets.
|
|
16
|
+
- Resume retained enrollment requests with original request/offer/create bytes;
|
|
17
|
+
do not regenerate offers, extend expiry, replay uncertain mutations or redirect
|
|
18
|
+
enrolled phones to another origin.
|
|
19
|
+
- Both domains must directly reach the same notification backend. Widgets and
|
|
20
|
+
Live Activities acquire no new Cloudflare dependency.
|
|
21
|
+
|
|
22
|
+
## Implementation and verification
|
|
23
|
+
|
|
24
|
+
`src/local-enrollment.ts` owns the shared default; existing setup and discovery
|
|
25
|
+
already consume it. `src/cli.ts` imports it for expert pairing. No encryption,
|
|
26
|
+
notification dispatch, official protocol, retry or service ownership behavior
|
|
27
|
+
changes.
|
|
28
|
+
|
|
29
|
+
Add regressions first: assert the literal new origin in fresh setup and its
|
|
30
|
+
descriptor, execute the real CLI expert onboarding against an in-process relay,
|
|
31
|
+
and preserve a saved Pages configuration with active/revoked/pending pairings
|
|
32
|
+
and immutable enrollment bytes. CLI fixtures replace native service-manager
|
|
33
|
+
queries with a temporary Node process that reports absent registration and
|
|
34
|
+
rejects lifecycle operations; a real installed service must never be consulted.
|
|
35
|
+
|
|
36
|
+
Integration owner runs:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
node --import tsx --test tests/local-enrollment.test.ts tests/pair-onboarding.test.ts tests/setup-command.test.ts tests/setup-migration.test.ts
|
|
40
|
+
npm run check
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Baseline RED: fresh setup selected the old Pages domain; the retained Pages
|
|
44
|
+
compatibility regression passed. The initial expert fixture stopped at
|
|
45
|
+
`FOREIGN_SERVICE_REGISTRATION` during diagnostics because changing HOME does
|
|
46
|
+
not isolate a native manager's real user domain. Correct the fixture rather
|
|
47
|
+
than weakening production ownership checks. Passing acceptance remains for
|
|
48
|
+
the integration owner to record after implementation.
|
|
49
|
+
|
|
50
|
+
## Publication gate
|
|
51
|
+
|
|
52
|
+
Do not publish a CLI containing the new default until authoritative DNS,
|
|
53
|
+
certificate validation and direct HTTPS service behavior succeed on the
|
|
54
|
+
custom domain. Also verify the former Pages domain still directly serves the
|
|
55
|
+
same backend and existing pairings remain usable. Aliyun DNS entry and
|
|
56
|
+
Cloudflare binding are owned by the integration/deployment task. Keep the
|
|
57
|
+
package version unchanged during preparation; record final external evidence
|
|
58
|
+
and make any release decision separately.
|
|
59
|
+
|
|
60
|
+
## Local verification and release gate
|
|
61
|
+
|
|
62
|
+
The custom hostname is active. Independent DNS, certificate and direct JSON API
|
|
63
|
+
reads pass on both origins without redirects. Full local check:238 tests, zero
|
|
64
|
+
failures; the actual packaged upgrade/rollback smoke, tag validation and
|
|
65
|
+
deterministic0.1.6 pack pass. A subsequent test-only Windows preload URL
|
|
66
|
+
correction passes both actual CLI fixture suites (5 tests). Independent quality
|
|
67
|
+
re-review clears the source; actual Windows, Linux and macOS CI remains required
|
|
68
|
+
before tagging. The published package remains0.1.5 until the release receiver
|
|
69
|
+
independently confirms0.1.6. No real service registration was performed.
|
|
@@ -123,13 +123,21 @@ The companion persists its root/host/enrollment capabilities before POST pairs,
|
|
|
123
123
|
|
|
124
124
|
Unreleased source onboarding: invoking `pair` is explicit cloud consent. If
|
|
125
125
|
`apiOrigin` is absent, select the built-in
|
|
126
|
-
`https://moremote
|
|
126
|
+
`https://api.moremote.moxuli.com`; otherwise preserve and validate the
|
|
127
127
|
configured origin. Existing target, local official discovery and daemon pin
|
|
128
128
|
remain authoritative. Persist cloud-enabled configuration and the new offer
|
|
129
129
|
only after the official connection succeeds, before relay creation. Retained
|
|
130
130
|
pair keys, origins and revocation are never changed by a new enrollment.
|
|
131
131
|
Passive config loads/check/status do not opt in, and pairing installs no service.
|
|
132
132
|
|
|
133
|
+
Explicit setup, the discovery descriptor and expert `pair` share this one
|
|
134
|
+
default. A saved `apiOrigin`, including the former default
|
|
135
|
+
`https://moremote-cloud-ingress.pages.dev`, is never replaced on upgrade/setup.
|
|
136
|
+
Retained per-pair origins, pending request/offer bytes and cloud-create bytes are
|
|
137
|
+
unchanged. Both domains directly serve the same notification backend; the
|
|
138
|
+
default change authorizes no redirect, old-pair migration or protocol change.
|
|
139
|
+
Custom-domain DNS/TLS verification is a release prerequisite.
|
|
140
|
+
|
|
133
141
|
## Official compatibility and observation
|
|
134
142
|
|
|
135
143
|
Pin client/protocol0.15.3. createHostClient from client/node and exported internal/daemon-client types are the inspected API. Use clientType cli and a distinct companion clientId. Missing explicitEventSubscriptions fails closed. Subscribe only agent_attention_required, agent_permission_request, agent_permission_resolved, status.server_info with official remote notifications disabled. Never call client_heartbeat, clear_agent_attention, workspace read acknowledgement or register_push_token. Inspected SDK automatic liveness uses bare protocol ping (10s), not visible-user presence. Actual synthetic WebSocket consumers exercise the real adapter/SDK, await that liveness interval, verify wire traffic, then lose send/permission acknowledgements and reconnect without a second mutation.
|