CimCity live contract (contract 1)
The request/response contract between the CimCity page and a live host. The desktop app is the only host. A PowerShell host, Start-CimCity.ps1, served the HTTP form of this contract until it was removed on November 17, 2026; the page and its tests (tests/live.py, which stubs /api/*) still speak the HTTP form, and this document keeps it for them: the token, Host and method checks, and the HTTP routes. Where a section says "the host" and describes a switch such as -TimeoutSec, that was the PowerShell host's; the app has no switches.
In the desktop app the API calls go over WebView2 messages instead of HTTP: the page posts {id, path} (path as below, e.g. /api/classes?ns=root%5Ccimv2) and gets back {id, status, body}, where body is what a 200 or problem+json response would carry. There is no token, Host or method check (the request never leaves the process, and only the app's own origin is answered), so bad_token, bad_host and method_not_allowed don't occur. /api/namespaces has host: "CimCity.Desktop" and no psVersion. The app has no switches: at startup it probes its default namespaces (root\cimv2, root\StandardCimv2, root\wmi, root\Microsoft\Windows\Storage, the Configuration Manager client's root\ccm\ClientSDK, root\ccm\Policy\Machine\ActualConfig and root\ccm\InvAgt, and root\dcim\sysman; one that doesn't answer, such as root\ccm on a machine with no client, or policy for a standard user, isn't listed) and, when root\SMS:SMS_ProviderLocation names a provider for the local site (ProviderForLocalSite = TRUE), adds root\SMS and root\SMS\site_<code> to the allowlist. With no SMS Provider on the machine, or no access to root\SMS, the allowlist is the default one.
It is small on purpose: a few allowlisted calls, no WQL passthrough, read-only except for the Services desk, which calls one method at a time only after the user unlocks it in the app. Every 200 body of a read is cimcity/1 data, the same format the exporter writes.
Starting a session
The desktop app starts live: at startup it probes its default namespaces and, when root\SMS:SMS_ProviderLocation names a provider for the local site (ProviderForLocalSite = TRUE), adds root\SMS and root\SMS\site_<code> to the allowlist, as the exporter does with -ConfigMgr. With no SMS Provider for a local site, or no access to root\SMS, the allowlist is the default one.
An account with no role in Configuration Manager is not denied on the SMS Provider machine: the provider answers it, most classes list with no residents (a few provider metadata classes, such as SMS_AdminRole and SMS_AvailableOperation, still have some), and a read by key is notfound. So the app serves the site, and sets siteRole: false in /api/namespaces when the account isn't in the local SMS Admins group, which the site adds every administrative user to.
In the HTTP form the host printed CimCity: http://localhost:<port>/learn/#k=<token>; the part after #k= was the session token, 64 hex characters, which the page moved into sessionStorage and cleaned out of the address bar.
Routes
Each route, whether it needs the token, and what it answers:
GET /learn/(no token): the CimCity page (text/html; charset=utf-8)GET /andGET /learn(no token): 302 to/learn/GET /api/namespaces(token): session info and namespace allowlistGET /api/classes?ns=<namespace>(token): one cimcity/1 namespace objectGET /api/instances?ns=<namespace>&class=<class>(token): count and residents for one class;&skip=<n>for a later page (capabilitypaging),&prop=<property>&value=<value>for the residents with that value (capabilityfilter)GET /api/instance?ns=<namespace>&class=<class>&key.<name>=<value>(token): one resident by key, with every property (capabilityinstance)GET /api/count?ns=<namespace>&class=<class>(token): count only, for one class (capabilitycount-route)GET /api/events?ns=<namespace>&class=<class>&since=<cursor>&modified=1(token): residents created, deleted or (withmodified=1) changed sincecursor(capabilityevents)GET /api/activity?watch=<ns>|<class>,...&schema=<ns>,...&spaces=1(token): how many residents arrived, left or changed in up to 6 classes, which classes were created or deleted in up to 2 namespaces, and which namespaces were created or deleted underroot, since the last answer (capabilityactivity)GET /api/traffic(token): live performance snapshot for the Traffic overlay (capabilitytraffic)GET /api/methods?ns=<namespace>&class=<class>(token): a class's methods and their parameters (capabilityinvoke)POST /api/unlock?on=1|0(token): unlock the Services desk for this session, after the user confirms in the app, or lock it (capabilityinvoke)POST /api/invoke?ns=<namespace>&class=<class>&method=<method>&key.<name>=<value>&in.<name>=<value>(token): call one method, only while unlocked and after the user says Yes in the app's dialog (capabilityinvoke)- Anything else (no token): 404
not_found(including/brand/*and/favicon.ico)
The token goes in the X-CimCity-Key header, never in the URL. Namespace names contain \, which you encode as %5C in the query string (ns=root%5Ccimv2). Lookups are case-insensitive. The query string is percent-encoded UTF-8 in both hosts, so a non-ASCII value is %C3%A9, not %E9.
GET /api/namespaces
{
"format": "cimcity/1",
"contract": 1,
"capabilities": ["counts", "count-route", "events", "activity", "instance", "paging", "filter", "invoke", "traffic"],
"hostVersion": "1.0.0+abc1234",
"psVersion": "5.1.26100.1",
"machine": "MYPC",
"timeoutSec": 5,
"maxInstances": 200,
"countLanes": 3,
"namespaces": [{ "name": "root\\cimv2" }, { "name": "root\\StandardCimv2" }]
}
contractis the contract version. It goes up only on a breaking change.hostVersionis the host's own version, for bug reports: the release version, then+and the first 7 characters of the commit it was built from when the build knows it (1.0.0+abc1234, or1.0.0). A page doesn't read meaning into it.capabilitieslists optional features the host supports. New capabilities are added here without bumpingcontract; a page ignores names it doesn't know.counts:/api/classesreturns realcfor the landmark classes (below) instead of-1.count-route:GET /api/countexists. The page uses it to count buildings in the background: the view first (nearest its middle), then outward until the whole city is counted. As many at once ascountLanessays (below); in the desktop app 6 at once (MI is thread-safe), and a count still out after 500 ms lets the next one start beside it, up to 6 more. None while a building is open. Event classes (below) and classes markedskipin the class list are never counted. Without it the page doesn't call/api/count.events:GET /api/eventsexists: residents created or deleted since a cursor, for the open building, and changed ones when the page asks withmodified=1(older hosts ignore it). The page re-reads/api/instanceson an arrival or departure, and updates a changed resident in place, its floor lit for 1.5 s. Only changes light a floor, by design: an arrival shows as a new resident after the re-read, a departure as one gone. Without it the page re-reads/api/instancesevery few seconds.activity:GET /api/activityexists. With Traffic on, the page asks which buildings near the middle of the view have news, and shows it (below). Without it the Traffic overlay is the performance snapshot only, as before.instance:GET /api/instanceexists. When a resident is opened, the page asks for it by key and shows every property. Without it the page shows the properties the list returned.paging:/api/instancestakesskip. The page offers Show more residents in a building with more residents than it shows. Without it the page shows the firstmaxInstancesonly.filter:/api/instancestakespropandvalue. The page offers rides from a resident to the residents that hold one of its IDs (a collection to itsSMS_FullCollectionMembershipresidents, a deployment'sTargetCollectionIDto itsSMS_Collection), and, when the session serves a site namespace too, from a client'sCCM_Application(root\ccm\ClientSDK) to the site'sSMS_Application(prop=CI_UniqueID,value=<Id>/<Revision>) and fromCCM_SoftwareUpdatetoSMS_SoftwareUpdate(value=<UpdateID>), on the ConfigMgr city. That ride is an ordinary filtered read of the site namespace: nothing in the host is new for it. Without it the page offers none. A page must not sendskip,proporvalueto a host that doesn't list the capability: such a host ignores them and answers with the first page of the whole class.traffic:GET /api/trafficexists. Without it the page keeps the Traffic toggle unavailable in live mode. A host offers it when the session servesroot\cimv2or a Configuration Manager site namespace (root\SMS\site_<code>), and the answer has sections only for the namespaces the session serves. When it isn't offered,GET /api/trafficanswers 404not_found.invoke: the Services desk exists:GET /api/methods,POST /api/unlockandPOST /api/invoke. Without it the page lists method names, read-only.unlocked: trueis present while the desk is unlocked.namespacesis the session allowlist: the namespaces that answered a probe at startup, with canonical names, and namespaces the host saw created while it ran (see/api/activity: only from the host's own WMI event, never from a request). Any othernsgets 400ns_not_allowed.- The names also choose the city, the same way an import does:
root\SMSand everything under it (the site namespaceroot\SMS\site_<code>) is the ConfigMgr city, and every other namespace is the Windows CIM city. A host that lists both kinds fills both cities in one session; a city with no namespaces keeps its sample or import. Nothing else in the contract is specific to Configuration Manager: classes, counts, residents, events, and errors work the same in a site namespace. timeoutSecandmaxInstancesecho the host's read timeout and resident limit, so the page can word its messages.countLanes(optional) is how many/api/countrequests the host answers at once: the page sends up to that many, and 1 when it is missing. The PowerShell host sentcountLanes: 3; the desktop app doesn't send it.siteRoleis present, andfalse, only when the session serves a site namespace and the account isn't in the local SMS Admins group (see Starting a session). The page then says on the ConfigMgr city that the account probably has no role. On every live ConfigMgr city the page says that it shows what the account's role, security scopes, and collections allow.
GET /api/classes?ns=
A cimcity/1 namespace object:
{
"name": "root\\cimv2",
"classes": [
{ "n": "Win32_Process", "s": "CIM_Process", "a": false, "as": false,
"p": [{ "n": "Handle", "t": "String", "k": true }], "m": ["Create", "Terminate"],
"c": 312, "i": [] }
]
}
- Classes have
n, s, a, as, p, mas in an export.iis always[]. - System classes (
__*) are left out, butsstill names a system superclass. The page uses that: a class whose lineage leaves the namespace at a system event class (smatching^__\w*Event$, e.g.__ExtrinsicEvent,__InstanceOperationEvent) is an event class (ETW traces and driver events inroot\wmi,Win32_ProcessStartTrace). Event instances are delivered, not stored, so the page shows these with no residents (c = 0) and never reads them. skip: true(optional) marks a class on the skip list by name or by provider (see skipped), other than abstract classes and associations. The page shows it as not read live and never asks for its count. A class without it may still answerskipped.cis-1(not counted), except inroot\cimv2for the landmark classes:Win32_Process,Win32_Service,Win32_LogicalDisk,Win32_NetworkAdapter,Win32_ProcessorandWin32_UserAccount(local accounts). Each landmark is counted up to-CountCapwithin-TimeoutSec; a failed count stays-1.- The class list is bounded by
-ClassTimeoutSecand cached for the session, so a reload or Retry is instant. The host also keeps which classes are abstract, associations, or served by a provider on the skip list (see skipped), so/api/count,/api/instances,/api/instanceand/api/eventsanswerskippedfor them without reading the class again (a class not in a served list is read once to check).
GET /api/count?ns=&class=
{ "c": 312, "cx": false }
- Only with
count-routeincapabilities. candcxexactly as/api/instanceswould return them, with the same rules (the skip list by name and by provider, abstract and association classesskipped, account classes filtered to local accounts, shallow, counted up to-CountCap). Noi.- The desktop app gives each of a count's two reads 5 s, which is fixed.
- Cheaper than
/api/instances: only key properties are asked for and nothing is converted. Errors are the same codes. - A count that fails with
notfound,unsupported,failedortimeoutis remembered for the session: asking again answers the same problem at once, without reading. (/api/instancesalways reads, so Retry in a building still works.)
GET /api/instances?ns=&class=
{ "c": 312, "cx": false, "i": [{ "Handle": "4", "Name": "System", "CommandLine": null }] }
cis the instance count up to-CountCap;cxistruewhen the count hit the cap.iis the first-MaxInstancesresidents, with the exporter's rules: the skip list, account classes filtered to local accounts, values flattened (dates as ISO 8601, long strings cut at 200 characters, arrays joined, 64-bit integers as text). A key property is never cut, so it can be sent back to/api/instance.- A 64-bit integer (SInt64 or UInt64) is a JSON string of digits, never a JSON number: a number above 2^53 is rounded by a browser, and Configuration Manager IDs such as
RecordIDare about 7.2e16. Send it back as it came, inkey.<name>orvalue. Smaller integers are JSON numbers. This holds for every resident the host sends (/api/instances,/api/instance,/api/events) and for the exporter.
Two optional parameters, each behind a capability:
- At the cap (
cx: true) the page says, on the last page, that only the firstcresidents can be shown. skip=<n>(capabilitypaging):iis the-MaxInstancesresidents after the firstn.nis a whole number from 0 to-CountCap; anything else is 400bad_param.candcxare as without it. The host reads the class again for each page and never reads past-CountCap, so residents beyond the cap can't be paged to, and a class on the skip list (SMS_StatusMessage) isn't read at all. The order is the provider's; the page drops a resident it already shows.prop=<property>&value=<value>(capabilityfilter): only the residents whosepropequalsvalue;ccounts those. The host builds the query itself (SELECT * FROM <class> WHERE <prop> = <literal>):propmust be a plain name (^[A-Za-z_][A-Za-z0-9_]*$) and a property of the class (matched without case; the host uses the class's own spelling) of type String or an integer (not Boolean: the SMS Provider refuses= TRUE), andvaluemust fit that type, be at most 1,000 characters and hold no control character (a line break, NUL, U+0085), else 400bad_param. An integer is an optional minus sign and 1 to 20 digits: no plus sign, spaces or exponent.propandvaluego together: one without the other, or either one empty, is 400bad_param. A string value is quoted with\and'escaped; nothing the page sends is used as WQL. A filtered read is a query, which reads subclasses too, so a class that has subclasses answers 422skipped: a parent must never reach a skip-list class. The two classes never read by key (see skipped) are never filtered either: 422skipped, in any letter case, without a read; nor is a class stopped for the session after a read answered0x00040004.skipworks with it.
GET /api/instance?ns=&class=&key.<name>=<value> (capability instance)
One resident, read by key (CIM GetInstance), with every property. A list from the SMS Provider leaves lazy properties empty (a collection's CollectionRules, an application's SDMPackageXML); this call fills them in, so they are read only when someone opens that resident.
{ "i": { "CollectionID": "SMS00001", "Name": "All Systems", "CollectionRules": "SMS_CollectionRuleQuery{RuleName=All Systems; QueryExpression=select * from sms_r_system; QueryID=1}" } }
- Send every key property of the class as
key.<name>=<value>(names matched without case). Keys must be String, Boolean, DateTime or integer properties (a DateTime key is sent as the ISO 8601 text of the list's value); a missing key, a value that doesn't fit its type or holds a control character, or a class with no keys or with a reference key is 400bad_param. ihas the same flattening as/api/instances, with wider limits: strings up to 1,000,000 characters, the first 50 items of a list, and embedded objects as text (Class{name=value; ...}).- Same validation as
/api/instances(bad_class,ns_not_allowed,skippedfor the skip list and for abstract and association classes). A key that matches no resident, or a provider answer whose String, Boolean or integer keys differ from the ones asked for, is 404notfound; in a site namespace that is also the answer for a resident the account's role doesn't show. - Two classes are never read by key and answer 422
skippedon this route only, in any letter case, without a read:SMS_SupportedPlatformsOfflineServicingandSMS_OSDeploymentKitSupportedPlatforms. Their lists and counts work; a filtered read of them (prop,valueon/api/instances) answersskippedtoo. The page shows the properties the list returned, with a note. A class whose read by key or filtered read answers0x00040004is treated the same way for the rest of the session (see skipped).
GET /api/events?ns=&class=&since=&modified=1 (capability events)
Tells the page when residents of the open building move in or out, so it re-reads /api/instances only then, and (with modified=1) when a resident's properties change, so it updates that resident in place.
{ "cursor": 42, "lost": false, "events": [{ "t": "created", "i": { "Name": "notepad.exe", "ProcessId": 1234 } },
{ "t": "modified", "i": { "Name": "notepad.exe", "ProcessId": 1234, "WorkingSetSize": "52469760" } }],
"modified": true }
- The first call for a class (no
since) subscribes toSELECT * FROM __InstanceOperationEvent WITHIN 2 WHERE TargetInstance ISA '<class>'(one WMI poll of the class every 2 s, whatevermodifiedsays; the host tells creations, deletions and modifications apart by the event's__CLASS) and answers, once WMI has started the subscription, with the currentcursorand no events. Send thatcursorback assincenext time. eventsare the residents created (t: "created") or deleted ("deleted") aftersince, oldest first;iis the resident with the same flattening as/api/instances. With nothing queued, the host waits at most 1 s before answering withevents: [].lost: truemeans the host can't say what happened sincesince(the subscription restarted, more than 500 events queued, modifications were turned off or back on, or another client already saw and dropped the events aftersince): re-read/api/instances.- Modifications. With
modified=1eventscan also holdt: "modified"(the subscription's__InstanceModificationEvents; without it the host drops them):iis the resident as it is now (itsTargetInstance, flattened like/api/instances), and the page finds the resident it replaces by its key properties. The previous values (PreviousInstance) are not sent: the page already has them. Any other value ofmodified, or none, is the behaviour above, so a page that doesn't knowmodifiedsees no change. Asking with a differentmodifiedthan the last request keeps the subscription and answerslostonce. A host that predates this ignores the parameter. - One per resident. A resident that changes again before the page asks since a later cursor is queued once, with its latest values (a new cursor number, so the page never misses it).
- Bounded. More than 100 modifications less than 1 s apart (one
WITHIN 2poll of a busy class such asWin32_Process) turns modifications off: the queued ones are dropped, the next answer islost: trueso the page re-reads once, and arrivals and departures go on. The host still counts them while they are off, and turns them back on after 60 s without another such burst, or at once when a client starts over (modified=1withoutsince, as the page does on entering the building). Back on answerslost: trueonce more, since changes made meanwhile weren't kept. A class that bursts on every poll (Win32_Processon most machines) stays off. The off state belongs to the subscription: a new one (another class, or the same after 30 s without a request) starts with modifications on. Since there is one subscription,denied,notfound,unsupported,failedandtimeout(below) mean the same with or withoutmodified. - Never for the two classes that are never read by key (
SMS_SupportedPlatformsOfflineServicing,SMS_OSDeploymentKitSupportedPlatforms, see/api/instanceabove): they get arrivals and departures only. Skipped classes get no events at all, as before. - Cost. WMI polls the open building's class every 2 s and keeps a copy of it to compare against, the same with or without
modified=1(hosts before this held three polls: creations, deletions, modifications). Modified residents of a busy class are sent to the host even while they're off or not asked for, and dropped there. Only the building the page has open is watched. - Says when they're off. An answer to a request with
modified=1hasmodified:truewhile modifications are watched,falsewhen they aren't (turned off as above, refused, or a class never read by key). The page then says in the building's info that changed residents aren't shown as they change. Hosts before this field leave it out, and the page says nothing. - There is one subscription per host, for the last class asked about, and one WMI subscription behind it. Asking about another class moves it: the old subscription is cancelled before the new one is made, and in the desktop app two asks that arrive together make one subscription, not two. It is dropped after 30 s without a request and when the host stops (Ctrl+C, closing the app window, the end of the self-test). A host that is killed can't cancel: WMI keeps polling for it until it notices the process has gone, which took up to about 20 s on one test machine; with a page watching
Win32_Processand counts running, the restarted host's subscriptions were refused ("Quota violation", "Call cancelled") for about 90 s, then worked by themselves. - How it subscribes. The desktop app (MI .NET
SubscribeAsync) asks WMI to report when the subscription has started (ReportOperationStarted) and waits for that or the refusal, at most 5 s. Events have their own CIM session, rather than the one background counts share: on a shared session, subscriptions started at once failed ("Call cancelled", "Quota violation") on classes such asWin32_ClassicCOMClass(5,000+ residents) andSMS_ComponentSummarizer. - One client per host. Events the client has seen (everything up to its
since) are dropped. A second client watching the same class getslost: trueif it asks since before what the first one dropped, and re-reads; a second client watching another class moves the subscription on every request, so both keep gettinglost: true. Use one page per host. - Same validation as
/api/instances(missing_param,bad_class,ns_not_allowed,skipped), and a subscription the provider refuses, or one that fails later, comes back asdenied,notfound,unsupported,failedortimeout. WMI refuses a subscription to a class the account can't read with "Access denied" or with "Call cancelled", by turns, so onfailedthe host reads one resident (keys only) and answersdeniedif that read is denied: a class that can't be read isdeniedevery time. - A refusal is remembered for 30 s. Asked about the same class (
nsandclass, anymodified) within 30 s, the host answers the same problem at once, without subscribing again, so no client can make WMI start a refused poll over and over. Before that, a subscription refused withfailed("Call cancelled", "Quota violation") is made once more after 500 ms: the refusal is often the subscription of a host that has just closed or been killed, which WMI still counts against the user for a moment. On a ConfigMgr lab site server every poll ofWin32_ClassicCOMClassansweredfailed"Quota violation" or "Call cancelled", and re-subscribing about every 1.5 s kept the CIMWin32WmiPrvSEat about 36% CPU. (WMI limits how much memory a user'sWITHINpolls may hold, in__ArbitratorConfiguration; a big class, or several hosts polling the same one, can reach it.) The page backs off too (below). - Without the capability, the page re-reads
/api/instancesevery 5 s while that building is open (backing off to 60 s on errors, paused while the tab is hidden). When this call answersfailedortimeoutfor a building, the page re-reads/api/instancesevery 5 s instead and asks for events again after 2 s, then 4, 8 and so on up to 60 s, until two answers in a row work; any other problem turns events off for that visit. Entering the building again starts over. While events don't work, the building's info says that its residents are read again every 5 s.
GET /api/activity?watch=&schema= (capability activity)
What changes in buildings nobody has open, and in the city's list of classes. /api/events watches the one open building and sends its residents; this route watches a few buildings and sends only numbers.
{ "since": 2.1, "watching": 5,
"rates": { "root\\cimv2|Win32_Process": { "c": 2, "d": 1, "m": 14 } },
"schema": [{ "ns": "root\\cimv2", "t": "created", "class": "Win32_Foo" }],
"spaces": [{ "ns": "root\\Foo", "t": "created" }],
"refused": { "root\\cimv2|Win32_Product": "skipped", "root\\cimv2|Win32_Service": "open" } }
spaces=1asks for namespace events: the host watchesrootwith one__NamespaceOperationEvent WITHIN 10subscription (counted apart fromschema, one at most). A refusal is inrefusedasspaces.watchis up to 6 entriesns|class, comma separated (nsasGET /api/namespaceslists it,|sent as%7C);schemais up to 2 namespaces. More than that, a malformed entry or a class name that isn't a class name is 400bad_param; a namespace that isn't listed is 400ns_not_allowed. Both are optional. Send each parameter once.- Each class in
watchgets one__InstanceOperationEvent WITHIN 5subscription, each namespace inschemaone__ClassOperationEvent WITHIN 10, all on one CIM session of their own, started one at a time. The route answers at once; a subscription counts from when WMI has started it. ratesholds, perns|classwith news since the last answer, the residents created (c), deleted (d) and modified (m). Counting never reads the event's resident, so a class that changes all the time costs one integer a change. A class with no news is left out. The counts are cleared as they are answered: one page per host, as for events.spaceslists namespaces created or deleted directly underroot(nsis the full name,tiscreatedordeleted), oldest first. The allowlist grows here and only here: when the host's own event saysroot\Namewas created, andNameis a plain name (a letter, then letters, digits and underscores, at most 64 characters), the namespace answers a read of__SystemClass, and it isn't in the list yet, the host adds it (at most 20 new ones in a session), and the page can read it with/api/classesat once. A deleted one leaves the list. A name the page sends never adds anything, and a namespace that was already there at startup never counts as new. Needs a user that may subscribe onroot: a refusal isrefused.spaces.schemalists classes created or deleted (t:created,deleted) in a watched namespace, oldest first, at most 100 held. System classes (__*) and skip-list classes are left out. The host forgets its cached class list, skip reasons and parents for that namespace, so/api/classesfor it shows the change; an event identical to the one before it is dropped, because WMI delivers each class event twice in the same instant; the page doesn't read it again and shows the news as it comes (below).- Budget. When more than 6 classes (or 2 namespaces) are asked for over time, the least recently asked go, never one asked for in the same request. Everything stops after 30 s without a request, and when the host stops. At most 9 subscriptions are ever alive (6 classes, 2 namespaces for class events, 1 watch on
root), and none after the host stops; the desktop self-test checks the first 8 and that none are left. refusednames, byns|class, what the host did not subscribe to:skipped(the skip list, MSIProv, abstract or association classes),open(the class the open building watches through/api/events: two polls of one class are what failed with Quota violation), or a CIM problem code from the same list as/api/events(denied,notfound,failed, and so on; afailedis remembered for 30 s like an events refusal).- What the page does. With Traffic on, every Traffic reading is followed by one request here: the 6 buildings nearest the middle of the view that aren't empty, skipped, abstract, associations, event classes or open (those with news first), and their 2 nearest namespaces. A building with news in
ratesglows amber for 4 s on the canvas (the red glow stays for heavy load). With Life on and motion not reduced, a person walks to the door for each arrival and from it for each departure (up to 3 each, 8 on the map at once, none while the map moves or the tab is hidden). **A class inschema** takes a lot at once (below): the page reads/api/classesfor the namespace (the host forgot its cached list, so the new class is in it), a crew drives out of the region's yard, the building goes up in six stages as a frame under a crane, a few people move in, and the crew drives back; the count then comes through the normal queue. A class that goes is boarded up and demolished 30 s later; its lot stays empty. **A namespace inspaces** becomes a town: the page reads its classes, places it in free ground inland (nearest the middle of the region, clear of every town, above the coast), lays a road to the nearest town and raises its buildings; a namespace that goes boards its whole town up. Each is said in the live region. Reduced motion, Life off, a hidden tab or a map that is moving: the end state at once. - Where a new building stands. The layout reserves spare lots, 15% more than the classes of an estate and at least 3, shown as parks. Crews start from the region's one construction yard, on open ground apart from every town. A class takes a free spare lot of its own estate (its base-class family, event quarter or feature area, else the neighbour by name), else of the nearest estate of its town that has one. When every spare lot has a building, the buildings in a lot are made smaller, a quarter of the lot each, so up to four share it. A town with no room left says so, and the class has its lot when the city next loads. No building that was in the layout ever moves, and neither does a town, the coast or the woods.
- One crew per burst. A burst of 6 or more arrivals in one answer sends one delivery van, and a building that had a van lately gets none for 20 s; at most 2 crews and vans are out at once. A class that changes all the time (
Win32_Process) shows as amber and at most 3 people per answer, never a crew per event. After arrivals the page counts that building again (once a 20 s), and a tower that has grown gets its new floors one at a time under a crane. - Without a host.
?demo=storyon the sample city plays made-up events through the same code (anddemo.create,demo.arrive,demo.removeanddemo.towndo it from a test);tests/story.pydrives it. - The map layers stay
aria-hidden. A building inrefusedis not asked again in this visit; a 404not_foundstops the asking.
GET /api/traffic (capability traffic)
The page asks again only after each reply, waiting 2 s between replies by default. ?traffic=<seconds> (1 to 60) in the page URL's query, before the #k= fragment (/learn/?traffic=5#k=<token>), changes the wait.
The export's perf snapshot, read now: one read each of Win32_PerfFormattedData_PerfOS_Processor (_Total), Win32_PerfFormattedData_PerfProc_Process, Win32_PerfFormattedData_PerfDisk_LogicalDisk, Win32_PerfFormattedData_Tcpip_NetworkInterface and Win32_OperatingSystem, all in root\cimv2. No parameters, no method calls.
{ "perf": {
"Win32_Processor": { "metric": "CPU %", "load": 64, "top": [] },
"Win32_Process": { "metric": "CPU %", "load": 64, "top": [{ "name": "msedge#3", "pid": 4120, "value": 41.2 }] },
"Win32_LogicalDisk": { "metric": "Disk time %", "load": 22, "top": [{ "name": "C:", "value": 22 }] },
"Win32_NetworkAdapter": { "metric": "Bandwidth %", "load": 7, "top": [{ "name": "Intel[R] Wi-Fi 6 AX201 160MHz", "value": 7 }] },
"Win32_PhysicalMemory": { "metric": "Memory used %", "load": 71, "top": [], "used": 24394530816, "total": 34359738368 }
} }
- The machine as a whole is two entries: CPU is
Win32_Processor.load(all cores), and memory isWin32_PhysicalMemory, whoseusedandtotalare bytes (TotalVisibleMemorySizelessFreePhysicalMemory, andTotalVisibleMemorySize, from the sameWin32_OperatingSystemread; WMI gives KB).usedandtotalare optional: an older export or host leaves them out, and the page then says the percentage alone. The page shows these as the Weather in the Traffic legend: the sky over the map from CPU (clear, cloud from 20%, smog from 50%, a storm at 90% two readings running), a water tower that empties as memory fills, and the same in words ("Smog: CPU 82%, memory 71% used (22.7 of 32.0 GB)"), which the side panel says too. It is set when a reading lands, never per frame, says nothing aloud, and Weather in the legend turns the sky off.
- Keys are class names, as in an export (see the guide's import format). A key can also be
<namespace>|<class>; the page matches that form first, in whichever live city is showing.loadis 0-100 and tints the building: 20+ warm, 50+ hot, and a hot building's street glows too. Win32_Process.topis every process using CPU, busiest first, up to 50.valueis its share of all cores, andpidis itsProcessId, which the page matches to residents. Othertopentries match residents by name.- Formatted counters are a delta since the previous read, so the first answer can be all zeros. A
root\cimv2section the host can't read is left out, soperfcan be{}(a site entry it can't read says why; see below). - The entries above are the
root\cimv2section, sent only when the session servesroot\cimv2. For each Configuration Manager site namespace the session serves there are up to two more, keyed<namespace>|<class>as an export with-ConfigMgrwrites them: root\SMS\site_<code>|SMS_DeploymentSummary: metricDeployments in progress or failing %.loadisNumberInProgress + NumberErrorsoverNumberTargeted, summed across deployments with targets;topis the five worst by that share, named bySoftwareName. Left out when nothing is targeted.root\SMS\site_<code>|SMS_SoftwareUpdate: metricDevices missing deployed updates %.topis the five deployed updates (IsDeployed) with the highestNumMissingoverNumTotal, named byLocalizedDisplayName;loadis the highest. Left out when no deployed update is missing anywhere.- A host reads a site's entries at most once every 30 seconds and repeats them in between: they come from the site's summary tables, through SQL.
- A site entry the host couldn't read is not left out: it is
{ "error": { "code": "denied", "detail": "..." } }, with a code from Errors and nometric,loadortop, and the rest of the answer is still 200. The page leaves that building untinted. An export with-ConfigMgrwrites the same entry.
{ "perf": { "root\\SMS\\site_<code>|SMS_SoftwareUpdate": { "error": { "code": "timeout", "detail": "Timed out" } } } }
- The page asks only while Traffic is on: every 2 s, one request at a time, and never while the tab is hidden or Pause in the legend is pressed. It repaints only buildings whose tint changed, and the open building's residents in place.
The Services desk (capability invoke)
The one way to change the machine: call a CIM method. Three routes, all with the same validation as the reads (missing_param, bad_class, ns_not_allowed, a parameter sent twice is bad_param). The desktop app offers them; a page shows methods read-only without the capability.
**GET /api/methods?ns=&class=**: every method of the class with its parameters, from the class definition (CimClass.CimClassMethods, inherited ones included). Read-only, no unlock needed.
{ "m": [
{ "n": "StopService", "static": false, "r": "UInt32", "in": [], "out": [] },
{ "n": "GetOwner", "static": false, "r": "UInt32", "in": [], "out": [{ "n": "Domain", "t": "String" }, { "n": "User", "t": "String" }] },
{ "n": "Create", "static": true, "r": "UInt32", "in": [{ "n": "CommandLine", "t": "String" }, { "n": "CurrentDirectory", "t": "String" }, { "n": "ProcessStartupInformation", "t": "Instance" }], "out": [{ "n": "ProcessId", "t": "UInt32" }] }
] }
static is the method's Static qualifier, r its return type, in and out the parameters with the In and Out qualifiers (one can be both), t the CimType name. "call": false (absent otherwise) marks a method the host won't call from the list (see Configuration Manager below).
**POST /api/unlock?on=1 and POST /api/unlock?on=0**: unlock or lock the desk for this session. Answers { "unlocked": true } or { "unlocked": false }. Locking always works. Unlocking asks the user in the app's own Yes/No dialog, outside the page, so a script in the page can't unlock it; a No is 403 locked. The state lives in the app's memory only: every start is locked, and nothing about it is written to disk. /api/namespaces has unlocked: true while it is unlocked (absent otherwise), so a reloaded page shows it.
**POST /api/invoke?ns=&class=&method=&key.<name>=<value>&in.<name>=<value>**: call one method, only while unlocked; locked, it is 403 locked before anything else is checked.
{ "ReturnValue": 0, "out": { "Domain": "MYPC", "User": "scott" } }
classandmethodmust each match^[A-Za-z_][A-Za-z0-9_]*$(at most 256 characters), else 400bad_class. A method the class doesn't have is 400bad_param.- An instance method names its resident by every key property,
key.<name>=<value>, exactly as/api/instancetakes them (the same types and rules). The host builds the instance from the keys and calls the method on it (CimSession.InvokeMethod); no query is built from anything the page sends. A static method takes no keys and is called on the class. in.<name>=<value>sends one parameter. Only parameters the method declaresInare accepted, and only String, integer and Boolean ones, typed as declared with the same rules as a filtervalue(at most 1,000 characters, no control character; integers strict). A parameter not sent is left to the method's default.- Anything else in the query (a key the class doesn't have, an
Out-only or undeclared parameter, any other name) is 400bad_param, and nothing is called. - A class on the skip list by name or by provider, or never read by key, is 422
skippedand is never called. ReturnValueand eachoutvalue are flattened as in/api/instance(64-bit integers as text). A call the provider refuses or fails is a problem with the usual codes (denied,notfound,failed,timeout, ...). The call has 30 s; the app gives up 2 s after the class read and the call (37 s).- Every call that reaches CIM is one JSON line in
%LOCALAPPDATA%\CimCity\invoke.log:time(UTC),ns,class,method,key,in, andReturnValueandout, orerror(code,detail). A parameter or out value whose name containspass,pwd,secret,credentialortokenis written as(hidden). Refusals before the call (locked, a bad name, a bad parameter) aren't logged. If the log can't be opened, the answer is 500internaland nothing is called. - The host asks every time. After every check above passes, and before anything is called, the app shows its own Yes/No dialog (owned by its window, on the UI thread, No by default) naming the namespace, class, method, the instance (its key values) and each parameter sent, with the same call in PowerShell (
Invoke-CimMethod). There is no way to stop it asking. Nothing in the page can answer it: the page only sends the request and waits. A No is 403 [declined](#declined): nothing is called, and the log gets one line withdeclined: trueand no result. The time the dialog is open doesn't count toward the 37 s limit.
Configuration Manager. In a namespace under root\SMS or root\ccm, the host calls only these, checked by name before anything is read (anything else is 400 bad_param, and /api/methods marks every other method there "call": false, so the page offers no Call for it):
SMS_Collection.RequestRefresh(an instance method:key.CollectionID, andin.includesubcollectionsBoolean).SMS_ClientOperation.InitiateClientOperation(static), only as a client notification to one device:in.Typeone of8(machine policy retrieval),9(user policy retrieval),10(discovery data),11(software inventory) or12(hardware inventory),in.TargetResourceIDsone ResourceID, andin.TargetCollectionID. The page sends it from a device (SMS_R_System), with the type chosen on its card andTargetCollectionID=SMS00001(All Systems), and the app's dialog names each parameter readably (Type = 8 (machine policy retrieval),TargetResourceIDs = 16777220 (the one device's ResourceID)); it's"call": falsein/api/methods, soSMS_ClientOperation's lobby doesn't offer it. No reboot (17), wake-up, script, CMPivot, deployment evaluation or Endpoint Protection type.CCM_ClientUtilities.DetermineIfRebootPendingandCCM_ClientUtilities.GetMachinePolicy(static, inroot\ccm\ClientSDK). NotRestartComputer.
A UInt32Array parameter takes one UInt32 (in.TargetResourceIDs=16777220 is [16777220]); the page sends no other array.
In the HTTP form both POST routes would take an empty body; the WebView2 bridge has no method, so the desktop app answers the path alone, like the reads.
Errors
Every error is application/problem+json:
{
"type": "https://cimcity.app/docs/live-contract/#ns_not_allowed",
"title": "Namespace not allowed",
"status": 400,
"detail": "ns must be one of the namespaces listed by GET /api/namespaces.",
"code": "ns_not_allowed",
"ns": "root\\nope",
"requestId": "a1b2c3d4e5f6"
}
ns and class appear when they apply. The token is never echoed. Clients branch on code, not on status: two codes can share a status (bad_host and denied are both 403).
Each code, its status, and when it happens:
- missing_param, 400: a required query parameter is missing or empty
- bad_class, 400:
classis malformed or too long - bad_param, 400:
skip,prop,valueor akey.<name>can't be used, or a parameter was sent twice - ns_not_allowed, 400:
nsis not in the session allowlist - bad_token, 401:
X-CimCity-Keymissing or wrong - bad_host, 403:
Hostheader isn'tlocalhost:<port> - denied, 403: CIM access denied
- notfound, 404: the class or namespace doesn't exist, or no resident has that key
- not_found, 404: unknown path
- method_not_allowed, 405: not a GET
- skipped, 422: class is on the skip list, by name or by provider
- unsupported, 502: the provider doesn't support reading the class this way
- failed, 502: any other CIM failure
- timeout, 504: the CIM operation timed out
- internal, 500: an unexpected exception in the host
- locked, 403:
/api/invokewhile the Services desk is locked, or an unlock the user didn't confirm - declined, 403: the user said No to a call in the app's dialog
CIM errors are mapped from CimException.NativeErrorCode (AccessDenied, InvalidNamespace, InvalidClass, NotFound) and the HRESULT in its ErrorData (error_Code), never from localized message text. An access-denied HRESULT, 0x80041003 (WBEM_E_ACCESS_DENIED) or 0x80070005 (E_ACCESSDENIED), is denied whatever the result says, so a provider that wraps its refusal in a generic failure still answers denied. A timeout is the code in the error (0x80338029, 0x800705B4, or 0x00040004 WBEM_S_TIMEDOUT, the status a call returns when it reaches its limit with no answer) or a read that ran its full limit; both hosts answer timeout for it. 0x00040004 is what the SMS Provider crash looked like (see skipped, never read by key), and also what a 2 s background count of a big site class answers (SMS_OSDeploymentKitWinPEOptionalComponent on a ConfigMgr lab site), so the code alone doesn't mean a crash.
declined
403. The user said No in the app's dialog for this call (/api/invoke). Nothing was called; the log has one declined line for it.
What to do: nothing. Call again and say Yes if you meant it.
locked
403. /api/invoke while the Services desk is locked, or /api/unlock?on=1 when the user said No in the app's dialog. Nothing was called.
What to do: unlock the desk for this session (see The Services desk).
missing_param
400. ns (or class on /api/instances and /api/count) is missing or empty.
What to do: add the parameter. Encode \ as %5C: /api/classes?ns=root%5Ccimv2.
bad_class
400. class doesn't match ^[A-Za-z_][A-Za-z0-9_]*$ or is longer than 256 characters. The host never builds a query from it.
What to do: pass a plain CIM class name such as Win32_Process. There is no WQL passthrough.
bad_param
400. A parameter was sent more than once (value=a&value=b), on any route that takes parameters, or an optional parameter has a value the host can't use: skip isn't a whole number from 0 to -CountCap; prop came without value or value without prop, or one of them is empty; prop isn't a plain name of a String or integer property of the class (a NUL in it is refused, not dropped), or value doesn't fit its type; a value or key holds a control character (a line break or NUL); or /api/instance didn't get every key property as key.<name>=<value> in a type it can send.
What to do: check the class's properties and keys in GET /api/classes (p, with k: true for keys).
Leniencies that are intended, because none of them can reach a wider query than the one asked for:
-0is a valid integer for an unsigned property and matches0./api/countignoresskip,propandvalue(it has none of them), where/api/instancesanswers 400 for a bad one.- A 64-bit integer that is not a key, and whose name doesn't end in "ID", would be shown by the page with thousands separators. No class has one today.
- A host or export that still sends 64-bit integers as JSON numbers is rounded by the page. Old export files do; the page can't tell and doesn't warn.
ns_not_allowed
400. ns isn't in this session's allowlist: it didn't answer the startup probe, it wasn't in -Namespace, and the host has not seen it created under root while it ran (/api/activity, spaces).
What to do: check GET /api/namespaces for the list. To add a namespace, restart the host with -Namespace including it. If a namespace you expected is missing, it may need an elevated session (root\ccm does).
bad_token
401. The X-CimCity-Key header is missing or doesn't match this session's token. Tokens are per session, so this is also what you get after restarting the host.
What to do: in the page, restart the host; a new session has a new token.
bad_host
403. The Host header isn't localhost:<port>. This is the DNS rebinding defence: a page on evil.example that resolves its name to 127.0.0.1 still sends Host: evil.example. (http.sys rejects some mismatches itself with a plain 400 before the host sees them.)
What to do: use http://localhost:<port>/ exactly as printed. 127.0.0.1 and other names aren't accepted.
denied
403. The provider refused access. Many classes outside root\cimv2, and some inside it, need an administrator. The refusal is either the MI result AccessDenied or an access-denied HRESULT in the error (0x80041003, 0x80070005), on every route.
The SMS Provider's own role checks have so far answered with no rows, or with a generic failure (failed) for some classes; the HRESULT of those generic failures hasn't been captured, so it isn't known whether they carry an access-denied code.
The page marks a building as denied as soon as its background count is refused, and shows this text with Retry when you enter it. A refused ride, Show more residents, or read of one resident gets the same explanation.
What to do: run the desktop app as administrator. In a Configuration Manager site namespace, running as administrator doesn't help: use an account that has a role in Configuration Manager with read access to the site. On the SMS Provider machine itself, an account without a role is usually not denied at all: it gets empty buildings (see Starting a session).
notfound
404. The class or namespace doesn't exist on this machine (CIM InvalidClass, InvalidNamespace or NotFound), or /api/instance found no resident with that key. Not to be confused with not_found, which is an unknown URL.
What to do: check the spelling. The class may come from a product or driver that isn't installed here. For a resident: it has left since the list was read, or, in a Configuration Manager site, the account's role, security scopes, or collections don't show it. The provider gives the same answer for both.
not_found
404. No route matches the path. /brand/* and /favicon.ico deliberately return this: the host serves only the page and the API.
What to do: use one of the routes above. The page lives at /learn/.
method_not_allowed
405. The request wasn't a GET (or, for /api/unlock and /api/invoke, a POST). The response has Allow: GET. The desktop app has no methods to check (see the top of this document).
What to do: use GET.
skipped
422. The class is on the exporter's skip list and is never read live, because enumerating it is slow, huge or has side effects. Abstract and association classes answer the same way, and so does a filtered read (prop, value) of a class that has subclasses.
The skip list has two parts:
- By provider. Every class whose
providerqualifier isMSIProv, the Windows Installer provider:Win32_Product,Win32_SoftwareFeature,Win32_SoftwareElement,Win32_Patchand the rest of its 60 classes inroot\cimv2(Windows Server 2025). Reading any of them makes Windows Installer check and reconfigure every installed product, and logs MsiInstaller event 1035 for each one. Microsoft describes this forWin32_Productin Windows Installer reconfigured all applications; it is the provider (msiprov.dll) that does it, so the rule is the provider, not a list of names. - By name.
Win32_Product, file and directory classes,Win32_NTLogEvent,Win32_ReliabilityRecords,Win32_Perf*,SMS_StatusMessage,SMS_StatMsg*,SMS_StatInsStr,SMS_StatAttr(the status message tables: one row per message, per insertion string and per attribute, 100,000 rows on a small lab site) and system classes (__*).
The answer is the same on every route (/api/count, /api/instances with or without skip, prop and value, /api/instance, /api/events).
Never read by key or filtered. SMS_SupportedPlatformsOfflineServicing and SMS_OSDeploymentKitSupportedPlatforms are listed and counted like any class, but /api/instance, and /api/instances with prop and value, answer skipped for them. A read by key of the first makes the SMS Provider fetch the second with the same keys, hit an access violation, and lose its provider process (a SMSProv.log_CRASH_* file each time; reproduced on every attempt on one current-branch site). The call then ran to the client's limit, which looked like a slow provider. A filtered read of either class has never been tried; it is refused until shown safe, because a query on key properties may reach the same code.
Stopped for the session. No other class is known to crash the provider: on a ConfigMgr lab site one resident of each of 336 populated classes was read by key, and only SMS_SupportedPlatformsOfflineServicing ran to the limit; six others answered a quick failed. In case another one does, both hosts watch for the symptom: when a read by key (/api/instance) or a filtered read (/api/instances with prop and value) answers 0x00040004, that class answers skipped to both routes until the host restarts, and the host writes one line to stderr. Its list and count still read: a list or count that times out isn't taken as a crash, because big site classes do that on a background count. The first read still answers timeout.
The list of classes never read by key lives in Program.cs (SkipByKey), with a copy in CimShared.ps1 for the exporter that web/build.py checks. A class is added only with evidence that reading it by key crashes the provider (a new SMSProv.log_CRASH_* file at the time of the read).
The page marks a building as not read live as soon as its background count answers skipped.
What to do: nothing; this is by design. Use the class's own tools (Get-Package, Get-WinEvent) if you need its data.
unsupported
502. The provider answered that it doesn't support the operation: the MI result NotSupported, or 0x8004100C (WBEM_E_NOT_SUPPORTED) in the error. Some providers can't list their class at all: Win32_PingStatus needs an Address to ping, and one Configuration Manager class (SMS_Client_Reg_MultiString_List on a ConfigMgr lab site) answers the same way. detail carries the CIM error.
Unlike failed, it never clears, so the page marks the building as not supported here as soon as its background count answers unsupported, and entering it explains without reading again. A host that predates this code answered failed for it.
What to do: nothing; the class can't be read this way. Its provider's own tools may offer it (Test-Connection for a ping).
failed
502. The CIM call failed for a reason that isn't denied, not found, not supported or timeout. detail carries the CIM error.
What to do: Retry. If it keeps failing, the provider is likely broken or busy; Get-CimInstance -Namespace <ns> -ClassName <class> in PowerShell shows the same error with more context.
timeout
504. The provider didn't answer in time: 5 s for each read of instances or a count, 10 s for a class list.
Each CIM read is also bounded by the host itself, in case a hung provider ignores the CIM timeout: The app gives up on a request 2 s after the sum of its reads' timeouts and cancels it: two reads for a count or a list of residents, three for one resident by key or a filtered list, and for Traffic five plus two for each site. An events request has 19 s: one class read, two tries to subscribe, the wait for events, and the read that tells denied from failed.
What to do: Retry. Some providers are slow on first use and fast after. A count that timed out answers timeout for the rest of the session. Enter the building to read it again with the full timeout.
internal
500. An unexpected exception in the host. detail names the exception type; the console line for the request has the same requestId.
What to do: Retry. If it repeats, send the console line for that requestId to hello@cimcity.app (it holds no token).
Request gate
Every request goes through these checks in order; the first failure answers.
- Host.
Hostmust equallocalhost:<port>(case-insensitive), else 403bad_host. - Method. Must be GET, else 405
method_not_allowedwithAllow: GET. - Path.
/learn/serves the page;/and/learnredirect;/api/*continues; anything else is 404not_found. - Token (
/api/*only).X-CimCity-Keymust equal the session token (constant-time compare), else 401bad_token. - Parameters. 400
bad_paramfor a parameter sent more than once, thenmissing_param,bad_class,ns_not_allowedorbad_param. - Skip list.
/api/instances,/api/instance,/api/countand/api/eventsfor a skipped class (by name or by provider) answers 422skippedwithout reading its residents. - CIM. The read itself: 200, or
denied,notfound,unsupported,timeout,failed,internal.
No response carries Access-Control-Allow-* headers, so other origins can't read anything.
Threat model
The app runs as you, often elevated, and CIM data is sensitive: process command lines, local accounts, serial numbers, ConfigMgr objects. What protects it:
- No listener. The app opens no port; the page and the app talk over WebView2 messages inside one process.
- One write path, locked by default.
/api/invokeanswers only after the user unlocks the Services desk in the app's own dialog (not the page's), for that run of the app only. It calls one method the class declares, on a resident named by its keys, with only declaredInparameters of declared types, and logs every call to%LOCALAPPDATA%\CimCity\invoke.log. Every call is confirmed by the host too: the app's own Yes/No, after its checks, naming exactly what it will call. A script in the page can send a request but can't answer either dialog, so nothing is called without the user's Yes. - Read-only and allowlisted. Read-only calls, namespaces limited to the startup allowlist (which grows only with a namespace the host itself sees created under
root, plain names only, at most 20, never from a request), class names validated, no WQL from the client. The one filter (prop,value) is built by the app from a property the class has and a typed, escaped value. - Command lines hidden. The page shows
CommandLinevalues as "Hidden (may contain secrets)" until you click Show.
The HTTP form had more to defend: localhost-only binding, a per-session token in X-CimCity-Key, a Host check against DNS rebinding, no CORS headers, and no logging of the token. The page still implements the client side of it.
The desktop app has no listener and no token: it answers WebView2 messages only from its own origin (https://cimcity.example/), and its window shows only that origin: other links open in the default browser, and only from a click or a key. It trusts the web\ folder next to the exe and its WebView2 user data folder (%LOCALAPPDATA%\CimCity\WebView2) as the user's own files, so a program that can change them can change the page.
Versioning
contract: 1 is this document. A host adds optional behaviour through capabilities; anything a contract-1 page would misread (a renamed field, a changed status or code) bumps contract.