@intentic/machine 1.344.0 → 1.345.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 (185) hide show
  1. package/README.md +91 -25
  2. package/dist/autostart/autostart.d.ts +0 -1
  3. package/dist/autostart/autostart.d.ts.map +1 -1
  4. package/dist/autostart/autostart.js +3 -9
  5. package/dist/autostart/autostart.js.map +1 -1
  6. package/dist/commands.d.ts.map +1 -1
  7. package/dist/commands.js +4 -21
  8. package/dist/commands.js.map +1 -1
  9. package/dist/device/commands.d.ts +2 -1
  10. package/dist/device/commands.d.ts.map +1 -1
  11. package/dist/device/commands.js +4 -2
  12. package/dist/device/commands.js.map +1 -1
  13. package/dist/device/connection.d.ts.map +1 -1
  14. package/dist/device/connection.js +27 -9
  15. package/dist/device/connection.js.map +1 -1
  16. package/dist/device/grant.d.ts +242 -0
  17. package/dist/device/grant.d.ts.map +1 -1
  18. package/dist/device/mcp.d.ts.map +1 -1
  19. package/dist/device/mcp.js +25 -8
  20. package/dist/device/mcp.js.map +1 -1
  21. package/dist/device/router.d.ts +467 -225
  22. package/dist/device/router.d.ts.map +1 -1
  23. package/dist/device/router.js +18 -10
  24. package/dist/device/router.js.map +1 -1
  25. package/dist/device/sandbox-rounds/keeper.d.ts +4 -1
  26. package/dist/device/sandbox-rounds/keeper.d.ts.map +1 -1
  27. package/dist/device/sandbox-rounds/keeper.js +12 -6
  28. package/dist/device/sandbox-rounds/keeper.js.map +1 -1
  29. package/dist/device/sandbox-rounds/sleep.d.ts +15 -2
  30. package/dist/device/sandbox-rounds/sleep.d.ts.map +1 -1
  31. package/dist/device/sandbox-rounds/sleep.js +68 -13
  32. package/dist/device/sandbox-rounds/sleep.js.map +1 -1
  33. package/dist/device/tools/agent.d.ts +15 -0
  34. package/dist/device/tools/agent.d.ts.map +1 -1
  35. package/dist/device/tools/agent.js +75 -19
  36. package/dist/device/tools/agent.js.map +1 -1
  37. package/dist/device/tools/android.d.ts +1 -1
  38. package/dist/device/tools/android.d.ts.map +1 -1
  39. package/dist/device/tools/android.js +17 -8
  40. package/dist/device/tools/android.js.map +1 -1
  41. package/dist/device/tools/browser.d.ts.map +1 -1
  42. package/dist/device/tools/browser.js +3 -5
  43. package/dist/device/tools/browser.js.map +1 -1
  44. package/dist/device/tools/ic-binary.d.ts +1 -1
  45. package/dist/device/tools/ic-binary.d.ts.map +1 -1
  46. package/dist/device/tools/ic-binary.js +6 -4
  47. package/dist/device/tools/ic-binary.js.map +1 -1
  48. package/dist/device/tools/programs/app-wait-tools.d.ts +12 -0
  49. package/dist/device/tools/programs/app-wait-tools.d.ts.map +1 -0
  50. package/dist/device/tools/programs/app-wait-tools.js +60 -0
  51. package/dist/device/tools/programs/app-wait-tools.js.map +1 -0
  52. package/dist/device/tools/programs/app-wait.d.ts +19 -0
  53. package/dist/device/tools/programs/app-wait.d.ts.map +1 -0
  54. package/dist/device/tools/programs/app-wait.js +89 -0
  55. package/dist/device/tools/programs/app-wait.js.map +1 -0
  56. package/dist/device/tools/programs/file-changes.d.ts +2 -0
  57. package/dist/device/tools/programs/file-changes.d.ts.map +1 -0
  58. package/dist/device/tools/programs/file-changes.js +19 -0
  59. package/dist/device/tools/programs/file-changes.js.map +1 -0
  60. package/dist/device/tools/programs/programs.d.ts +12 -0
  61. package/dist/device/tools/programs/programs.d.ts.map +1 -1
  62. package/dist/device/tools/programs/programs.js +13 -12
  63. package/dist/device/tools/programs/programs.js.map +1 -1
  64. package/dist/device/tools/programs/stop-all.d.ts +10 -0
  65. package/dist/device/tools/programs/stop-all.d.ts.map +1 -0
  66. package/dist/device/tools/programs/stop-all.js +52 -0
  67. package/dist/device/tools/programs/stop-all.js.map +1 -0
  68. package/dist/device/tools/sandboxes.d.ts +1 -0
  69. package/dist/device/tools/sandboxes.d.ts.map +1 -1
  70. package/dist/device/tools/sandboxes.js +4 -1
  71. package/dist/device/tools/sandboxes.js.map +1 -1
  72. package/dist/device/tools/shell.d.ts +1 -1
  73. package/dist/device/tools/shell.d.ts.map +1 -1
  74. package/dist/install.d.ts +6 -0
  75. package/dist/install.d.ts.map +1 -1
  76. package/dist/install.js +7 -2
  77. package/dist/install.js.map +1 -1
  78. package/dist/keyring/app-commands.d.ts +15 -0
  79. package/dist/keyring/app-commands.d.ts.map +1 -0
  80. package/dist/keyring/app-commands.js +247 -0
  81. package/dist/keyring/app-commands.js.map +1 -0
  82. package/dist/keyring/commands.d.ts +1 -1
  83. package/dist/keyring/commands.d.ts.map +1 -1
  84. package/dist/keyring/commands.js +26 -32
  85. package/dist/keyring/commands.js.map +1 -1
  86. package/dist/keyring/git-helper.d.ts +8 -0
  87. package/dist/keyring/git-helper.d.ts.map +1 -0
  88. package/dist/keyring/git-helper.js +60 -0
  89. package/dist/keyring/git-helper.js.map +1 -0
  90. package/dist/keyring/keyring-status.d.ts +8 -1
  91. package/dist/keyring/keyring-status.d.ts.map +1 -1
  92. package/dist/keyring/keyring-status.js +39 -4
  93. package/dist/keyring/keyring-status.js.map +1 -1
  94. package/dist/keyring/native-host-install.d.ts +28 -0
  95. package/dist/keyring/native-host-install.d.ts.map +1 -0
  96. package/dist/keyring/native-host-install.js +99 -0
  97. package/dist/keyring/native-host-install.js.map +1 -0
  98. package/dist/keyring/relay.d.ts +5 -1
  99. package/dist/keyring/relay.d.ts.map +1 -1
  100. package/dist/keyring/relay.js +16 -0
  101. package/dist/keyring/relay.js.map +1 -1
  102. package/dist/keyring/sandbox-push.d.ts +4 -0
  103. package/dist/keyring/sandbox-push.d.ts.map +1 -0
  104. package/dist/keyring/sandbox-push.js +21 -0
  105. package/dist/keyring/sandbox-push.js.map +1 -0
  106. package/dist/keyring/service.d.ts +11 -5
  107. package/dist/keyring/service.d.ts.map +1 -1
  108. package/dist/keyring/service.js +34 -51
  109. package/dist/keyring/service.js.map +1 -1
  110. package/dist/resident/resident.d.ts +1 -0
  111. package/dist/resident/resident.d.ts.map +1 -1
  112. package/dist/resident/resident.js +9 -0
  113. package/dist/resident/resident.js.map +1 -1
  114. package/dist/sync/attach-commands.d.ts.map +1 -1
  115. package/dist/sync/attach-commands.js +2 -1
  116. package/dist/sync/attach-commands.js.map +1 -1
  117. package/dist/sync/binary/mutagen-binary.d.ts +4 -0
  118. package/dist/sync/binary/mutagen-binary.d.ts.map +1 -0
  119. package/dist/sync/binary/mutagen-binary.js +65 -0
  120. package/dist/sync/binary/mutagen-binary.js.map +1 -0
  121. package/dist/sync/commands.d.ts.map +1 -1
  122. package/dist/sync/commands.js +8 -2
  123. package/dist/sync/commands.js.map +1 -1
  124. package/dist/sync/forget-command.js +1 -1
  125. package/dist/sync/forget-command.js.map +1 -1
  126. package/dist/sync/gone-watch.d.ts +1 -0
  127. package/dist/sync/gone-watch.d.ts.map +1 -1
  128. package/dist/sync/gone-watch.js +20 -7
  129. package/dist/sync/gone-watch.js.map +1 -1
  130. package/dist/sync/low-disk.d.ts +2 -2
  131. package/dist/sync/low-disk.d.ts.map +1 -1
  132. package/dist/sync/low-disk.js +7 -14
  133. package/dist/sync/low-disk.js.map +1 -1
  134. package/dist/sync/mirror.d.ts +2 -0
  135. package/dist/sync/mirror.d.ts.map +1 -1
  136. package/dist/sync/mirror.js +15 -10
  137. package/dist/sync/mirror.js.map +1 -1
  138. package/dist/sync/mutagen-move.d.ts.map +1 -1
  139. package/dist/sync/mutagen-move.js +2 -1
  140. package/dist/sync/mutagen-move.js.map +1 -1
  141. package/dist/sync/mutagen.d.ts +6 -7
  142. package/dist/sync/mutagen.d.ts.map +1 -1
  143. package/dist/sync/mutagen.js +16 -83
  144. package/dist/sync/mutagen.js.map +1 -1
  145. package/dist/sync/project/project-commands.d.ts.map +1 -1
  146. package/dist/sync/project/project-commands.js +2 -1
  147. package/dist/sync/project/project-commands.js.map +1 -1
  148. package/dist/sync/project/project-delivery.d.ts.map +1 -1
  149. package/dist/sync/project/project-delivery.js +2 -1
  150. package/dist/sync/project/project-delivery.js.map +1 -1
  151. package/dist/sync/report.d.ts.map +1 -1
  152. package/dist/sync/report.js +2 -1
  153. package/dist/sync/report.js.map +1 -1
  154. package/dist/sync/uninstall.d.ts.map +1 -1
  155. package/dist/sync/uninstall.js +3 -2
  156. package/dist/sync/uninstall.js.map +1 -1
  157. package/dist/uninstall/command.d.ts +3 -0
  158. package/dist/uninstall/command.d.ts.map +1 -0
  159. package/dist/uninstall/command.js +40 -0
  160. package/dist/uninstall/command.js.map +1 -0
  161. package/dist/uninstall/distros.d.ts +8 -0
  162. package/dist/uninstall/distros.d.ts.map +1 -0
  163. package/dist/uninstall/distros.js +103 -0
  164. package/dist/uninstall/distros.js.map +1 -0
  165. package/dist/uninstall/plan.d.ts +23 -0
  166. package/dist/uninstall/plan.d.ts.map +1 -0
  167. package/dist/uninstall/plan.js +71 -0
  168. package/dist/uninstall/plan.js.map +1 -0
  169. package/dist/uninstall/purge.d.ts +3 -0
  170. package/dist/uninstall/purge.d.ts.map +1 -0
  171. package/dist/uninstall/purge.js +79 -0
  172. package/dist/uninstall/purge.js.map +1 -0
  173. package/dist/uninstall/steps.d.ts +12 -0
  174. package/dist/uninstall/steps.d.ts.map +1 -0
  175. package/dist/uninstall/steps.js +200 -0
  176. package/dist/uninstall/steps.js.map +1 -0
  177. package/dist/uninstall/sweep.d.ts +12 -0
  178. package/dist/uninstall/sweep.d.ts.map +1 -0
  179. package/dist/uninstall/sweep.js +90 -0
  180. package/dist/uninstall/sweep.js.map +1 -0
  181. package/dist/uninstall/tally.d.ts +14 -0
  182. package/dist/uninstall/tally.d.ts.map +1 -0
  183. package/dist/uninstall/tally.js +25 -0
  184. package/dist/uninstall/tally.js.map +1 -0
  185. package/package.json +9 -9
package/README.md CHANGED
@@ -175,7 +175,8 @@ flowchart LR
175
175
  restarted more often than hourly never paused a dead sandbox's sessions). A sandbox that no longer exists is another
176
176
  matter: see [Sandboxes that are gone](#sandboxes-that-are-gone). `sync uninstall` ends every session and forward of
177
177
  this agent's and stops its Mutagen daemon, which serves this agent alone (below), starting it first if it was down so
178
- every session is really ended; the synced folders keep their files. `sync uninstall --folders` (what the desktop app's
178
+ every session is really ended; the synced folders keep their files. It runs the agent's own Mutagen in `bin/` and
179
+ downloads none: without that copy the session steps are skipped (2026-10-18). `sync uninstall --folders` (what the desktop app's
179
180
  uninstaller runs) unpairs only the pairings that sync a folder here: mirror-only pairings and the projects host keep
180
181
  their ports and their enrollments.
181
182
  - Symbolic links travel only where the device can create them ([`sync/symlinks.ts`](src/sync/symlinks.ts)). A
@@ -646,7 +647,12 @@ whose it is.
646
647
  id in it (what ic names one from its connect token), so the mapping is exact. Its sessions are paused through the
647
648
  cutover and the first quarter hour of probation, and past that while the sandbox does not answer, then resumed; a
648
649
  pause somebody made is left alone. Only this environment's records count: a distro syncing a sandbox the Windows side
649
- swaps is not paused.
650
+ swaps is not paused. (2026-10-19) Every resume the agent makes (after a swap, an outage, a gone verdict, a full
651
+ drive, and `sync resume`) goes one session per call, awaited, and is checked by listing the sessions afterwards
652
+ ([`sync/mutagen.ts`](src/sync/mutagen.ts) `resumeSessions`). A pause's mark stays until that check passes, and the
653
+ next pass tries again. Before this, one `mutagen sync resume` over both sessions stopped at the first that could not
654
+ reach a sandbox still coming up. It also ran blocking, which froze the transport it connects through. Its exit code
655
+ was taken as the answer, so after a rebuild one session was often left paused with no mark to lift it.
650
656
  - (2026-10-15) **Nothing downloaded replaces a binary until the release vouches for it**
651
657
  ([`release-verify.ts`](src/release/release-verify.ts)). Before an upgrade runs the new agent (and the Windows launcher
652
658
  beside it), before ic is put in place ([`tools/ic-binary.ts`](src/device/tools/ic-binary.ts)), and before setup
@@ -766,10 +772,19 @@ The keeper now puts an unneeded sandbox to sleep and wakes it when somebody open
766
772
  - **Wake.** The platform never calls a machine. A browser that finds the sandbox asleep asks the platform to wake it,
767
773
  and this agent's wake round asks the platform for such requests (`ic sandbox wakes --json --source agent`, one request
768
774
  for every sleeper on this side, each under its own report key), starting each one asked for through `ic sandbox
769
- start`. It asks every fifteen seconds while anything sleeps, and every five minutes otherwise, to catch a sleep made
770
- by hand. It runs whatever the keeper's switch says, so a sandbox asleep when the keeper was switched off still wakes.
775
+ start`. While anything sleeps the ask is held (2026-10-19): `--wait 25` has the platform answer the moment somebody
776
+ asks for a wake, or after 25 s, and the next ask follows at once, so a wake no longer waits up to fifteen seconds for
777
+ the next poll. An ic or a platform from before the held ask is asked every fifteen seconds as before; an ic that
778
+ refuses the flag (clap's exit 2, no JSON) is asked again at once without it, and plainly for an hour. With nothing
779
+ asleep it asks every five minutes, to catch a sleep made by hand. It runs whatever the keeper's switch says, so a
780
+ sandbox asleep when the keeper was switched off still wakes.
771
781
  The desktop app on the same computer runs the same command the moment its workspace page has asked
772
782
  (`--source app`, the app's `sandbox_wakes.rs`), so a sandbox opened there need not wait for this round.
783
+ - **The link comes back with it** (2026-10-19). A sleep leaves this agent's link to the sandbox on its dial ladder,
784
+ which after twenty failures rests a quarter of an hour between tries: on rog a sandbox woken at 16:48 had its device
785
+ tools back at 17:12. Each start is acted on as ic prints it, and every link naming the slug is dialled at once and put
786
+ back on the ladder's first rung (peer-dial's `retryNow`); so is a sandbox somebody else woke, once ic counts nothing
787
+ asleep or the keeper's next listing shows it running.
773
788
  - **The setting** is this environment's `sandboxSleepMinutes` in `machine.json`: absent means 30, `0` means never. Set
774
789
  it with `intentic-machine sandbox sleep-after <minutes|off>` and read it with `sleep-after status`. One sandbox can
775
790
  be kept awake from its own editor instead (Overview, "Sleep when unused", settings `sleepWhenUnused`, 2026-10-18):
@@ -869,16 +884,28 @@ version, file time) and the `IC_*`/`INTENTIC_*` variables in the agent's environ
869
884
 
870
885
  ### The keyring
871
886
 
872
- [intentic-keyring](../keyring) is a process of its own beside this agent (2026-10-16): the agent installs it, keeps
873
- it running and relays to it, and holds no vault key and no value. `intentic-machine keyring setup` puts the
874
- `intentic-keyring` asset of this agent's own release into `bin/` (checked against the release's signed `SHA256SUMS`, as
875
- the launcher is; a from-source agent copies `_devices/keyring/dist-bin`'s build instead), makes `intentic-askpass` a
876
- hard link beside it, registers a login entry of its own (`keyring`, `IntenticKeyring` on Windows, running
877
- `intentic-keyring serve`), starts it, and sets up the vault with a passphrase typed twice without echo (or once on
878
- stdin with `--passphrase-stdin`), plus Windows Hello where there is one unless `--no-hello`. Nothing in the agent's
879
- own upgrade, its `bin/` sweep or its rollback touches the keyring's files: it moves to a new release only through
880
- `keyring upgrade`, which downloads and checks the new binary, asks the running keyring (which asks the person), and only
881
- then swaps it, keeping `.previous` and putting it back if the new one does not answer.
887
+ [intentic-keyring](../keyring), the vault behind Passwords, is a process of its own beside this agent (2026-10-16):
888
+ the agent installs it, keeps it running and relays to it, and holds no vault key and no value. Since 2026-10-19 it has
889
+ one mode, the protected service: the vault is held by a system account of its own (`LOCAL SERVICE` from a startup task
890
+ on Windows, the `intentic-keyring` user from the systemd unit `intentic-keyring@<uid>` on Linux), and what starts at
891
+ sign-in is its session helper. `intentic-machine keyring setup` puts the `intentic-keyring` asset of this agent's own
892
+ release into `bin/` (checked against the release's signed `SHA256SUMS`, as the launcher is; a from-source agent copies
893
+ `_devices/keyring/dist-bin`'s build instead), makes `intentic-askpass` a hard link beside it, asks for an
894
+ administrator's yes once (UAC on Windows, `pkexec` on Linux) to run `intentic-keyring service install`, registers the
895
+ helper's login entry (`keyring`, `IntenticKeyring` on Windows, running `intentic-keyring session`), starts it, and sets
896
+ up the vault: it generates a recovery key (six groups of five Crockford base32 characters, 150 bits), sends it as the
897
+ setup op's `passphrase`, and prints it once; it is never stored. Windows Hello is enrolled through the helper unless
898
+ `--no-hello`; on Linux the daily unlock is a polkit yes. Without the administrator's yes setup stops with `declined`
899
+ and "Passwords needs an administrator's approval once…", having changed nothing; on macOS, or a Linux without
900
+ systemd, polkit or setfacl, it stops with `unavailable` before installing anything. A computer still on the per-user
901
+ keyring from before (`intentic-keyring serve`, retired) is moved by `setup` or `upgrade`: the old keyring is stopped,
902
+ `service install` carries `~/.intentic/keyring/vault.json` and its files into the service's folder, and the login entry
903
+ becomes the helper's. Its old passphrase still opens it where the recovery key would.
904
+
905
+ Nothing in the agent's own upgrade, its `bin/` sweep or its rollback touches the keyring's files: it moves to a new
906
+ release only through `keyring upgrade`, which downloads and checks the new binary, asks the running keyring (which asks
907
+ the person), and only then swaps it, keeping `.previous` and putting it back if the new one does not answer; the new
908
+ binary's `service install` then runs as an administrator, so the service's own copy follows.
882
909
 
883
910
  - **Relayed for the sandbox** ([`keyring/relay.ts`](src/keyring/relay.ts)): the contract's `keyring*` procedures go
884
911
  to the keyring's pipe and back, with the sandbox named from the link the call came in on (`shares`, `copies`) and an
@@ -890,12 +917,9 @@ then swaps it, keeping `.previous` and putting it back if the new one does not a
890
917
  1.5 s, the answer kept for 30 s ([`keyring/feature.ts`](src/keyring/feature.ts)).
891
918
  - **Marked**: what `run_command` and `app_start` start carries `INTENTIC_AGENT_COMMAND=1`, for the keyring's record
892
919
  and prompts. A hint, not a boundary: the agent's command can unset it.
893
- - **Hardened** (Windows, `keyring harden`): the plain keyring is stopped and its login entry removed first, so the
894
- vault the service takes is the last one written; then one UAC prompt runs `intentic-keyring service install`, which
895
- moves the vault under the startup task that runs the keyring as `LOCAL SERVICE` (the keyring's README says how), and
896
- the login entry becomes `intentic-keyring session`. Hardened mode is read from the marker the install writes for this
897
- user (`%ProgramData%\Intentic\Keyring\<SID>.hardened`). `keyring upgrade` on a hardened keyring also runs the new
898
- binary's `service install`, elevated, so the service's own copy follows.
920
+ - **Installed** is read from the marker `service install` writes for this user, which every user may read:
921
+ `%ProgramData%\Intentic\Keyring\<SID>.hardened` on Windows (named from when the service was an optional "hardened
922
+ mode"), `/var/lib/intentic-keyring/<uid>.installed` on Linux ([`keyring/service.ts`](src/keyring/service.ts)).
899
923
  - `status` and `doctor` show one keyring row (not installed, not running, not set up, locked or unlocked), and
900
924
  `status --json` and `doctor --json` carry it as `keyring: { installed, running, setUp, locked?, unlockedUntil?, version? }`.
901
925
 
@@ -906,8 +930,8 @@ it reaches the pipe.
906
930
 
907
931
  | Command | Success output |
908
932
  |---|---|
909
- | `keyring setup [--passphrase-stdin] [--no-hello]` | `{ "ok": true, "path", "askpass": { "installed", "path"? }, "autostart", "setUp": true, "alreadySetUp", "state"? }` |
910
- | `keyring status` | `{ "ok": true, "installed", "running", "setUp", "state"?, "askpass": { "installed", "path"? }, "hardened" }` |
933
+ | `keyring setup [--no-hello]` | `{ "ok": true, "path", "askpass": { "installed", "path"? }, "autostart", "setUp": true, "alreadySetUp", "recoveryKey"?, "state"? }` (`recoveryKey` only when this run made the vault) |
934
+ | `keyring status` | `{ "ok": true, "installed", "running", "setUp", "state"?, "askpass": { "installed", "path"? }, "support": { "canSetUp", "why"?, "hello", "platform" } }` |
911
935
  | `keyring unlock [--minutes N]` / `keyring lock` | `{ "ok": true, "unlockedUntil" }` / `{ "ok": true }` |
912
936
  | `keyring list` | `{ "ok": true, "entries": [EntryInfo], "backends" }` |
913
937
  | `keyring add NAME [--stdin] [rules] [--backend B --ref R [--field F] [--attribute A]] [--replace]` | `{ "ok": true, "name" }` |
@@ -919,8 +943,7 @@ it reaches the pipe.
919
943
  | `keyring askpass install\|uninstall\|status` | `{ "ok": true, "installed", "path"?, "variables", "file"?, "profile"? }` |
920
944
  | `keyring sync status` | `{ "ok": true, "sync": { "key", "peers", "revision" } }` |
921
945
  | `keyring upgrade` | `{ "ok": true, "upgraded", "from", "to" }` |
922
- | `keyring harden` (Windows) | `{ "ok": true, "service": "IntenticKeyring", "autostart" }` |
923
- | `keyring uninstall` | `{ "ok": true, "removed", "vault", "hardened" }` |
946
+ | `keyring uninstall` | `{ "ok": true, "removed", "vault", "service" }` |
924
947
 
925
948
  The rule flags are `--kind password|text`, `--program P`, `--package P`, `--host H`, `--askpass M` (each repeatable;
926
949
  on `edit` a list flag replaces the whole list, and a lone `""` empties it), `--username U`, `--remember-minutes N`, and
@@ -928,11 +951,54 @@ on `edit` a list flag replaces the whole list, and a lone `""` empties it), `--u
928
951
  value. `askpass install` sets `SSH_ASKPASS`, `SSH_ASKPASS_REQUIRE=prefer`, `SUDO_ASKPASS` and `GIT_ASKPASS` for the
929
952
  user: through `[Environment]::SetEnvironmentVariable` on Windows, and on Linux and macOS in
930
953
  `~/.config/environment.d/intentic-askpass.conf`, printing the `export` lines a shell profile needs. `keyring
931
- uninstall` keeps the vault in `~/.intentic/keyring`.
954
+ uninstall` removes the service (an administrator's yes) and puts the vault back in `~/.intentic/keyring`, where it
955
+ stays; set up again, the same recovery key opens it.
956
+
957
+ ### Uninstall
958
+
959
+ `intentic-machine uninstall [--purge] [--delete-data]` ([`src/uninstall/`](src/uninstall/)). `ic uninstall` is the one
960
+ orchestrator of a whole-device uninstall and runs `--purge` here; the agent's own command is the same removal for a
961
+ person who runs it alone, and either way it never downloads anything.
962
+
963
+ - **No flag**: every sandbox link, every sync pairing and the login entry go, as they always have. The agent goes even
964
+ from a device that hosts sandboxes; on Windows it keeps running while WSL distros are attached, to keep them running.
965
+ - **`--purge`**: everything of the agent leaves this environment, in this order:
966
+ 1. On Windows, each WSL distro in `machine.json` is purged through its own agent (`wsl.exe`, five minutes at most
967
+ each; an agent older than `--purge` takes the plain uninstall, and the warning says how to finish), and the list
968
+ is emptied, so nothing is left for the Windows side's agent to keep running for.
969
+ 2. On Linux and macOS the binary is renamed to `bin/intentic-machine.uninstalling` before anything stops the agent.
970
+ The Windows side restarts a stopped distro agent a second later through a script that exits 64 when the binary is
971
+ missing, and then drops that distro from its list, so a purged distro does not come back.
972
+ 3. The programs sandboxes started with `app_start` are stopped, from every sandbox's `runs/<sandbox>/apps.json`.
973
+ 4. The plain uninstall runs (links, pairings, the login entry). Mutagen is the agent's own copy in `bin/` or none: a
974
+ missing copy skips the session steps instead of downloading one.
975
+ 5. Windows' start before sign-in is removed (Windows asks for permission), and the resident agent is stopped with its
976
+ login entry whatever it still served.
977
+ 6. The agent's Mutagen daemon is stopped and the ssh include removed, in case the sync step stopped early.
978
+ 7. The keyring goes with askpass (`keyring uninstall`). Its protected service needs an administrator's yes. If it is
979
+ declined, the service stays, and so do `bin/` and the PATH entry, so the purge can be run again to finish it.
980
+ 8. What the agents before this one left goes: the `intentic-host` and `intentic-sync-mirror` login entries,
981
+ `~/.intentic/host` and `~/.intentic/sync`, their `~/.local/bin` links, and the `intentic-link-watch` timer.
982
+ 9. The PATH entry goes: `bin` out of the per-user PATH on Windows (`removeFromWindowsPathValue`, written back under
983
+ the value's own kind), and the `~/.local/bin/intentic-machine` link where it points into `bin`.
984
+ 10. Lingering is turned off only where the agent turned it on. local-agent writes `linger-enabled` beside the agent's
985
+ log the one time `loginctl enable-linger` changes it from off to on. Lingering the user had already stays.
986
+ 11. The files go: `~/.intentic/machine` and `~/.intentic/keyring` except the person's data, then each folder once
987
+ empty, and `~/.intentic` once nothing is left in it. Everything else under `~/.intentic` is ic's and is never
988
+ touched. On Windows the running agent is moved to `%TEMP%` first, and a hidden PowerShell removes what was still
989
+ in use once this process has exited.
990
+ - **The data that stays** without `--delete-data`: the keyring's `vault.json`, `keys.json` and `audit.jsonl*`;
991
+ `machine/restore`; `machine/audit.jsonl*`; and in `machine/trash` the folders `trash_file` made for files a sandbox
992
+ moved aside on this device (named for the moment alone; the upkeep's own trash entries go). The narration says what
993
+ stayed and why.
994
+ - **`--delete-data`** implies `--purge` and removes the data too.
995
+ - A step that does not finish is a warning with the command that finishes it by hand (`fix:` on its own line), and the
996
+ verdict counts them. The run fails, exit 1, only when the agent is still running or its files could not be removed.
932
997
 
933
998
  ## Key files
934
999
 
935
1000
  - [src/commands.ts](src/commands.ts) — the CLI: `device`, `sync`, `keyring`, `sandbox`, `run`, `status`, `doctor`, `upgrade`, `updates`, `uninstall`.
1001
+ - [src/uninstall/purge.ts](src/uninstall/purge.ts) — `uninstall --purge`: the steps in `steps.ts`, the distros in `distros.ts`, the files in `sweep.ts`, every decision pure in `plan.ts`.
936
1002
  - [src/resident/resident.ts](src/resident/resident.ts) — the resident process that holds links, pairings and WSL distros; `supervision.ts` beside it starts and stops it through whatever restarts this environment's agent.
937
1003
  - [src/device/mcp.ts](src/device/mcp.ts) — every tool a sandbox can call on this device.
938
1004
  - [src/device/policy.ts](src/device/policy.ts) — scope checks and the file-root boundary.
@@ -1,5 +1,4 @@
1
1
  import type { AutostartSpec } from "@intentic/local-agent";
2
2
  export declare const MACHINE_AUTOSTART: AutostartSpec;
3
3
  export declare const KEYRING_AUTOSTART: AutostartSpec;
4
- export declare const KEYRING_SESSION_AUTOSTART: AutostartSpec;
5
4
  //# sourceMappingURL=autostart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autostart.d.ts","sourceRoot":"","sources":["../../src/autostart/autostart.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,eAAO,MAAM,iBAAiB,EAAE,aAc/B,CAAC;AAOF,eAAO,MAAM,iBAAiB,EAAE,aAW/B,CAAC;AAIF,eAAO,MAAM,yBAAyB,EAAE,aAKvC,CAAC"}
1
+ {"version":3,"file":"autostart.d.ts","sourceRoot":"","sources":["../../src/autostart/autostart.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,eAAO,MAAM,iBAAiB,EAAE,aAc/B,CAAC;AASF,eAAO,MAAM,iBAAiB,EAAE,aAW/B,CAAC"}
@@ -16,18 +16,12 @@ const keyringLog = keyringPaths().log;
16
16
  export const KEYRING_AUTOSTART = {
17
17
  id: "keyring",
18
18
  windowsRunValue: "IntenticKeyring",
19
- desktopName: "Intentic Keyring",
20
- desktopComment: "The password vault on this computer: types and hands over secrets for your intentic sandboxes, at your word",
19
+ desktopName: "Intentic Passwords",
20
+ desktopComment: "Passwords on this computer: its prompts and typing on this desktop, for the protected service that holds the vault",
21
21
  logPath: keyringLog,
22
22
  launchAgent: { label: "dev.intentic.keyring" },
23
- detachedArgs: ["serve"],
24
- foregroundArgs: ["serve"],
25
- failureNote: (reason) => `Couldn't register the keyring to start at login (${reason}); it runs until this computer restarts, and \`intentic-machine keyring setup\` starts it again. Its log is ${keyringLog}.`,
26
- };
27
- export const KEYRING_SESSION_AUTOSTART = {
28
- ...KEYRING_AUTOSTART,
29
- desktopComment: "The intentic keyring's prompts and typing on this desktop, for the IntenticKeyring service that holds the vault",
30
23
  detachedArgs: ["session"],
31
24
  foregroundArgs: ["session"],
25
+ failureNote: (reason) => `Couldn't register Passwords to start at login (${reason}); it runs until this computer restarts, and \`intentic-machine keyring setup\` starts it again. Its log is ${keyringLog}.`,
32
26
  };
33
27
  //# sourceMappingURL=autostart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"autostart.js","sourceRoot":"","sources":["../../src/autostart/autostart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,CAAC,MAAM,iBAAiB,GAAkB;IAC5C,EAAE,EAAE,kBAAkB;IACtB,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,wBAAwB;IACrC,cAAc,EAAE,yFAAyF;IAEzG,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE;IAC9C,YAAY,EAAE,CAAC,KAAK,CAAC;IACrB,cAAc,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC;IAEvC,gBAAgB,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,kBAAkB,CAAC;IAC7D,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CACpB,4DAA4D,MAAM,iGAAiG,UAAU,GAAG;CACvL,CAAC;AAKF,MAAM,UAAU,GAAG,YAAY,EAAE,CAAC,GAAG,CAAC;AAEtC,MAAM,CAAC,MAAM,iBAAiB,GAAkB;IAC5C,EAAE,EAAE,SAAS;IACb,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,kBAAkB;IAC/B,cAAc,EAAE,6GAA6G;IAC7H,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,EAAE,KAAK,EAAE,sBAAsB,EA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EAAE,KAAK,EAAE,sBAAsB,EAAE;IAC9C,YAAY,EAAE,CAAC,SAAS,CAAC;IACzB,cAAc,EAAE,CAAC,SAAS,CAAC;IAC3B,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CACpB,kDAAkD,MAAM,+GAA+G,UAAU,GAAG;CAC3L,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AA0JnE,eAAO,MAAM,QAAQ,kDA4BnB,CAAC"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAsInE,eAAO,MAAM,QAAQ,kDA4BnB,CAAC"}
package/dist/commands.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { explain } from "@intentic/local-agent";
2
2
  import { buildRouteMap } from "@stricli/core";
3
- import { beforeSignInCommand, retireBeforeSignIn } from "./autostart/before-sign-in.js";
3
+ import { beforeSignInCommand } from "./autostart/before-sign-in.js";
4
4
  import { buildCommand, machineUi } from "./cli-ui.js";
5
5
  import { runLogPath } from "./config.js";
6
- import { deviceCommands, deviceUninstall } from "./device/commands.js";
6
+ import { deviceCommands } from "./device/commands.js";
7
7
  import { sandboxRoutes } from "./device/sandbox-cli.js";
8
8
  import { environmentRoutes, updates } from "./environments/commands.js";
9
9
  import { keyringCommands } from "./keyring/commands.js";
@@ -11,7 +11,8 @@ import { realMachineIo, upgradeMachine } from "./environments/machine-upgrade.js
11
11
  import { runForeground } from "./resident/resident.js";
12
12
  import { readResident, restartResident, stopResident } from "./resident/supervision.js";
13
13
  import { status } from "./status.js";
14
- import { syncCommands, syncUninstall } from "./sync/commands.js";
14
+ import { syncCommands } from "./sync/commands.js";
15
+ import { uninstall } from "./uninstall/command.js";
15
16
  import { doctor } from "./upkeep/doctor.js";
16
17
  import { upgradeLanded, upgradeStop } from "./upgrade.js";
17
18
  import { MACHINE_VERSION } from "./version.js";
@@ -94,24 +95,6 @@ const upgradeEnded = (ui, ending) => {
94
95
  const stop = upgradeStop(ending.outcome);
95
96
  throw new Error(explain(stop.headline, stop.problem, stop.fix));
96
97
  };
97
- const uninstall = buildCommand({
98
- docs: { brief: "Remove this environment's agent: every sandbox link, every sync pairing, the login entry" },
99
- parameters: {},
100
- async func() {
101
- const ui = machineUi(this.process);
102
- ui.act("Removing the agent from this device");
103
- ui.note(await syncUninstall(ui, undefined, { forGood: true }));
104
- ui.note(await deviceUninstall(ui, undefined, { forGood: true }));
105
- await retireBeforeSignIn(ui.note);
106
- const still = await readResident();
107
- if (still === undefined) {
108
- ui.done("Removed the agent. Nothing intentic stays running on this device.");
109
- return;
110
- }
111
- ui.note("Run the uninstall inside each of this device's WSL distros to remove it entirely.");
112
- ui.done(`Removed this side's links. The agent keeps running (pid ${still.pid}) only to keep this device's WSL distros running.`);
113
- },
114
- });
115
98
  export const commands = buildRouteMap({
116
99
  routes: {
117
100
  device: buildRouteMap({
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAW,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAuB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACx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ClB,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,EAAE,KAAK,EAAE,kEAAkE,EAAE;SACtF,CAAC;QACF,IAAI,EAAE,aAAa,CAAC;YAChB,MAAM,EAAE,YAAY;YACpB,IAAI,EAAE,EAAE,KAAK,EAAE,6EAA6E,EAAE;SACjG,CAAC;QAGF,OAAO,EAAE,aAAa,CAAC;YACnB,MAAM,EAAE,eAAe;YACvB,IAAI,EAAE,EAAE,KAAK,EAAE,yGAAyG,EAAE;SAC7H,CAAC;QACF,OAAO,EAAE,aAAa;QACtB,WAAW,EAAE,iBAAiB;QAC9B,GAAG;QACH,gBAAgB,EAAE,mBAAmB;QACrC,MAAM;QACN,MAAM;QACN,OAAO;QACP,OAAO;QACP,OAAO;QACP,SAAS;KACZ;IACD,IAAI,EAAE,EAAE,KAAK,EAAE,kEAAkE,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE;CACxH,CAAC,CAAC"}
@@ -6,8 +6,9 @@ export declare const enroll: (sandboxUrl: string, pairToken: string, say?: Log)
6
6
  token: string;
7
7
  }>;
8
8
  export declare const linkNamed: (urls: readonly string[], value: string) => string;
9
- export declare const deviceUninstall: (say: Narration, sandbox?: string, { forGood }?: {
9
+ export declare const deviceUninstall: (say: Narration, sandbox?: string, { forGood, recordStays }?: {
10
10
  readonly forGood?: boolean;
11
+ readonly recordStays?: boolean;
11
12
  }) => Promise<string>;
12
13
  export declare const dropUnreachableLinks: (ui: Ui) => Promise<void>;
13
14
  export declare const deviceCommands: {
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/device/commands.ts"],"names":[],"mappings":"AAGA,OAAO,EAAW,KAAK,GAAG,EAAiB,KAAK,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAA2B,KAAK,SAAS,EAAgB,MAAM,cAAc,CAAC;AAUrF,eAAO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,EAAE,KAAG,OAAO,CAAC,IAAI,CA2B/D,CAAC;AAEF,eAAO,MAAM,cAAc;;;;CAAgE,CAAC"}
@@ -104,7 +104,7 @@ export const linkNamed = (urls, value) => {
104
104
  }
105
105
  return holding[0] ?? value;
106
106
  };
107
- export const deviceUninstall = async (say, sandbox, { forGood = false } = {}) => {
107
+ export const deviceUninstall = async (say, sandbox, { forGood = false, recordStays = true } = {}) => {
108
108
  const only = sandbox === undefined || sandbox === "" ? undefined : linkNamed((await readLinks()).map((link) => link.sandboxUrl), sandbox);
109
109
  const dropped = await removeLinks(only);
110
110
  const left = await readLinks();
@@ -123,7 +123,9 @@ export const deviceUninstall = async (say, sandbox, { forGood = false } = {}) =>
123
123
  if (dropped.length > 0) {
124
124
  say.note("Each sandbox still lists this device until it is removed there; its access is already gone.");
125
125
  }
126
- say.note(`Your record of what this agent did stays at ${auditPath}.`);
126
+ if (recordStays) {
127
+ say.note(`Your record of what this agent did stays at ${auditPath}.`);
128
+ }
127
129
  return dropped.length === 0 ? "Nothing was connected. Removed any leftovers." : `Disconnected from ${urls}.`;
128
130
  };
129
131
  const forgetUnreachable = buildCommand({
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/device/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAoC,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAEhG,OAAO,EAAE,YAAY,EAAE,SAAS,EAAkB,YAAY,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CA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MAAM,MAAM,KAClB,QAkFF,CAAC"}
@@ -48,11 +48,7 @@ export const probesFirst = (attempt) => attempt > GONE_PROBE_AFTER_ATTEMPTS;
48
48
  const loopbackUrls = new Set();
49
49
  export const reachedOverLoopback = loopbackUrls;
50
50
  const forgetLink = async (sandboxUrl) => void (await removeLinks(sandboxUrl));
51
- export const connect = (config, version, log, dial = realDial, forget = forgetLink, indicator = machineIndicator(), goneStore = fileGoneStore, now = Date.now) => {
52
- const linkLog = (message) => log(`${config.sandboxUrl}: ${message}`);
53
- let scopes = config.scopes;
54
- let held;
55
- let linkBase;
51
+ const goneWatch = (config, dial, forget, goneStore, now, linkLog) => {
56
52
  let attempts = 0;
57
53
  let goneSince = config.goneSince;
58
54
  const whileGone = async (signal) => {
@@ -84,6 +80,22 @@ export const connect = (config, version, log, dial = realDial, forget = forgetLi
84
80
  linkLog(`the platform says this sandbox no longer exists, so this link stops dialling it after ${attempts - 1} failed attempts. It is asked again every hour, and forgotten on ${untilUtcDay} unless it answers; connecting again from the sandbox restores it before then.`);
85
81
  await goneStore.mark(config, goneSince).catch((error) => linkLog(`could not record that it is gone (${errorMessage(error)})`));
86
82
  };
83
+ return {
84
+ beforeDial: async (signal) => {
85
+ await askEdgeFirst();
86
+ return await whileGone(signal);
87
+ },
88
+ forgive: () => {
89
+ attempts = 0;
90
+ },
91
+ };
92
+ };
93
+ export const connect = (config, version, log, dial = realDial, forget = forgetLink, indicator = machineIndicator(), goneStore = fileGoneStore, now = Date.now) => {
94
+ const linkLog = (message) => log(`${config.sandboxUrl}: ${message}`);
95
+ let scopes = config.scopes;
96
+ let held;
97
+ let linkBase;
98
+ const gone = goneWatch(config, dial, forget, goneStore, now, linkLog);
87
99
  const handler = new RPCHandler(createHostRouter({
88
100
  sandboxUrl: config.sandboxUrl,
89
101
  scopes: () => scopes,
@@ -94,10 +106,9 @@ export const connect = (config, version, log, dial = realDial, forget = forgetLi
94
106
  log,
95
107
  linkBase: () => linkBase,
96
108
  }));
97
- return dialPeer({
109
+ const link = dialPeer({
98
110
  open: async (signal) => {
99
- await askEdgeFirst();
100
- if (!(await whileGone(signal))) {
111
+ if (!(await gone.beforeDial(signal))) {
101
112
  return undefined;
102
113
  }
103
114
  const { base, local } = await dial.resolveBase(config.sandboxUrl);
@@ -116,7 +127,7 @@ export const connect = (config, version, log, dial = realDial, forget = forgetLi
116
127
  hello: () => ({ type: "hello", token: config.token, version }),
117
128
  attach: (ws) => {
118
129
  held = ws;
119
- attempts = 0;
130
+ gone.forgive();
120
131
  ws.addEventListener("close", () => {
121
132
  if (held === ws) {
122
133
  indicator.release(config.sandboxUrl);
@@ -132,5 +143,12 @@ export const connect = (config, version, log, dial = realDial, forget = forgetLi
132
143
  void forget(config.sandboxUrl).catch((error) => linkLog(`could not drop the revoked link (${String(error)})`));
133
144
  },
134
145
  });
146
+ return {
147
+ ...link,
148
+ retryNow: () => {
149
+ gone.forgive();
150
+ link.retryNow();
151
+ },
152
+ };
135
153
  };
136
154
  //# sourceMappingURL=connection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection.js","sourceRoot":"","sources":["../../src/device/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AAE5G,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,EAAiB,MAAM,sCAAsC,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAmB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAiB,gBAAgB,EAAE,cAAc,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aA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