feat(fls): import installed programs and their settings

importProject carries a host's installed programs into the model with
the settings Swift keeps (web server port, Gnutella peer limit, DNS
recursion and forwarder, personal firewall) and two it does not (the echo
server's port, the generic client's target), plus Java's "switched on".
The Swift oracle writes programs and settings; they match on the 13 files
Swift reads completely.

Intended differences, named in the test:
- every FILIUS program is kept; Swift drops command prompt, text
  editor, file explorer, image viewer, echo server and generic client;
- a web server's files stay in /webserver, its document root; Swift
  moves them to /www. No program state goes into a host's files.
- multicast_server.fls: maxTeilnehmerZahl refers to a shared Integer
  (a button's icon text gap, 4); Swift falls back to 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 06:12:15 +00:00
co-authored by Claude Opus 5.5
parent 8080e7dcb2
commit c3fe56ab16
6 changed files with 800 additions and 92 deletions
+50
View File
@@ -149,6 +149,56 @@ export interface RemoteLinkConfiguration {
export const DEFAULT_REMOTE_LINK_LATENCY_MILLISECONDS = 20;
// ── Installed programs (Java installierteAnwendungen) ──────────────────────
/** Swift's TopologyRuntimeInstallableProgram. */
export type InstallableProgram =
| 'commandPrompt'
| 'fileExplorer'
| 'imageViewer'
| 'textEditor'
| 'webServer'
| 'webBrowser'
| 'echoServer'
| 'simpleClient'
| 'dnsServer'
| 'dhcpServer'
| 'firewall'
| 'emailClient'
| 'emailServer'
| 'gnutella';
export interface WebServerConfiguration {
readonly port: number;
/** Where the served files are: Java keeps them in /webserver, Swift moves them to /www. */
readonly documentRoot: string;
}
export const DEFAULT_WEB_SERVER_PORT = 80;
export interface GnutellaConfiguration {
readonly maximumKnownPeers: number;
}
/** The DNS records follow with the hosts file (Java's /dns/hosts). */
export interface DnsServerConfiguration {
readonly recursiveResolutionEnabled: boolean;
readonly forwardingServerIPAddress?: string;
}
/**
* Java's echo server (ServerBaustein) and generic client (ClientBaustein)
* keep their port and target in the file; Swift asks for them at run time.
*/
export interface EchoServerConfiguration {
readonly port: number;
}
export interface SimpleClientConfiguration {
readonly targetAddress: string;
readonly targetPort: number;
}
// ── Firewall (Java filius.software.firewall.Firewall, FirewallRule) ─────────
export const FIREWALL_PROTOCOL = { all: -1, icmp: 1, tcp: 6, udp: 17 } as const;