1---2name: infra3description: Skill for the Infra area of Wiki. 1329 symbols across 355 files.4---56# Infra781329 symbols | 355 files | Cohesion: 55%910## When to Use1112- Working with code in `AI/`13- Understanding how runGatewayUpdate, step, runGitCheckoutOrFail work14- Modifying infra-related functionality1516## Key Files1718| File | Symbols |19|------|---------|20| `AI/3-Application/Openclaw-source/src/infra/push-apns.ts` | resolveApnsRegistrationPath, normalizeNodeId, isValidNodeId, normalizeApnsToken, normalizeRelayHandle (+34) |21| `AI/3-Application/Openclaw-source/src/infra/boundary-path.ts` | createLexicalTraversalState, advanceCanonicalCursorForSegment, handleLexicalStatDisposition, resolveBoundaryPathLexicalAsync, resolveSymlinkHopPath (+33) |22| `AI/3-Application/Openclaw-source/src/infra/exec-wrapper-resolution.ts` | scanWrapperInvocation, unwrapNiceInvocation, unwrapNohupInvocation, unwrapDashOptionInvocation, unwrapStdbufInvocation (+29) |23| `AI/3-Application/Openclaw-source/src/infra/device-pairing.ts` | getPairedDeviceFromState, buildDeviceAuthToken, resolveApprovedDeviceScopeBaseline, scopesWithinApprovedDeviceBaseline, verifyDeviceToken (+23) |24| `AI/3-Application/Openclaw-source/src/infra/fs-safe.ts` | openVerifiedLocalFile, resolveOpenedFileRealPathForHandle, openWritableFileWithinRoot, appendFileWithinRoot, SafeOpenError (+18) |25| `AI/3-Application/Openclaw-source/src/infra/exec-approvals-analysis.ts` | shellEscapeSingleArg, rebuildShellCommandFromSource, buildSafeShellCommand, renderQuotedArgv, finalizeRebuiltShellCommand (+16) |26| `AI/3-Application/Openclaw-source/src/infra/state-migrations.ts` | runFileCopyPlans, migrateLegacyWhatsAppAuth, migrateLegacyTelegramPairingAllowFrom, runLegacyStateMigrations, isSurfaceGroupKey (+16) |27| `AI/3-Application/Openclaw-source/src/infra/exec-approvals.ts` | resolveExecApprovalsPath, resolveExecApprovalsSocketPath, coerceAllowlistEntries, normalizeExecApprovals, readExecApprovalsSnapshot (+13) |28| `AI/3-Application/Openclaw-source/src/infra/bonjour-discovery.ts` | decodeDnsSdEscapes, parseIntOrNull, parseTxtTokens, parseDnsSdBrowse, parseDnsSdResolve (+12) |29| `AI/3-Application/Openclaw-source/src/infra/exec-approvals-allowlist.ts` | pickExecAllowlistContext, evaluateExecAllowlist, evaluateShellAllowlist, normalizeSafeBins, resolveSafeBins (+12) |3031## Entry Points3233Start here when exploring this area:3435- **`runGatewayUpdate`** (Function) — `AI/3-Application/Openclaw-source/src/infra/update-runner.ts:324`36- **`step`** (Function) — `AI/3-Application/Openclaw-source/src/infra/update-runner.ts:340`37- **`runGitCheckoutOrFail`** (Function) — `AI/3-Application/Openclaw-source/src/infra/update-runner.ts:400`38- **`createGlobalInstallEnv`** (Function) — `AI/3-Application/Openclaw-source/src/infra/update-global.ts:109`39- **`globalInstallArgs`** (Function) — `AI/3-Application/Openclaw-source/src/infra/update-global.ts:240`4041## Key Symbols4243| Symbol | Type | File | Line |44|--------|------|------|------|45| `SafeOpenError` | Class | `AI/3-Application/Openclaw-source/src/infra/fs-safe.ts` | 28 |46| `RequestBodyLimitError` | Class | `AI/3-Application/Openclaw-source/src/infra/http-body.ts` | 33 |47| `LocalMediaAccessError` | Class | `AI/3-Application/Openclaw-source/extensions/whatsapp/src/media.ts` | 66 |48| `ArchiveSecurityError` | Class | `AI/3-Application/Openclaw-source/src/infra/archive-staging.ts` | 12 |49| `runGatewayUpdate` | Function | `AI/3-Application/Openclaw-source/src/infra/update-runner.ts` | 324 |50| `step` | Function | `AI/3-Application/Openclaw-source/src/infra/update-runner.ts` | 340 |51| `runGitCheckoutOrFail` | Function | `AI/3-Application/Openclaw-source/src/infra/update-runner.ts` | 400 |52| `createGlobalInstallEnv` | Function | `AI/3-Application/Openclaw-source/src/infra/update-global.ts` | 109 |53| `globalInstallArgs` | Function | `AI/3-Application/Openclaw-source/src/infra/update-global.ts` | 240 |54| `globalInstallFallbackArgs` | Function | `AI/3-Application/Openclaw-source/src/infra/update-global.ts` | 250 |55| `trimLogTail` | Function | `AI/3-Application/Openclaw-source/src/infra/restart-sentinel.ts` | 136 |56| `normalizePackageTagInput` | Function | `AI/3-Application/Openclaw-source/src/infra/package-tag.ts` | 0 |57| `maybeOfferUpdateBeforeDoctor` | Function | `AI/3-Application/Openclaw-source/src/commands/doctor-update.ts` | 26 |58| `runUpdateStep` | Function | `AI/3-Application/Openclaw-source/src/cli/update-cli/shared.ts` | 144 |59| `normalizeApnsEnvironment` | Function | `AI/3-Application/Openclaw-source/src/infra/push-apns.ts` | 391 |60| `registerApnsRegistration` | Function | `AI/3-Application/Openclaw-source/src/infra/push-apns.ts` | 402 |61| `registerApnsToken` | Function | `AI/3-Application/Openclaw-source/src/infra/push-apns.ts` | 475 |62| `clearApnsRegistration` | Function | `AI/3-Application/Openclaw-source/src/infra/push-apns.ts` | 500 |63| `clearApnsRegistrationIfCurrent` | Function | `AI/3-Application/Openclaw-source/src/infra/push-apns.ts` | 541 |64| `normalizeMessageChannel` | Function | `AI/3-Application/Openclaw-source/src/utils/message-channel.ts` | 67 |6566## Execution Flows6768| Flow | Type | Steps |69|------|------|-------|70| `LoadConfig → Normalize` | cross_community | 10 |71| `LoadConfig → ResolveRawOsHomeDir` | cross_community | 10 |72| `LoadConfig → Cwd` | cross_community | 8 |73| `RunCli → Normalize` | cross_community | 7 |74| `Setup → StatSync` | cross_community | 6 |75| `OnEvent → NormalizeSystemText` | cross_community | 6 |76| `AttachGatewayWsMessageHandler → IsIpv4Address` | cross_community | 5 |77| `AttachGatewayWsMessageHandler → IsIpv6Address` | cross_community | 5 |78| `MonitorWebChannel → MkdirSync` | cross_community | 5 |79| `HandlePluginsCommand → NormalizeChannelKey` | cross_community | 5 |8081## Connected Areas8283| Area | Connections |84|------|-------------|85| Scripts | 302 calls |86| Auto-reply | 56 calls |87| Plugins | 56 calls |88| Ink | 41 calls |89| Gateway | 31 calls |90| Commands | 28 calls |91| Agents | 26 calls |92| Security | 20 calls |9394## How to Explore95961. `gitnexus_context({name: "runGatewayUpdate"})` — see callers and callees972. `gitnexus_query({query: "infra"})` — find related execution flows983. Read key files listed above for implementation details