Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Docs/ASLM/content/docs/ASLM/Services/AslmApiServer.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Creates one host info object for the ASLM UI and web index.

#### `private static string BuildHostRouteKey(string hostKey)`

**Purpose:** Builds the public route key used for one port-map host.
**Purpose:** Builds the public route key used for one port-map host. Delegates to `PortRegistry.BuildHostRouteKey`.

---

Expand Down
6 changes: 6 additions & 0 deletions Docs/ASLM/content/docs/ASLM/Services/ModuleRunner.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ Implements **`IDisposable`**. Subscribes to **`PortRegistry.PortsRedistributed`*

---

#### `public IReadOnlyList<ModuleConfig> GetRunningModuleConfigs()`

**Purpose:** Returns the module configurations for instances that currently have tracked live processes. The returned configs are the same snapshots stored at process launch time.

---

#### `public IReadOnlyList<RunningModuleSnapshot> GetRunningModulesSnapshot()`

**Purpose:** Id, name, and source path for modules with live processes.
Expand Down
24 changes: 24 additions & 0 deletions Docs/ASLM/content/docs/ASLM/Services/PortRegistry.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,30 @@ Internal owners use id prefix **`__`**.

---

#### `public IReadOnlyDictionary<string, int>? TryGetAssignedPorts(string ownerId)`

**Purpose:** Returns a read-only copy of all assigned port keys for one owner, or `null` when no assignment exists. Does not allocate new ports.

---

#### `public string? TryGetModulePageUrl(ModuleConfig module)`

**Purpose:** Returns the loopback root URL for the primary WebView port of a module, or `null` when no assignment exists. Does not allocate new ports.

---

#### `public static string BuildLoopbackUrl(int port)`

**Purpose:** Builds a loopback root URL for the given port number.

---

#### `public static string BuildHostRouteKey(string hostKey)`

**Purpose:** Converts a port-map host key to the URL route segment used by the ASLM API mirror. Strips known suffixes (`-port`, `_port`, ` port`) from the key.

---

#### `public int? TryGetPort(string moduleId, string portKey = "port")`

**Purpose:** Lookup with fallback to **`http`**, then first assigned port.
Expand Down
Loading