@moxuli/moremote 0.1.4 → 0.1.5
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 +15 -27
- package/dist/cloud-client.d.ts +1 -8
- package/dist/cloud-client.js +2 -7
- package/dist/notification-state.d.ts +10 -0
- package/dist/notification-state.js +36 -0
- package/dist/official-client.d.ts +16 -70
- package/dist/official-client.js +21 -14
- package/dist/projection.d.ts +3 -17
- package/dist/projection.js +11 -21
- package/dist/runtime.js +10 -53
- package/docs/STATE.md +36 -5
- package/docs/configuration.md +10 -49
- package/docs/native-enrollment-acceptance.md +21 -0
- package/docs/specs/01-architecture.md +14 -1
- package/docs/specs/02-encrypted-delivery.md +4 -4
- package/docs/specs/03-api-contract.md +18 -123
- package/package.json +29 -6
- package/dist/activity.d.ts +0 -79
- package/dist/activity.js +0 -193
package/docs/STATE.md
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
|
-
# Current state — 2026-11-
|
|
2
|
-
|
|
3
|
-
##
|
|
1
|
+
# Current state — 2026-11-14
|
|
2
|
+
|
|
3
|
+
## Unreleased notification-only source — 2026-11-14
|
|
4
|
+
|
|
5
|
+
Cloudflare retains only notifications and explicit notification replies/approvals.
|
|
6
|
+
Deleted activity interests, optional surface lane, widget fingerprints and quota
|
|
7
|
+
reads. `/state` contains verified daemon identity and exact current bound requests
|
|
8
|
+
only. Accepted source reads retain pending requests outside bounded discovery;
|
|
9
|
+
resolution/replacement/reconnect fences prevent stale resurrection. Publish only
|
|
10
|
+
semantic changes, one final clear, and near-expiry pending hydration. Unknown
|
|
11
|
+
ACK retries keep original bytes and cannot replay user actions.
|
|
12
|
+
|
|
13
|
+
Fresh full `npm run check` passes237 behavioral tests, types and compilation.
|
|
14
|
+
Real SDK and real runtime subprocess consumers verify preserved notification
|
|
15
|
+
question/approval encoding,3s control cadence, normal/outage pause fences,
|
|
16
|
+
immutable lost acknowledgements, drain/receipt ownership and zero idle surface or
|
|
17
|
+
directory calls. Projection tests first exposed leaked title/host/usage fields
|
|
18
|
+
and silently dropped oversized requests; all now pass. Read-only independent
|
|
19
|
+
review found no remaining authority/replay blocker. No service registration,
|
|
20
|
+
installed runtime, npm publication or production host session was changed.
|
|
21
|
+
Published0.1.4 below remains the released artifact, not this new source.
|
|
22
|
+
|
|
23
|
+
## Released0.1.4 — 2026-11-13
|
|
24
|
+
|
|
25
|
+
- Owner-authorizedv0.1.4 targets tested sourcea5615b6. Final local251/251,
|
|
26
|
+
typecheck/build and independent source reviews pass. HostedCI43389151913 passes
|
|
27
|
+
complete checks/identity/real upgrade and rollback on Linux, macOS and Windows.
|
|
28
|
+
- Release43390548675 succeeds through existing-secret npm/provenance and GitHub
|
|
29
|
+
publication. Independent public reads confirm version/latest0.1.4; downloaded
|
|
30
|
+
npm/GitHub bytes match SHA1/SHA512, GitHubSHA256SUMS and the exact local artifact.
|
|
31
|
+
SHA256: `c0e56b6ce596216fea6b2e546fc153c3833bafebc4c5ecf271d18b6a2d4e5151`.
|
|
32
|
+
- No everyday service, ordinary official conversation or production cloud change.
|
|
33
|
+
Earlier unreleased/acceptance entries below are historical checkpoints; these
|
|
34
|
+
verified publication facts supersede their former release status.
|
|
4
35
|
|
|
5
36
|
- Pending questions/approvals now use a stable current-occurrence clock, not an
|
|
6
37
|
older task-completion clock. Actual SDK delayed-current/snapshot regressions
|
|
@@ -33,7 +64,7 @@
|
|
|
33
64
|
- Hosted1df64e0 exercises all new behaviors successfully on Windows, but its
|
|
34
65
|
new cache fixture removes the directory before closing SQLite. Combine cleanup
|
|
35
66
|
into one ordered close-then-remove hook; preserve all behavior assertions and
|
|
36
|
-
rerun the full matrix on the corrected test source. Production
|
|
67
|
+
rerun the full matrix on the corrected test source. Production code is unchanged.
|
|
37
68
|
|
|
38
69
|
- Corrected8e4e065 Windows cleanup passes; macOS then rejects signaling an
|
|
39
70
|
already stopped wrapper's old process group. Preserve independent lock/control/
|
|
@@ -74,7 +105,7 @@
|
|
|
74
105
|
|
|
75
106
|
## Scope
|
|
76
107
|
|
|
77
|
-
Owner-approved notification/scoped delivery
|
|
108
|
+
Owner-approved notification/scoped delivery; local native surfaces are app-owned; Apache-2.0. Standalone Node24 companion targeting inspected official SDK/protocol0.15.3. Existing iOS protocol-vector floor is independent and unchanged. OpenUI and broader system extensions remain outside this scope.
|
|
78
109
|
|
|
79
110
|
## Unreleased single-pairing enrollment — source0.1.3, locally accepted
|
|
80
111
|
|
package/docs/configuration.md
CHANGED
|
@@ -92,55 +92,16 @@ snapshots/receipt revisions are not retransmitted each poll. Relay disappearance
|
|
|
92
92
|
or retirement fences execution but is not authenticated endpoint revocation.
|
|
93
93
|
Retired recovery ends at original child audit deadlines without extending them.
|
|
94
94
|
|
|
95
|
-
##
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
| Activity interests | Phone-selected, encrypted and pinned to pair/subscription/daemon/task; at most8 live interests per pair, original lifetime at most8h. |
|
|
106
|
-
| Optional host work | Interest discovery no faster than30s; one owned2s cancellation-bounded lane, at most8 exact SDK fallback reads, each bounded250ms. Commands/controls do not await it; drain/stop cancels and joins before closing SDK/journal. |
|
|
107
|
-
| Activity state | At most600s, capped by interest expiry; serialized encrypted envelope at most3000bytes, title160/hostName80 characters. APNs body at most4096bytes with512bytes reserved for static attributes. |
|
|
108
|
-
| Activity renewal | Only acknowledged nonterminal state renews from a fresh official measurement with120s remaining (about8min). Unknown admissions retry identical bytes until expiry; semantic transitions can supersede progress. Missing tasks do not imply completion. |
|
|
109
|
-
| Widget registration | One current WidgetKit token per pair;24h expiry, native foreground renewal around12h with a fresh registration ID. Not the alert/activity token. |
|
|
110
|
-
| Widget reload | Pair-keyed meaningful-change fingerprint on existing state PUT; clocks alone do not trigger reloads. One coalesced signal per changed fingerprint/current registration; legacy envelope-only uploads do not queue pushes. |
|
|
111
|
-
|
|
112
|
-
The phone registers/deletes tokens and encrypted interests; the CLI never
|
|
113
|
-
registers an official daemon push token or downloads full chat/timeline for
|
|
114
|
-
these surfaces. The relay sees token/environment, IDs, opaque topic/fingerprint,
|
|
115
|
-
envelope times/sizes and ciphertext. Only paired endpoints decrypt task/title,
|
|
116
|
-
host/project and genuine usage values. Apple receives encrypted activity state
|
|
117
|
-
in `ContentState.payload`, or exactly `{aps:{"content-changed":true}}` for widgets.
|
|
118
|
-
Activity/widget pushes do not depend on alert admission or presence suppression.
|
|
119
|
-
|
|
120
|
-
Terminal recovery uses cached authenticated unexpired interests and fresh
|
|
121
|
-
snapshot facts before optional normal discovery; it needs no normal GET/state
|
|
122
|
-
upload. Only end/delete routes are recovery-eligible, not ordinary updates,
|
|
123
|
-
interest reads or registration. A404/409 publication rejection invalidates that
|
|
124
|
-
cached target; it does not authorize a replacement or a blind replay. Conflicting
|
|
125
|
-
same-registration bytes are409; replacement needs a fresh registration ID.
|
|
126
|
-
Relay retired-identity guards share a1000-entry cap and fail closed rather than
|
|
127
|
-
evicting live protection; guards last through original8h activity/24h widget
|
|
128
|
-
expiry. Delayed registration PUTs cannot roll back replacements; identity-exact
|
|
129
|
-
widget DELETEs and stale provider results cannot retire newer registrations.
|
|
130
|
-
Activity DELETE targets the subscription itself. Expiry never renews through
|
|
131
|
-
retry; stale/offline is not success.
|
|
132
|
-
|
|
133
|
-
The relay needs explicit `APNS_WIDGET_TOPIC` for the widget extension plus
|
|
134
|
-
`.push-type.widgets`; Live Activity topic is main `APNS_TOPIC` plus
|
|
135
|
-
`.push-type.liveactivity`. Environments must match configured APNs sending.
|
|
136
|
-
These are relay settings, not CLI configuration keys. Default-off, global
|
|
137
|
-
budgets, kill deadline and existing receipt priority remain unchanged.
|
|
138
|
-
Provider signing is inside the original10s attempt deadline; after signing,
|
|
139
|
-
the durable caller rechecks enabled state, active pair, exact current
|
|
140
|
-
registration/publication and expiry immediately before transport.
|
|
141
|
-
APNs200 is provider admission, never display/delivery proof. Physical Live
|
|
142
|
-
Activity, widget reload/freshness/offline behavior and live cloud/APNs acceptance
|
|
143
|
-
for this delta remain pending. Exact routes/crypto: [[specs/03-api-contract]].
|
|
95
|
+
## Notification-only cloud use
|
|
96
|
+
|
|
97
|
+
Cloud opt-in owns native notifications, replies and approvals only. Pending forms
|
|
98
|
+
are encrypted with exact request-instance bindings; no titles, usage or general
|
|
99
|
+
task directory leave through `/state`. Current empty state is cleared once and
|
|
100
|
+
is not renewed. Nonempty hydration renews with120seconds remaining of600seconds.
|
|
101
|
+
Unknown publication retries retain their original envelope until expiry; this
|
|
102
|
+
never grants authority to replay an uncertain user action. WidgetKit, ActivityKit
|
|
103
|
+
and ordinary app/extension sends are independent official Paseo clients. No
|
|
104
|
+
activity/widget provider registration or discovery command remains.
|
|
144
105
|
|
|
145
106
|
## Service resources
|
|
146
107
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Native enrollment and request delivery acceptance
|
|
2
|
+
|
|
3
|
+
Date: 2026-11-13. Scope: unpublished source candidate with an unmodified official Paseo0.15.4 development daemon and its built-in mock provider, an isolated computer home, production cloud transport and a physical iPad. No paid model or ordinary user conversation was exercised.
|
|
4
|
+
|
|
5
|
+
## Observed results
|
|
6
|
+
|
|
7
|
+
- The native app retains its existing official host connection. An installed companion exchanges the per-phone offer over official authenticated file APIs and activates the production endpoint without another QR code or pasted invitation. An explicitly disabled previous endpoint still requires deliberate re-enablement; disabled history is not silently overwritten.
|
|
8
|
+
- A pending endpoint initially receives409 from active-only control routes. Runtime must validate official identity and original enrollment authority, activate in an activation-only cycle, and acquire fresh controls on the next cycle before commands or state publication. The production continuation activates the original pending offer after this correction.
|
|
9
|
+
- Official request snapshots can retain an older completion attention timestamp/reason while containing a new pending approval. Request notification authority therefore uses the persisted current occurrence, independently of that global completion hint. Unchanged occurrences retain their original clock and immutable notification bytes; resolution/replacement must not renew old authority.
|
|
10
|
+
- A real production permission notification opens the exact native request-review surface. Approve and deny are exercised on two distinct, still-pending official mock requests. Each produces one official resolution, no remaining pending request, and a resolved companion operation with revision1 acknowledged to cloud. Notification invalidation is acknowledged once for each occurrence.
|
|
11
|
+
- Production task tracking creates a subscription; a genuine terminal APNs activity update renders on the iPad and opens the exact task. Foreground terminal cleanup removes the subscription.
|
|
12
|
+
|
|
13
|
+
## Focused local proof
|
|
14
|
+
|
|
15
|
+
The stricter pending-endpoint fixture reproduces the activation deadlock before repair. The focused enrollment selection passes22 tests; the existing runtime quota-pause consumer also passes with the controls-first fence. Three real SDK request-notification wire consumers reproduce stale completion hints, absent attention flags and stale permission clocks. The final selected notification/attention/official-wire set passes14 tests, typecheck and build. These are scoped results, not a claim that all later concurrent release-candidate changes were checked here.
|
|
16
|
+
|
|
17
|
+
## Deliberately incomplete claims
|
|
18
|
+
|
|
19
|
+
An unlocked Notification Center text reply is submitted once, but native status remains unknown and no corresponding companion execution is observed. It is not replayed or reported as delivered. A hardware lock command has no conclusive lock-state evidence; this is not locked-reply acceptance. Full foreground/background/terminated delivery, cancellation, ActivityKit token rotation, widget remote token lifecycle, Siri, physical Action Button and interrupted file-share coverage remain separate gates. The test iPad has no physical Action Button.
|
|
20
|
+
|
|
21
|
+
Keep real task/host identifiers, endpoint tokens, device exports and raw receipts outside this public repository. Production deployment and cost limits are unchanged. No npm, TestFlight or cloud release is established by this document.
|
|
@@ -37,7 +37,7 @@ per-user operation.
|
|
|
37
37
|
|
|
38
38
|
## Components
|
|
39
39
|
|
|
40
|
-
- **Official adapter:** authenticated local daemon connection, bounded
|
|
40
|
+
- **Official adapter:** authenticated local daemon connection, bounded local notification discovery
|
|
41
41
|
and authoritative event subscriptions; no fake user focus/read acknowledgements.
|
|
42
42
|
- **Attention projection:** completion, pending question/approval and supported
|
|
43
43
|
errors from typed evidence; no prose classifiers or fabricated progress/usage.
|
|
@@ -100,3 +100,16 @@ background-service installer on another OS. No package publication, public Git
|
|
|
100
100
|
repository, automatic installer execution or production service registration is
|
|
101
101
|
implied by implementation approval. The owner selected Apache-2.0; public
|
|
102
102
|
publication remains separately authorized.
|
|
103
|
+
|
|
104
|
+
## Notification-only cloud boundary — November 14
|
|
105
|
+
|
|
106
|
+
The optional companion publishes only current question/approval forms and their
|
|
107
|
+
exact occurrence bindings. It does not request provider usage or upload task
|
|
108
|
+
titles, host/project labels or a conversation directory. Accepted source reads
|
|
109
|
+
retain pending requests outside the bounded recent discovery page; stale reads
|
|
110
|
+
and resolved/replaced occurrences cannot restore them. Publication changes are
|
|
111
|
+
deduplicated; only pending hydration renews near expiry, and one empty publication
|
|
112
|
+
clears the last resolved request. Unknown acknowledgements retain immutable bytes.
|
|
113
|
+
No activity interests, WidgetKit registrations or dedicated surface APNs calls
|
|
114
|
+
remain. Notification control, explicit reply/approval execution, immutable action
|
|
115
|
+
journals and outcome reconciliation retain their original safeguards.
|
|
@@ -150,10 +150,10 @@ survive payload TTL for24hours after original expiry, including after revoke.
|
|
|
150
150
|
Historical decoding is read-only and cannot extend command authority. After
|
|
151
151
|
retention, the outcome is unavailable/unverifiable, not a cloud-only success.
|
|
152
152
|
|
|
153
|
-
State
|
|
154
|
-
current
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
State is encrypted, size-bounded notification hydration: verified daemon identity
|
|
154
|
+
and exact current request forms/bindings only. Directory, titles and usage are
|
|
155
|
+
excluded. A stale form is never execution authority; the host must validate the
|
|
156
|
+
current occurrence again before an explicit notification response. State is display-only, not an operation
|
|
157
157
|
outcome audit: only the latest nonexpired snapshot keeps ciphertext, while each
|
|
158
158
|
immutable state ID/digest survives supersession only through that envelope's
|
|
159
159
|
original expiry. Exact retries do not renew it; expired snapshots cannot be newly
|
|
@@ -103,9 +103,7 @@ without contacting cloud.
|
|
|
103
103
|
|
|
104
104
|
### PUT /pairs/{pairId}/state; GET /pairs/{pairId}/state
|
|
105
105
|
|
|
106
|
-
Host writes, phone reads.
|
|
107
|
-
`{envelope,widgetFingerprint}`; GET returns the envelope only, as specified below.
|
|
108
|
-
Envelope channel is `state`.
|
|
106
|
+
Host writes, phone reads. Body/response contains exactly `{envelope}` with the `state` channel.
|
|
109
107
|
Only the latest nonexpired snapshot keeps ciphertext, monotonic by issuedAt then
|
|
110
108
|
immutable ID. Each state ID/digest remains a conflict guard through its own
|
|
111
109
|
original envelope expiry, including after supersession; no additional24hour
|
|
@@ -114,9 +112,14 @@ conflicting IDs/older snapshots never replace newer state. After expiry, a retry
|
|
|
114
112
|
cannot be admitted as new live state. Supersession clears only the previous
|
|
115
113
|
payload-bearing state, never rewrites older null tombstones. Operation, control,
|
|
116
114
|
attention and minimal authenticated outcome retention is unchanged.
|
|
117
|
-
Encrypted state is
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
Encrypted state is limited to `{version:1,daemonServerId,tasks}`. Each task
|
|
116
|
+
contains only `{agentId,pendingRequests}`; each pending request retains its exact
|
|
117
|
+
`requestId`, occurrence-bound `requestBinding` and original supported request.
|
|
118
|
+
This hydrates notification replies and approvals only. It contains no conversation
|
|
119
|
+
titles, directory, host labels, timestamps or usage report. Empty tasks are omitted.
|
|
120
|
+
Writers publish semantic changes, clear resolved requests once, and renew only
|
|
121
|
+
still-pending hydration near its original expiry. Immutable unknown retries keep
|
|
122
|
+
the same ID and bytes. Current-source validation remains mandatory at execution.
|
|
120
123
|
|
|
121
124
|
### PUT /pairs/{pairId}/device
|
|
122
125
|
|
|
@@ -398,120 +401,12 @@ host pairing response may contain two bounded proofs. A128KiB response reader
|
|
|
398
401
|
would permanently reject valid work and is nonconforming. This larger response
|
|
399
402
|
budget never raises the128KiB request or64KiB decrypted command-content limits.
|
|
400
403
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
| `PUT /activities/{subscriptionId}` | phone | `{registrationId,token,environment,topic,interest}` | normal |
|
|
411
|
-
| `DELETE /activities/{subscriptionId}` | phone | none | recovery |
|
|
412
|
-
| `GET /activities` | host | none | normal |
|
|
413
|
-
| `PUT /activities/{subscriptionId}/state` | host | `{registrationId,topic,event:"update",envelope}` | normal |
|
|
414
|
-
| `PUT /activities/{subscriptionId}/end` | host | `{registrationId,topic,event:"end",envelope}` | recovery |
|
|
415
|
-
| `PUT /widget-device` | phone | `{registrationId,token,environment}` | normal |
|
|
416
|
-
| `DELETE /widget-device/{registrationId}` | phone | none | recovery |
|
|
417
|
-
|
|
418
|
-
Tokens are even-length hex,1–256 bytes, normalized lowercase. Environment is
|
|
419
|
-
`sandbox|production`; provider configuration must match. The activity `topic`
|
|
420
|
-
is the existing pair-key HMAC `presenceTopic(rootKey,pairId,agentId)` (32 bytes,
|
|
421
|
-
base64url), not an APNs topic or plaintext agent identity. At most8 live
|
|
422
|
-
subscriptions are admitted per pair. GET returns
|
|
423
|
-
`{ok:true,subscriptions:[{id,registrationId,topic,interest,expiresAt}]}`.
|
|
424
|
-
PUT registration returns the same single row as `{ok:true,subscription:...}`.
|
|
425
|
-
Registration replacement uses a fresh registrationId; different bytes under
|
|
426
|
-
the same registrationId conflict. Native renewal must preserve the ActivityKit
|
|
427
|
-
activity's original8-hour ceiling. DELETE removes queued state immediately.
|
|
428
|
-
Retired subscription/registration IDs share a bounded1000-entry token-free guard
|
|
429
|
-
pool with widget registrations. Delayed registration PUTs cannot resurrect or
|
|
430
|
-
roll back retired identities. Widget DELETE is registration-exact; activity DELETE targets the subscription.
|
|
431
|
-
Activity guards retain the original8h ceiling and widget guards the original24h
|
|
432
|
-
expiry, without retry extension. Unknown DELETEs also reserve bounded guards;
|
|
433
|
-
capacity exhaustion fails closed, never evicts live protection.
|
|
434
|
-
|
|
435
|
-
The encrypted `interest` uses additive channel `activityInterest`, envelope.id
|
|
436
|
-
equal to subscriptionId, lifetime at most8h. Exact plaintext:
|
|
437
|
-
`{version:1,subscriptionId,daemonServerId,agentId}`. The companion authenticates
|
|
438
|
-
the envelope, pinned daemon, exact subscription and derived topic before any
|
|
439
|
-
read-only task lookup. This plaintext cannot authorize commands. No timeline
|
|
440
|
-
or chat download is required. Existing snapshot cadence (at least30s) admits
|
|
441
|
-
one bounded interest pass, at most8 exact fallback reads outside the recent list.
|
|
442
|
-
The owned optional lane has a2s deadline,250ms SDK reads and request cancellation.
|
|
443
|
-
Commands/control never await it; drain aborts/joins before SDK/journal close. Missing tasks never imply finish.
|
|
444
|
-
|
|
445
|
-
Activity state uses additive channel `activityState`, fresh envelope UUID and
|
|
446
|
-
at most600s lifetime, capped by subscription expiry. Exact plaintext:
|
|
447
|
-
`{version:1,subscriptionId,daemonServerId,agentId,title,hostName,phase,startedAt,measuredAt,expiresAt,requiresAttention,isTerminal}`.
|
|
448
|
-
Title/hostName are limited to160/80 characters. Phase is
|
|
449
|
-
`running|waiting|finished|error|idle`; permission attention maps to waiting;
|
|
450
|
-
official closed/error or current terminal attention maps to end. A running
|
|
451
|
-
turn supersedes an old terminal attention flag. startedAt is nullable, from
|
|
452
|
-
official activeTurn.startedAt or lastUserMessageAt, never a measurement
|
|
453
|
-
substitute. measuredAt/expiresAt exactly match envelope headers in milliseconds.
|
|
454
|
-
Existing encrypted snapshots also include optional lastUserMessageAt,
|
|
455
|
-
activeTurnStartedAt and bounded cwd per task. Encrypted usage adds genuine
|
|
456
|
-
provider displayName and window/balance label (at most128 characters each),
|
|
457
|
-
preserving absent values as unavailable. No full chats, invented labels or
|
|
458
|
-
synthetic percentages are added.
|
|
459
|
-
|
|
460
|
-
HKDF salt, AES-GCM nonce/tag framing, metadata AAD and existing channels remain
|
|
461
|
-
byte-compatible. Only the new channel name changes HKDF info. Activity state
|
|
462
|
-
serialized envelope is at most3000 UTF-8 bytes. Native ContentState has default
|
|
463
|
-
Codable field `payload`, a canonical JSON string of that envelope (key order
|
|
464
|
-
version,pairId,id,channel,issuedAt,expiresAt,nonce,ciphertext).
|
|
465
|
-
Updates derive directly from real semantic task transitions, independently of
|
|
466
|
-
alert admission/presence suppression. Unchanged measurements normally do not push.
|
|
467
|
-
Acknowledged nonterminal state renews from fresh samples every8minutes (120s before600s expiry).
|
|
468
|
-
Unknown admissions retain identical ciphertext until expiry; semantic changes can supersede progress. Disconnected state expires.
|
|
469
|
-
|
|
470
|
-
Live authenticated interests are cached against the current pair key/daemon. Terminal work precedes optional normal discovery, once per fresh
|
|
471
|
-
snapshot, without GET/state admission; authenticated404/409 invalidates its cache.
|
|
472
|
-
Only exact429 `daily_work_limit`, `x-moremote-budget:normal` and consistent future
|
|
473
|
-
`x-moremote-reset`/Retry-After pauses normal work alone. Missing/malformed hints,
|
|
474
|
-
outages, disable or recovery exhaustion preserve origin-wide pause/cycle fences.
|
|
475
|
-
Recovery still requires server admission; hints never grant operation authority.
|
|
476
|
-
|
|
477
|
-
APNs uses `apns-push-type:liveactivity`, configured main topic plus
|
|
478
|
-
`.push-type.liveactivity`, priority5 update/10 end, collapse-id subscriptionId,
|
|
479
|
-
apns-id envelope.id, expiration floor(expiresAt/1000). Body is
|
|
480
|
-
`{aps:{timestamp,event,"content-state":{payload},"stale-date"}}`; all APNs dates
|
|
481
|
-
are epoch seconds. End additionally sets dismissal-date. There is no apns-event
|
|
482
|
-
header. A512-byte static-attributes reserve and the complete4096-byte provider
|
|
483
|
-
payload limit both apply. End and invalid-token retirement compare the exact
|
|
484
|
-
current registration identity; stale provider failures never remove replacement
|
|
485
|
-
tokens. Provider admission is not proof of rendering.
|
|
486
|
-
|
|
487
|
-
Existing `PUT /state` accepts strict legacy `{envelope}` or additive
|
|
488
|
-
`{envelope,widgetFingerprint}`. GET state remains unchanged. The new fingerprint
|
|
489
|
-
is a pair-keyed HMAC using the presence domain over JSON
|
|
490
|
-
`["widgetSnapshot",meaningfulProjection]`. Projection includes bounded sorted
|
|
491
|
-
task identity/title/status/attention/latest turn/project plus usage values;
|
|
492
|
-
measurement and usage fetchedAt clocks are excluded. Only a changed opaque
|
|
493
|
-
fingerprint for the current widget registration queues a coalesced push.
|
|
494
|
-
Legacy envelope-only publications do not cause widget pushes.
|
|
495
|
-
|
|
496
|
-
Widget registration expires after24h and requires foreground/token renewal
|
|
497
|
-
(native renewal around12h uses a fresh registration ID).
|
|
498
|
-
Native uses the WidgetKit token, not an alert or activity token. Explicit
|
|
499
|
-
`APNS_WIDGET_TOPIC` is the widget extension bundle ID plus `.push-type.widgets`;
|
|
500
|
-
it is never derived from the main app topic. APNs uses push-type widgets,
|
|
501
|
-
priority5 and `{aps:{"content-changed":true}}`, no private identifiers.
|
|
502
|
-
WidgetKit automatically reloads timelines opportunistically on receipt;
|
|
503
|
-
WidgetPushHandler observes token/configuration updates. Timeline providers use
|
|
504
|
-
the existing sealed snapshot and its expiry; reload is not realtime delivery.
|
|
505
|
-
See Apple's [WidgetKit push documentation](https://developer.apple.com/documentation/widgetkit/updating-widgets-with-widgetkit-push-notifications).
|
|
506
|
-
|
|
507
|
-
Activity/widget work shares bounded provider attempts and background batches
|
|
508
|
-
with alerts; no recursive requests, unbounded retries, recovery-budget borrowing
|
|
509
|
-
for progress or changes to endpoint retirement/receipt/updater lifecycle.
|
|
510
|
-
|
|
511
|
-
Every APNs sender requires a synchronous `BeforeSend = () => boolean` fence
|
|
512
|
-
after asynchronous JWT signing and immediately before transport. The durable
|
|
513
|
-
caller rechecks service enabled, active pair, exact current registration and
|
|
514
|
-
publication, and expiry. Signing shares the original10s attempt deadline;
|
|
515
|
-
late signing cannot start transport. Global budgets and kill deadline are unchanged.
|
|
516
|
-
Physical Live Activity/widget behavior and live APNs/cloud delivery for this
|
|
517
|
-
delta remain pending; provider200 never establishes device delivery.
|
|
404
|
+
### Retired system-surface routes
|
|
405
|
+
|
|
406
|
+
Authenticated `/pairs/{pairId}/activities` and descendants, and
|
|
407
|
+
`/pairs/{pairId}/widget-device` and descendants, return `410 surface_removed`.
|
|
408
|
+
No registrations, tokens, interests, states, replay guards or provider queues for
|
|
409
|
+
these features remain. Durable Object initialization purges legacy surface rows;
|
|
410
|
+
notification device, attention, operation and control records remain intact.
|
|
411
|
+
Widgets and local ActivityKit read/update through the official Paseo path and
|
|
412
|
+
shared device state, independently of this notification service.
|
package/package.json
CHANGED
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxuli/moremote",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Optional encrypted notification and scoped-action companion for Paseo",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"repository": {
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/moxuli/moremote-cli.git"
|
|
10
|
+
},
|
|
8
11
|
"homepage": "https://github.com/moxuli/moremote-cli#readme",
|
|
9
|
-
"bugs": {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/moxuli/moremote-cli/issues"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"registry": "https://registry.npmjs.org"
|
|
18
|
+
},
|
|
19
|
+
"moremote": {
|
|
20
|
+
"updateProtocol": 1,
|
|
21
|
+
"journalSchema": 1,
|
|
22
|
+
"wireProtocol": 1,
|
|
23
|
+
"localEnrollment": 1,
|
|
24
|
+
"configBytes": 524288
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"bin",
|
|
28
|
+
"dist",
|
|
29
|
+
"docs",
|
|
30
|
+
"vectors",
|
|
31
|
+
"licenses",
|
|
32
|
+
"LICENSE",
|
|
33
|
+
"NOTICE",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
13
36
|
"engines": {
|
|
14
37
|
"node": ">=24.13.0 <25"
|
|
15
38
|
},
|
package/dist/activity.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { type Envelope } from './crypto.js';
|
|
2
|
-
import type { Pair } from './config.js';
|
|
3
|
-
import { type CloudClient } from './cloud-client.js';
|
|
4
|
-
export interface ActivityTask {
|
|
5
|
-
agentId: string;
|
|
6
|
-
title: string | null;
|
|
7
|
-
status: string;
|
|
8
|
-
updatedAt: string;
|
|
9
|
-
requiresAttention: boolean;
|
|
10
|
-
attentionReason: string | null;
|
|
11
|
-
provider?: string;
|
|
12
|
-
createdAt?: string | null;
|
|
13
|
-
lastUserMessageAt?: string | null;
|
|
14
|
-
activeTurnStartedAt?: string | null;
|
|
15
|
-
cwd?: string | null;
|
|
16
|
-
pendingRequests?: readonly {
|
|
17
|
-
requestId: string;
|
|
18
|
-
}[];
|
|
19
|
-
}
|
|
20
|
-
export interface ActivitySnapshot {
|
|
21
|
-
daemonServerId: string;
|
|
22
|
-
hostName: string;
|
|
23
|
-
measuredAt: number;
|
|
24
|
-
tasks: readonly ActivityTask[];
|
|
25
|
-
usage: unknown;
|
|
26
|
-
}
|
|
27
|
-
export interface ActivitySubscription {
|
|
28
|
-
id: string;
|
|
29
|
-
registrationId: string;
|
|
30
|
-
topic: string;
|
|
31
|
-
interest: Envelope;
|
|
32
|
-
expiresAt: number;
|
|
33
|
-
}
|
|
34
|
-
export interface ActivityState {
|
|
35
|
-
version: 1;
|
|
36
|
-
subscriptionId: string;
|
|
37
|
-
daemonServerId: string;
|
|
38
|
-
agentId: string;
|
|
39
|
-
title: string;
|
|
40
|
-
hostName: string;
|
|
41
|
-
phase: 'running' | 'waiting' | 'finished' | 'error' | 'idle';
|
|
42
|
-
startedAt: number | null;
|
|
43
|
-
measuredAt: number;
|
|
44
|
-
expiresAt: number;
|
|
45
|
-
requiresAttention: boolean;
|
|
46
|
-
isTerminal: boolean;
|
|
47
|
-
}
|
|
48
|
-
type ActivityCloud = Pick<CloudClient, 'activities' | 'activityState'>;
|
|
49
|
-
export interface ActivityPassOptions {
|
|
50
|
-
signal?: AbortSignal;
|
|
51
|
-
terminalOnly?: boolean;
|
|
52
|
-
}
|
|
53
|
-
/** Do not make absence from a bounded recent-task list a terminal event. */
|
|
54
|
-
export declare function taskActivityState(snapshot: ActivitySnapshot, task: ActivityTask, subscriptionId: string, expiresAt: number): ActivityState;
|
|
55
|
-
/** Keyed opaque equality token; no raw task, usage, or title enters cloud metadata. */
|
|
56
|
-
export declare function widgetFingerprint(pair: Pick<Pair, 'pairId' | 'rootKey'>, snapshot: ActivitySnapshot): Promise<string>;
|
|
57
|
-
export declare function openActivityInterest(pair: Pick<Pair, 'pairId' | 'rootKey'>, value: unknown, daemonServerId: string, now: number): Promise<ActivitySubscription & {
|
|
58
|
-
agentId: string;
|
|
59
|
-
}>;
|
|
60
|
-
/** One bounded pass on the existing snapshot cadence. Never sends official mutations.
|
|
61
|
-
* Lost acknowledgements retry the same ciphertext; no alert/presence precondition.
|
|
62
|
-
*/
|
|
63
|
-
export declare class ActivityPublisher {
|
|
64
|
-
private pairs;
|
|
65
|
-
retain(pairIds: readonly string[]): void;
|
|
66
|
-
publish(pair: Pair, cloud: ActivityCloud, snapshot: ActivitySnapshot, now?: number, readTask?: (agentId: string, signal?: AbortSignal) => Promise<ActivityTask | null>, options?: ActivityPassOptions): Promise<void>;
|
|
67
|
-
}
|
|
68
|
-
/** One owned optional lane, independent of the critical command/control loop.
|
|
69
|
-
* Network requests receive cancellation; SDK fallback reads have a 250ms timeout.
|
|
70
|
-
* close joins the real work rather than abandoning a raced promise.
|
|
71
|
-
*/
|
|
72
|
-
export declare class ActivityWorkLane {
|
|
73
|
-
private running;
|
|
74
|
-
private controller;
|
|
75
|
-
private closed;
|
|
76
|
-
start(work: (signal: AbortSignal) => Promise<void>, onError: (error: unknown) => void, parentSignal?: AbortSignal): boolean;
|
|
77
|
-
close(): Promise<void>;
|
|
78
|
-
}
|
|
79
|
-
export {};
|