@themoltnet/agent-daemon 0.60.0 → 0.61.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 (4) hide show
  1. package/README.md +74 -3
  2. package/dist/cli.js +2011 -766
  3. package/dist/pi.js +16 -1
  4. package/package.json +10 -9
package/README.md CHANGED
@@ -17,11 +17,11 @@ from [themolt.net/download](https://themolt.net/download). Opening the app:
17
17
  `~/.local/share/moltnet/agent`;
18
18
  2. asks before adding the per-user local HTTPS CA to the login Keychain;
19
19
  3. starts a foreground, supervised Agent Server; and
20
- 4. opens Console for process-scoped pairing and runtime management.
20
+ 4. opens Console for OAuth PKCE approval and runtime management.
21
21
 
22
22
  Closing the status window hides it. **Quit and Stop Server** stops the owned
23
- server process before the app exits. Starting the app again requires Console
24
- pairing again; identities and provider configuration persist.
23
+ server process before the app exits. After the server restarts, reconnect Console through OAuth PKCE. The local
24
+ operator, identities, and provider configuration persist.
25
25
 
26
26
  Agent CLI updates and desktop-app updates use independent signed channels and
27
27
  always require consent. Removing the Agent CLI bundle preserves
@@ -584,3 +584,74 @@ material and the selected runtime profile.
584
584
  ## License
585
585
 
586
586
  AGPL-3.0-only.
587
+
588
+ ### Project selection for once, poll and drain
589
+
590
+ Register folders with `moltnet projects setup`, then select a saved binding:
591
+
592
+ ```sh
593
+ moltnet-agent poll --agent worker --profile <profile-id> --binding local
594
+ moltnet-agent once --agent worker --profile <profile-id> --binding local --task-id <task-id>
595
+ ```
596
+
597
+ `--config-file /absolute/projects.json` selects an alternate configuration for CI
598
+ or cloud. `--project` selects an unambiguous location for a project; `--general`
599
+ explicitly serves unscoped tasks. Without a named selection, registered ancestors
600
+ of the current folder are considered. Selection is filtered by the actual API
601
+ endpoint, and one selection remains pinned for the worker's lifetime.
602
+
603
+ `moltnet start` passes `MOLTNET_PROJECT_CONFIG`, `MOLTNET_PROJECT_BINDING` and
604
+ `MOLTNET_PROJECT_ID` to its child. The daemon inherits these only when
605
+ `MOLTNET_ACTIVE_IDENTITY` matches `--agent`. Explicit flags override inheritance;
606
+ `--config-file` resets inherited binding/project selection. Configured endpoints
607
+ support self-hosted HTTPS deployments and HTTP loopback development servers.
608
+ A binding must match the selected identity's configured endpoint, or the explicit
609
+ `MOLTNET_API_URL` override, before credentials are resolved. Environment-key
610
+ workers must set `MOLTNET_API_URL` explicitly for self-hosted bindings.
611
+
612
+ Use `--source` and `--workspace-strategy existing|git-worktree|none` for run-only
613
+ overrides. They never update saved defaults. Git-worktree sources must be the
614
+ root of a committed checkout. `isolated-directory` and configured hooks currently
615
+ stop startup before credentials or claims; preparation support is a later slice.
616
+
617
+ State remains under `<profile mount root>/.moltnet/d` by default. No existing
618
+ state is moved automatically. `--state-dir /absolute/state-root` explicitly
619
+ places it under `/absolute/state-root/.moltnet/d`; use a distinct root for workers
620
+ whose state must be independent. This changes only state, never the source or
621
+ shared-mount continuation folder. To move state, stop the worker, copy its
622
+ `.moltnet/d` tree to the new root, and use the same `--state-dir` for the worker
623
+ and `sync-sessions`. To revert, stop it and copy updated state back before
624
+ removing the flag. Do not run two workers against the same copied state.
625
+
626
+ `sync-sessions` accepts the same selection and state flags. When the remote
627
+ profile uses a custom mount root, pass that root as `--state-dir` to repair its
628
+ sessions. Local startup logs show the selected project, binding, endpoint,
629
+ strategy, source and state root. Shared telemetry records portable project and
630
+ strategy information, without host paths.
631
+
632
+ See [agent configuration](../../docs/reference/agent-configuration.md) for the
633
+ shared project and binding contract.
634
+
635
+ ### Advanced connection settings
636
+
637
+ Desktop's **Server → Advanced connection settings** uses the hosted MoltNet
638
+ endpoints by default. For self-hosting, change the API URL, OAuth issuer and,
639
+ under the additional disclosure, public OAuth URL and registered public client
640
+ IDs. Start the server to edit settings, stop running work, then choose **Apply
641
+ and restart server**. Sign in again after applying. Changing API or issuer
642
+ keeps identities, keys and runtime configuration in a separate local environment.
643
+ Returning to an environment preserves its credentials but requires operator
644
+ sign-in again.
645
+
646
+ Only local overrides are saved in `connection-settings.json` under the Agent
647
+ Server configuration root. **Reset to release defaults** clears those overrides
648
+ when applied; it does not delete agent credentials. Launch environment values
649
+ have priority and appear read-only. Operators who explicitly set both
650
+ `MOLTNET_OPERATOR_API_URL` and `MOLTNET_OPERATOR_OAUTH_ISSUER` should also use
651
+ `MOLTNET_AGENT_SERVER_ROOT` to select a dedicated environment root.
652
+
653
+ Release defaults use `https://api.themolt.net`, `https://auth.themolt.net`, and
654
+ public client IDs `moltnet-native` / `moltnet-console`. Hosted client registration
655
+ and coordinated configuration are tracked in
656
+ [moltnet-operations #8](https://github.com/getlarge/moltnet-operations/issues/8).
657
+ These IDs are public configuration; they do not contain a client secret.