@agimon-ai/po-ios 0.0.1-alpha.2 → 0.0.1-alpha.21
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.
- package/README.md +13 -3
- package/dist/apiContracts.cjs +190 -4
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts +0 -1
- package/dist/apiContracts.d.mts.map +1 -1
- package/dist/apiContracts.mjs +188 -3
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/{contracts-DH0gdDYT.mjs → contracts-BQjfOjy0.mjs} +3 -2
- package/dist/{contracts-DH0gdDYT.mjs.map → contracts-BQjfOjy0.mjs.map} +1 -1
- package/dist/{contracts-BsO_lEi8.cjs → contracts-EZxEDrrj.cjs} +8 -1
- package/dist/{contracts-BsO_lEi8.cjs.map → contracts-EZxEDrrj.cjs.map} +1 -1
- package/dist/extensions/native.mjs +1310 -0
- package/dist/extensions/native.mjs.map +1 -0
- package/dist/extensions/server.cjs +786 -41
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +789 -44
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +1025 -0
- package/dist/extensions/web.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +50 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +54 -7
- package/src/prompts/codemode-how-to-ios/SKILL.md +16 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.mjs","names":["iosActivityChannel","settingIos","lifecycleStart","activityGroupIos","channelIosActivity","fillIos","lifecycleStart2"],"sources":["../../src/extensions/(frontend)/setting/_lib/settingsRuntime.ts","../../src/extensions/(frontend)/lifecycle/start.web.ts","../../src/constants/ios.ts","../../src/extensions/(frontend)/setting/_lib/settingsModel.ts","../../src/extensions/(frontend)/setting/_lib/useIosSettings.ts","../../src/extensions/(frontend)/setting/_components/IosSettingsView.tsx","../../src/extensions/(frontend)/setting/_components/IosSettingsPanel.tsx","../../src/extensions/(frontend)/setting/ios.panel.web.tsx","../../src/types/iosUi.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/iosActivityStore.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/iosViewModel.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/IosActivityView.tsx","../../src/extensions/workspaces/sessions/(frontend)/_lib/iosFrames.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/IosDeviceView.tsx","../../src/extensions/workspaces/sessions/(frontend)/_components/IosDevicePanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/_components/IosActivityPanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/activity-group/ios.web.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/ios-activity.web.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/Ios.activity.ios.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.web.ts","../../generated/web.ts"],"sourcesContent":["import { defineGlobalStore, type WebPluginRuntime } from '@agimon-ai/po-core/web';\n\nexport const settingsRuntime = defineGlobalStore<WebPluginRuntime['invokeServerMethod'] | undefined>(undefined);\n\nexport function startSettingsRuntime(runtime: WebPluginRuntime): () => void {\n const invoke: WebPluginRuntime['invokeServerMethod'] = (call) => runtime.invokeServerMethod(call);\n settingsRuntime.update(() => invoke);\n return () => settingsRuntime.update((current) => (current === invoke ? undefined : current));\n}\n","import { defineWebLifecycle } from '@agimon-ai/po-core/web';\n\nimport { startSettingsRuntime } from '../setting/_lib/settingsRuntime';\n\nexport default defineWebLifecycle(startSettingsRuntime);\n","export const IOS_NAMESPACE = 'ios';\nexport const IOS_PACKAGE = '@agimon-ai/po-ios';\nexport const IOS_POOL_SERVICE = 'po/ios-pool';\n\n/** Table prefix in the shared `po/db`. */\nexport const IOS_DB_PREFIX = 'ios';\n/** `<po home>/ios/devices` is the simulator device set Po owns; the person's own simulators live elsewhere. */\nexport const IOS_DIRECTORY = 'ios';\nexport const IOS_DEVICE_SET_DIRECTORY = 'devices';\nexport const IOS_DEVICE_NAME_PREFIX = 'po-pool-';\n\nexport const IOS_POOL_DEFAULTS = {\n minBooted: 0,\n maxBooted: 2,\n maxDevices: 4,\n idleShutdownMinutes: 10,\n waitTimeoutSeconds: 120,\n} as const;\n\nexport const JANITOR_INTERVAL_MS = 60_000;\nexport const QUEUE_POLL_MS = 750;\n/** A set member with no row must stay orphaned this long before it is deleted, so a create in flight survives. */\nexport const ORPHAN_GRACE_MS = 5 * 60_000;\nexport const SIMCTL_TIMEOUT_MS = 120_000;\nexport const BOOT_TIMEOUT_MS = 300_000;\nexport const MAX_COMMAND_OUTPUT_CHARS = 8 * 1024 * 1024;\nexport const SCREENSHOT_MAX_PIXELS = 1200;\nexport const LOG_DEFAULT_SECONDS = 60;\nexport const LOG_DEFAULT_LINES = 200;\n/** A phone app's console: lines kept per device, and how long devicectl stays attached before it is stopped. */\nexport const CONSOLE_MAX_LINES = 5000;\nexport const CONSOLE_MAX_MS = 12 * 60 * 60_000;\n\n/** Fixed tool path: never the server's own PATH. */\nexport const IOS_TOOL_PATH = '/usr/bin:/bin:/usr/sbin:/sbin';\n\nexport const IOS_ERROR_CODES = [\n 'IOS_UNSUPPORTED_HOST',\n 'IOS_NO_XCODE',\n 'IOS_NO_RUNTIME',\n 'IOS_POOL_BUSY',\n 'IOS_NO_LEASE',\n 'IOS_LEASE_LOST',\n 'IOS_COMMAND_FAILED',\n 'IOS_INVALID_ARGUMENT',\n 'IOS_HELPER_UNAVAILABLE',\n 'IOS_ELEMENT_STALE',\n 'IOS_AMBIGUOUS',\n 'IOS_NO_MATCH',\n] as const;\n\n/** The resident Swift helper that reads accessibility and sends touches; built from source on first use. */\nexport const HELPER_PRODUCT = 'po-ios-sim-helper';\nexport const HELPER_PROTOCOL_VERSION = 1;\nexport const HELPER_SOURCE_DIRECTORY = 'native/sim-helper';\n/** Every file the helper build reads; their contents key the build cache. A contract test keeps this list complete. */\nexport const HELPER_SOURCES = [\n 'Package.swift',\n 'Sources/PoIosCore/Protocol.swift',\n 'Sources/PoIosCore/Compaction.swift',\n 'Sources/PoIosSimHelper/main.swift',\n 'Sources/PoIosSimHelper/PrivateApis.swift',\n 'Sources/PoIosSimHelper/Backends.swift',\n 'Tests/PoIosCoreTests/ProtocolTests.swift',\n 'Tests/PoIosCoreTests/CompactionTests.swift',\n] as const;\nexport const HELPER_NATIVE_DIRECTORY = 'native';\nexport const HELPER_BUILD_LOCK = 'helper-build';\nexport const HELPER_TIMEOUT_MS = 15_000;\nexport const HELPER_BUILD_TIMEOUT_MS = 10 * 60_000;\nexport const HELPER_MAX_RESTARTS = 3;\nexport const HELPER_RESTART_WINDOW_MS = 5 * 60_000;\nexport const HELPER_MAX_LINE_CHARS = 8 * 1024 * 1024;\n\nexport const WAIT_POLL_MS = 250;\nexport const WAIT_MAX_POLL_MS = 1000;\nexport const WAIT_DEFAULT_MS = 10_000;\nexport const SETTLE_DEFAULT_MS = 5000;\nexport const SETTLE_QUIET_MS = 500;\nexport const AMBIGUOUS_CANDIDATES = 5;\nexport const SWIPE_DEFAULT_MS = 300;\nexport const HARDWARE_BUTTONS = ['home', 'lock', 'siri', 'volumeUp', 'volumeDown'] as const;\n","import { IOS_POOL_DEFAULTS } from '../../../../constants/ios';\nimport type { IosSettingsDraft, IosSettingsStatus } from '../../../../types/iosSettings';\n\nexport const poolFields = [\n { key: 'maxRunning', path: 'maxBooted', label: 'Running limit', detail: 'Maximum simulators running at once.' },\n {\n key: 'maxStored',\n path: 'maxDevices',\n label: 'Stored limit',\n detail: 'Maximum Po-owned simulators kept on this computer.',\n },\n { key: 'warmCount', path: 'minBooted', label: 'Keep warm', detail: 'Idle simulators to keep ready.' },\n {\n key: 'idleMinutes',\n path: 'idleShutdownMinutes',\n label: 'Idle timeout (minutes)',\n detail: 'Stop an unused Po-owned simulator after this long.',\n },\n {\n key: 'queueSeconds',\n path: 'waitTimeoutSeconds',\n label: 'Queue timeout (seconds)',\n detail: 'How long a session can wait for a simulator.',\n },\n] as const;\nexport const physicalAvailabilityNote =\n 'Every acquisition still asks for human approval. Excluding a phone does not revoke an active lease. Phones are never erased.';\nexport const simulatorOwnershipNote = 'Only Po-owned simulators are managed. Your personal simulators are left alone.';\nexport const safeUdid = (value: string) => /^(?:[a-fA-F0-9]{8}-[a-fA-F0-9]{16}|[a-fA-F0-9]{40})$/.test(value);\nexport const settingPaths = {\n teamId: ['ios', 'device', 'developmentTeam'],\n model: ['ios', 'pool', 'deviceType'],\n runtime: ['ios', 'pool', 'runtime'],\n} as const;\nexport type SettingsRead = { draft: IosSettingsDraft; hash: string };\ntype Request = (input: string, init?: RequestInit) => Promise<Response>;\nexport const emptyDraft = (): IosSettingsDraft => ({\n teamId: '',\n model: '',\n runtime: '',\n availability: {},\n maxRunning: String(IOS_POOL_DEFAULTS.maxBooted),\n maxStored: String(IOS_POOL_DEFAULTS.maxDevices),\n warmCount: String(IOS_POOL_DEFAULTS.minBooted),\n idleMinutes: String(IOS_POOL_DEFAULTS.idleShutdownMinutes),\n queueSeconds: String(IOS_POOL_DEFAULTS.waitTimeoutSeconds),\n});\nfunction record(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\nexport async function readSettings(request: Request, udids: readonly string[]): Promise<SettingsRead> {\n const search = new URLSearchParams({ repoRoot: '' });\n const paths: Array<{ key: keyof Omit<IosSettingsDraft, 'availability'>; path: readonly string[] }> = [\n ...Object.entries(settingPaths).map(([key, path]) => ({ key: key as keyof typeof settingPaths, path })),\n ...poolFields.map((field) => ({ key: field.key, path: ['ios', 'pool', field.path] })),\n ];\n for (const { path } of paths) search.append('key', path.join('.'));\n for (const udid of udids.filter(safeUdid)) search.append('key', `ios.device.availability.${udid}`);\n const response = await request(`/api/settings?${search}`);\n const body: unknown = await response.json();\n if (\n !response.ok ||\n !record(body) ||\n !record(body.values) ||\n !record(body.hashes) ||\n typeof body.hashes.global !== 'string'\n )\n throw new Error('Could not read global iOS settings. Your draft is unchanged.');\n const values = body.values;\n const draft = emptyDraft();\n const valueAt = (path: readonly string[]) => {\n const entry = values[path.join('.')];\n return record(entry) && typeof entry.value === 'string' ? entry.value : undefined;\n };\n for (const { key, path } of paths) draft[key] = valueAt(path) ?? draft[key];\n for (const udid of udids.filter(safeUdid)) {\n draft.availability[udid] =\n valueAt(['ios', 'device', 'availability', udid]) === 'excluded' ? 'excluded' : 'available';\n }\n return { draft, hash: body.hashes.global };\n}\n\n/** Scalar edits only. The host validates and atomically writes the complete document. */\nexport function settingsEdits(draft: IosSettingsDraft, saved: IosSettingsDraft) {\n const edits: Array<{ keyPath: readonly string[]; value: string | number | null }> = [];\n if (draft.teamId && !/^[A-Z0-9]{10}$/.test(draft.teamId))\n throw new Error('Team ID must contain 10 uppercase letters or digits.');\n for (const [key, keyPath] of Object.entries(settingPaths) as Array<[keyof typeof settingPaths, readonly string[]]>) {\n if (draft[key] !== saved[key]) edits.push({ keyPath, value: draft[key] || null });\n }\n for (const field of poolFields) {\n const value = Number(draft[field.key]);\n const minimum = field.key === 'warmCount' || field.key === 'queueSeconds' ? 0 : 1;\n if (!/^\\d+$/.test(draft[field.key]) || !Number.isSafeInteger(value) || value < minimum)\n throw new Error(`${field.label} must be a whole number of at least ${minimum}.`);\n if (draft[field.key] !== saved[field.key]) edits.push({ keyPath: ['ios', 'pool', field.path], value });\n }\n if (Number(draft.warmCount) > Number(draft.maxRunning) || Number(draft.maxRunning) > Number(draft.maxStored))\n throw new Error(\n 'Keep warm must not exceed the running limit, and the running limit must not exceed the stored limit.',\n );\n for (const [udid, value] of Object.entries(draft.availability)) {\n if (!safeUdid(udid) || (value !== 'available' && value !== 'excluded'))\n throw new Error('Invalid phone availability.');\n if (value !== (saved.availability[udid] ?? 'available'))\n edits.push({ keyPath: ['ios', 'device', 'availability', udid], value });\n }\n if (edits.length > 100) throw new Error('Save at most 100 settings at a time.');\n return edits;\n}\n\nexport function pendingActivation(draft: IosSettingsDraft, status?: IosSettingsStatus): boolean {\n if (!status?.active || !status.applied) return true;\n const applied = status.applied;\n return (\n draft.teamId !== (applied.developmentTeam ?? '') ||\n draft.model !== (applied.pool.deviceType ?? '') ||\n draft.runtime !== (applied.pool.runtime ?? '') ||\n poolFields.some((field) => Number(draft[field.key]) !== applied.pool[field.path]) ||\n Object.entries(draft.availability).some(([udid, state]) => state !== (applied.availability[udid] ?? 'available'))\n );\n}\n\n/** The settings host may reconnect to a different version, so reject malformed replies. */\nexport function parseSettingsStatus(value: unknown): IosSettingsStatus | undefined {\n if (\n !record(value) ||\n typeof value.active !== 'boolean' ||\n typeof value.configFile !== 'string' ||\n !Array.isArray(value.phones) ||\n !Array.isArray(value.runtimes)\n )\n return undefined;\n if (value.inventoryError !== undefined && typeof value.inventoryError !== 'string') return undefined;\n if (value.runtimeError !== undefined && typeof value.runtimeError !== 'string') return undefined;\n const choice = (item: unknown) =>\n record(item) && typeof item.identifier === 'string' && typeof item.name === 'string';\n if (\n value.phones.some(\n (phone) =>\n !record(phone) ||\n typeof phone.udid !== 'string' ||\n typeof phone.name !== 'string' ||\n typeof phone.paired !== 'boolean' ||\n typeof phone.connected !== 'boolean' ||\n typeof phone.leased !== 'boolean' ||\n (phone.availability !== 'available' && phone.availability !== 'excluded'),\n )\n )\n return undefined;\n if (\n value.runtimes.some(\n (runtime) =>\n !record(runtime) ||\n !choice(runtime) ||\n typeof runtime.isAvailable !== 'boolean' ||\n !Array.isArray(runtime.models) ||\n runtime.models.some((model) => !choice(model)),\n )\n )\n return undefined;\n if (value.applied !== undefined) {\n const applied = value.applied;\n if (!record(applied) || !record(applied.pool) || !record(applied.availability)) return undefined;\n const pool = applied.pool;\n if (poolFields.some((field) => typeof pool[field.path] !== 'number' || !Number.isSafeInteger(pool[field.path])))\n return undefined;\n if (\n (pool.deviceType !== undefined && typeof pool.deviceType !== 'string') ||\n (pool.runtime !== undefined && typeof pool.runtime !== 'string')\n )\n return undefined;\n if (applied.developmentTeam !== undefined && typeof applied.developmentTeam !== 'string') return undefined;\n if (\n Object.entries(applied.availability).some(\n ([udid, state]) => !safeUdid(udid) || (state !== 'available' && state !== 'excluded'),\n )\n )\n return undefined;\n }\n return value as unknown as IosSettingsStatus;\n}\n","import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type {\n IosSettingsStatus,\n IosSettingsViewProps,\n IosSettingsTransport,\n IosSettingsInvoker,\n} from '../../../../types/iosSettings';\nimport {\n emptyDraft,\n pendingActivation,\n readSettings,\n settingsEdits,\n parseSettingsStatus,\n type SettingsRead,\n} from './settingsModel';\n\nexport function useIosSettings(\n { request, requestWithStepUp }: IosSettingsTransport,\n invoke: IosSettingsInvoker | undefined,\n): IosSettingsViewProps {\n const [saved, setSaved] = useState<SettingsRead>();\n const [draft, setDraft] = useState(emptyDraft);\n const [status, setStatus] = useState<IosSettingsStatus>();\n const [loading, setLoading] = useState(true);\n const [saving, setSaving] = useState(false);\n const [conflict, setConflict] = useState(false);\n const [notice, setNotice] = useState('Loading iOS settings.');\n const generation = useRef(0);\n const mounted = useRef(false);\n const draftRef = useRef(draft);\n draftRef.current = draft;\n const savedRef = useRef(saved);\n savedRef.current = saved;\n const busy = useRef(false);\n const edited = useRef(false);\n const load = useCallback(async () => {\n const run = ++generation.current;\n setLoading(true);\n try {\n let current: IosSettingsStatus | undefined;\n if (invoke) {\n try {\n const reply = await invoke({ mount: { scope: 'global' }, service: 'ios', method: 'settings', input: {} });\n current = parseSettingsStatus(reply);\n } catch {\n /* Config remains editable when inventory is unavailable. */\n }\n }\n const udids = [\n ...new Set([\n ...Object.keys(draftRef.current.availability),\n ...Object.keys(current?.applied?.availability ?? {}),\n ...(current?.phones.map((phone) => phone.udid) ?? []),\n ]),\n ];\n const fresh = await readSettings(request, udids);\n if (generation.current !== run) return;\n const hadDraft =\n edited.current &&\n (savedRef.current === undefined || JSON.stringify(draftRef.current) !== JSON.stringify(savedRef.current.draft));\n setSaved(fresh);\n setStatus(current);\n if (!hadDraft) setDraft(fresh.draft);\n setConflict(false);\n setNotice(\n hadDraft\n ? `Current saved settings: ${JSON.stringify(fresh.draft)}. Your draft is retained. Review before saving again.`\n : pendingActivation(fresh.draft, current)\n ? 'Saved settings are pending activation. The active service has not been restarted.'\n : 'Saved settings match the active iOS service. Signing has not been checked.',\n );\n } catch {\n if (generation.current === run) {\n setStatus(undefined);\n setNotice('Could not reach global iOS settings. Your draft is retained. Try again.');\n }\n } finally {\n if (generation.current === run) setLoading(false);\n }\n }, [request, invoke]);\n useEffect(() => {\n mounted.current = true;\n void load();\n return () => {\n mounted.current = false;\n generation.current++;\n };\n }, [load]);\n const dirty = saved !== undefined && JSON.stringify(draft) !== JSON.stringify(saved.draft);\n const save = async () => {\n if (!saved || busy.current || conflict || loading) return;\n busy.current = true;\n setSaving(true);\n const run = generation.current;\n let wrote = false;\n try {\n const edits = settingsEdits(draft, saved.draft);\n if (!edits.length) return;\n const response = await requestWithStepUp('/api/settings/value', {\n method: 'PUT',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ repoRoot: '', scope: 'global', expectedHash: saved.hash, edits }),\n });\n if (run !== generation.current) return;\n if (response.status === 409) {\n setConflict(true);\n setNotice(\n 'Settings changed on your computer. Review current settings before saving again. Your draft is retained.',\n );\n return;\n }\n if (!response.ok) {\n setNotice(`Settings were not saved (Po answered ${response.status}). Your draft is retained.`);\n return;\n }\n wrote = true;\n const fresh = await readSettings(request, Object.keys(draft.availability));\n if (run !== generation.current) return;\n setSaved(fresh);\n // Confirm the actual values, not just the write response, before clearing the draft.\n const remaining = settingsEdits(draft, fresh.draft);\n if (remaining.length) {\n setConflict(true);\n setNotice('Settings changed again after saving. Your draft is retained. Review current settings.');\n } else {\n edited.current = false;\n setDraft(fresh.draft);\n setNotice(\n pendingActivation(fresh.draft, status)\n ? 'Saved. Pending activation: restart the iOS service explicitly when ready. Saving did not restart it or interrupt leases.'\n : 'Saved settings match the active iOS service. Signing has not been checked.',\n );\n }\n } catch (error) {\n if (run === generation.current) {\n if (wrote) setConflict(true);\n setNotice(\n wrote\n ? 'The write succeeded, but current settings could not be confirmed. Your draft is retained. Review current settings before saving again.'\n : error instanceof Error\n ? error.message\n : 'Could not save settings. Your draft is retained.',\n );\n }\n } finally {\n busy.current = false;\n if (mounted.current) setSaving(false);\n }\n };\n return {\n draft,\n status,\n loading,\n saving,\n dirty,\n conflict,\n notice,\n onChange: (key, value) => {\n edited.current = true;\n setDraft((current) => ({ ...current, [key]: value }));\n setNotice('Unsaved changes.');\n },\n onSave: () => {\n void save();\n },\n onDiscard: () => {\n edited.current = false;\n if (saved) setDraft(saved.draft);\n setNotice('Draft discarded. Saved settings are unchanged.');\n },\n onReload: () => {\n if (!busy.current) void load();\n },\n };\n}\n","import {\n Button,\n Checkbox,\n Input,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n SettingsActions,\n SettingsCard,\n SettingsField,\n SettingsHeader,\n SettingsNote,\n SettingsPage,\n SettingsRow,\n SettingsRowDescription,\n SettingsRowText,\n SettingsRowTitle,\n SettingsSection,\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@agimon-ai/po-web-components';\nimport type { ReactNode } from 'react';\n\nimport type { IosSettingsViewProps } from '../../../../types/iosSettings';\nimport { physicalAvailabilityNote, simulatorOwnershipNote, poolFields } from '../_lib/settingsModel';\n\nexport function IosSettingsView({\n children,\n draft,\n status,\n loading,\n saving,\n dirty,\n conflict,\n notice,\n onChange: change,\n onSave,\n onDiscard,\n onReload,\n}: IosSettingsViewProps & { children?: ReactNode }) {\n const blocked = loading || saving;\n const simulatorFields = poolFields.slice(0, 2);\n const advancedFields = poolFields.slice(2);\n const phones = [\n ...(status?.phones ?? []),\n ...Object.keys(draft.availability)\n .filter((udid) => !status?.phones.some((phone) => phone.udid === udid))\n .map((udid) => ({ udid, name: udid, paired: false, connected: false, leased: false })),\n ];\n const runtimes = status?.runtimes ?? [];\n const models = [\n ...new Map(\n runtimes\n .filter((runtime) => runtime.identifier === draft.runtime || !draft.runtime)\n .flatMap((runtime) => runtime.models)\n .map((model) => [model.identifier, model]),\n ).values(),\n ];\n return (\n <div className=\"w-full bg-po-bg font-sans text-po-text\">\n <SettingsPage className=\"mx-auto max-w-3xl\" aria-busy={loading || saving}>\n <SettingsHeader>\n {children}\n <SettingsNote role=\"status\">{notice}</SettingsNote>\n <SettingsNote>\n {status?.applied\n ? `Active: Team ID ${status.applied.developmentTeam || 'not set'}, running limit ${status.applied.pool.maxBooted}, stored limit ${status.applied.pool.maxDevices}.`\n : 'Active configuration is unavailable.'}\n </SettingsNote>\n <Button variant=\"outline\" className=\"self-start\" onClick={onReload} disabled={blocked}>\n {conflict ? 'Review current settings' : !status ? 'Try again' : 'Refresh settings'}\n </Button>\n </SettingsHeader>\n\n <SettingsSection>\n <SettingsSectionHeader>\n <SettingsSectionTitle>Development signing</SettingsSectionTitle>\n </SettingsSectionHeader>\n <SettingsCard>\n <SettingsField\n id=\"ios-team-id\"\n label=\"Apple Development Team ID\"\n description=\"Used to sign Po’s physical-device runner. Not an Apple account sign-in.\"\n >\n <Input\n id=\"ios-team-id\"\n className=\"font-mono\"\n value={draft.teamId}\n disabled={blocked}\n onChange={(event) => change('teamId', event.target.value)}\n aria-describedby=\"ios-team-status\"\n />\n </SettingsField>\n </SettingsCard>\n <SettingsNote id=\"ios-team-status\">\n Signing has not been checked. Saving a Team ID does not check certificates, provisioning or build\n installation eligibility.\n </SettingsNote>\n </SettingsSection>\n\n <SettingsSection>\n <SettingsSectionHeader>\n <SettingsSectionTitle>Physical iPhones</SettingsSectionTitle>\n </SettingsSectionHeader>\n <SettingsCard>\n {status?.inventoryError ? <SettingsNote>{status.inventoryError}</SettingsNote> : null}\n {!status ? <SettingsNote>Phone inventory is unavailable. Try again to reconnect.</SettingsNote> : null}\n {status && !status.inventoryError && !phones.length ? (\n <SettingsNote>No physical phones are visible.</SettingsNote>\n ) : null}\n {phones.map((phone) => (\n <SettingsRow key={phone.udid}>\n <SettingsRowText>\n <SettingsRowTitle>\n <label htmlFor={`ios-phone-${phone.udid}`}>{phone.name || phone.udid}: available to Po</label>\n </SettingsRowTitle>\n <SettingsRowDescription>\n {phone.paired ? 'Paired' : 'Not paired'} · {phone.connected ? 'Reachable' : 'Offline'}\n {phone.leased ? ' · In use' : ''}. Availability applies to this phone only.\n </SettingsRowDescription>\n </SettingsRowText>\n <Checkbox\n id={`ios-phone-${phone.udid}`}\n checked={(draft.availability[phone.udid] ?? 'available') === 'available'}\n disabled={blocked}\n onCheckedChange={(checked) =>\n change('availability', {\n ...draft.availability,\n [phone.udid]: checked === true ? 'available' : 'excluded',\n })\n }\n aria-describedby=\"ios-physical-note\"\n />\n </SettingsRow>\n ))}\n </SettingsCard>\n <SettingsNote id=\"ios-physical-note\">{physicalAvailabilityNote}</SettingsNote>\n </SettingsSection>\n\n <SettingsSection>\n <SettingsSectionHeader>\n <SettingsSectionTitle>Simulator pool</SettingsSectionTitle>\n </SettingsSectionHeader>\n <SettingsCard>\n {simulatorFields.map((field) => (\n <SettingsField key={field.key} id={`ios-${field.key}`} label={field.label} description={field.detail}>\n <Input\n id={`ios-${field.key}`}\n inputMode=\"numeric\"\n value={draft[field.key]}\n disabled={blocked}\n onChange={(event) => change(field.key, event.target.value)}\n />\n </SettingsField>\n ))}\n {(['model', 'runtime'] as const).map((key) => (\n <SettingsField\n key={key}\n id={`ios-${key}`}\n label={key === 'model' ? 'Default model' : 'Default runtime'}\n description=\"Used for the next simulator Po creates.\"\n >\n <Select\n value={draft[key] || '__automatic__'}\n disabled={blocked}\n onValueChange={(value) => change(key, value === '__automatic__' ? '' : value)}\n >\n <SelectTrigger id={`ios-${key}`}>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"__automatic__\">Automatic</SelectItem>\n {draft[key] &&\n !(key === 'model' ? models : runtimes).some((item) => item.identifier === draft[key]) ? (\n <SelectItem value={draft[key]}>{draft[key]} (not discovered)</SelectItem>\n ) : null}\n {(key === 'model' ? models : runtimes).map((item) => (\n <SelectItem\n key={item.identifier}\n value={item.identifier}\n disabled={'isAvailable' in item && !item.isAvailable}\n >\n {item.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </SettingsField>\n ))}\n </SettingsCard>\n <SettingsNote>\n {simulatorOwnershipNote}{' '}\n {status?.runtimeError ??\n (!status ? 'Model and runtime discovery is unavailable.' : 'Choices use discovered identifiers.')}\n </SettingsNote>\n <details className=\"group\">\n <summary className=\"cursor-pointer rounded py-2 text-base font-medium text-po-dim outline-none focus-visible:ring-2 focus-visible:ring-po-green\">\n Advanced pool settings\n </summary>\n <SettingsCard className=\"mt-3\">\n {advancedFields.map((field) => (\n <SettingsField key={field.key} id={`ios-${field.key}`} label={field.label} description={field.detail}>\n <Input\n id={`ios-${field.key}`}\n inputMode=\"numeric\"\n value={draft[field.key]}\n disabled={blocked}\n onChange={(event) => change(field.key, event.target.value)}\n />\n </SettingsField>\n ))}\n </SettingsCard>\n </details>\n </SettingsSection>\n\n <div className=\"flex flex-col gap-3\">\n <SettingsActions>\n <Button variant=\"primary\" disabled={blocked || !dirty || conflict} onClick={onSave}>\n {saving ? 'Saving…' : 'Save changes'}\n </Button>\n <Button variant=\"ghost\" disabled={blocked || !dirty} onClick={onDiscard}>\n Discard changes\n </Button>\n </SettingsActions>\n <SettingsNote>\n Changes require an iOS service restart. Saving never restarts a service or interrupts an active lease.\n </SettingsNote>\n </div>\n </SettingsPage>\n </div>\n );\n}\n","import type { SettingsPanelProps } from '@agimon-ai/po-core/web';\nimport { useStore } from '@tanstack/react-store';\n\nimport { settingsRuntime } from '../_lib/settingsRuntime';\nimport { useIosSettings } from '../_lib/useIosSettings';\nimport { IosSettingsView } from './IosSettingsView';\n\nexport function IosSettingsPanel(props: SettingsPanelProps) {\n const invoke = useStore(settingsRuntime.store, (state) => state);\n return <IosSettingsView {...useIosSettings(props, invoke)} />;\n}\n","import { defineSettingsPanel } from '@agimon-ai/po-core/web';\n\nimport { IosSettingsPanel } from './_components/IosSettingsPanel';\n\nexport default defineSettingsPanel({\n label: 'iOS',\n detail: 'Global signing, phone availability and simulator pool settings.',\n order: 65,\n component: IosSettingsPanel,\n});\n","/** JSON-only iOS UI contracts. Lease ownership and paths are resolved by the server. */\nexport const iosActivityChannel = 'ios_activity';\nexport const iosUiService = 'ios';\nexport const iosActivityReaderEvent = 'po-ios:activity-reader';\n\nexport interface IosDeviceView {\n id: string;\n name: string;\n kind: 'simulator' | 'device';\n detail: string;\n state: 'owned' | 'other-session' | 'available' | 'disconnected';\n /** Only present for a lease owned by this session's root. */\n leaseId?: string;\n capture: 'available' | 'unsupported';\n}\n\nexport interface IosBuildView {\n id: string;\n name: string;\n size: number;\n /** Durable artifact-relative path, never a bearer URL. */\n artifactPath: string;\n registeredAt: string;\n}\n\nexport interface IosActivityPayload {\n supported: boolean;\n devices: IosDeviceView[];\n build?: IosBuildView;\n error?: string;\n}\n\nexport type IosFrameReply =\n | { state: 'ok'; src: string; hash: string; capturedAt: number }\n | { state: 'unchanged'; hash: string; capturedAt: number }\n | { state: 'released' }\n | { state: 'capture-unavailable'; message: string }\n | { state: 'error'; message: string };\n\nexport type IosBuildShareReply =\n | { ok: true; url: string; expiresAt: number }\n | { ok: false; reason: 'remote-off' | 'changed' | 'missing' | 'unavailable'; message: string };\n","import { defineGlobalStore, defineSessionStore, type WebPluginRuntime } from '@agimon-ai/po-core/web';\nimport { useStore } from '@tanstack/react-store';\n\nimport {\n iosActivityChannel as channel,\n iosUiService,\n type IosActivityPayload,\n type IosBuildShareReply,\n type IosFrameReply,\n} from '../../../../../types/iosUi';\n\nexport const iosActivity = defineSessionStore<IosActivityPayload>({ supported: false, devices: [] });\n\nexport function useIosActivity(sessionId: string | null): IosActivityPayload {\n return useStore(iosActivity.store, (state) => iosActivity.select(state, sessionId));\n}\n\nexport const iosActivityChannel = iosActivity.channel<IosActivityPayload>({\n channel,\n parse(input) {\n if (typeof input !== 'object' || input === null) return null;\n const value = input as IosActivityPayload;\n if (typeof value.supported !== 'boolean' || !Array.isArray(value.devices)) return null;\n if (\n !value.devices.every(\n (device) =>\n device &&\n typeof device.id === 'string' &&\n typeof device.name === 'string' &&\n typeof device.detail === 'string' &&\n ['simulator', 'device'].includes(device.kind) &&\n ['owned', 'other-session', 'available', 'disconnected'].includes(device.state) &&\n ['available', 'unsupported'].includes(device.capture) &&\n (device.leaseId === undefined || typeof device.leaseId === 'string'),\n )\n )\n return null;\n if (\n value.build &&\n (typeof value.build.id !== 'string' ||\n typeof value.build.name !== 'string' ||\n typeof value.build.artifactPath !== 'string' ||\n typeof value.build.size !== 'number' ||\n typeof value.build.registeredAt !== 'string')\n )\n return null;\n // Reconstruct the admitted DTO. Bearer URLs and other wire fields never enter the store.\n return {\n supported: value.supported,\n devices: value.devices.map(({ id, name, detail, kind, state, capture, leaseId }) => ({\n id,\n name,\n detail,\n kind,\n state,\n capture,\n ...(state === 'owned' && leaseId ? { leaseId } : {}),\n })),\n ...(value.build\n ? {\n build: {\n id: value.build.id,\n name: value.build.name,\n size: value.build.size,\n artifactPath: value.build.artifactPath,\n registeredAt: value.build.registeredAt,\n },\n }\n : {}),\n ...(typeof value.error === 'string' ? { error: value.error } : {}),\n };\n },\n reduce: (_current, payload) => payload,\n});\n\nexport const iosActivitySource = {\n subscribe(listener: () => void) {\n const subscription = iosActivity.store.subscribe(listener);\n return () => subscription.unsubscribe();\n },\n isActive(sessionId: string | null) {\n return iosActivity.select(iosActivity.store.state, sessionId).devices.some((device) => device.state === 'owned');\n },\n};\n\nconst invoker = defineGlobalStore<WebPluginRuntime['invokeServerMethod'] | undefined>(undefined);\n\nexport function startIosRuntime(runtime: WebPluginRuntime): () => void {\n const invoke: WebPluginRuntime['invokeServerMethod'] = (call) => runtime.invokeServerMethod(call);\n invoker.update(() => invoke);\n return () => invoker.update((current) => (current === invoke ? undefined : current));\n}\n\nasync function call(sessionId: string, method: 'frame' | 'shareBuild', input: unknown): Promise<unknown> {\n const invoke = invoker.store.state;\n if (!invoke) throw new Error('iOS is not connected.');\n return invoke({ mount: { scope: 'session', sessionId }, service: iosUiService, method, input });\n}\n\nexport async function fetchIosFrame(sessionId: string, leaseId: string, since?: string): Promise<IosFrameReply> {\n try {\n const reply = (await call(sessionId, 'frame', { leaseId, ...(since ? { since } : {}) })) as IosFrameReply;\n if (\n reply?.state === 'ok' &&\n typeof reply.src === 'string' &&\n /^data:image\\/png;base64,[A-Za-z0-9+/=]+$/.test(reply.src) &&\n typeof reply.hash === 'string' &&\n typeof reply.capturedAt === 'number'\n )\n return reply;\n if (\n reply?.state === 'unchanged' &&\n since !== undefined &&\n typeof reply.hash === 'string' &&\n typeof reply.capturedAt === 'number'\n )\n return reply;\n if (reply?.state === 'released') return { state: 'released' };\n if (reply?.state === 'capture-unavailable')\n return { state: 'capture-unavailable', message: 'Screen capture is unavailable.' };\n } catch {\n /* Transport failure is shown without retaining server errors or URLs. */\n }\n return { state: 'error', message: 'Could not reach the simulator. Waiting to reconnect.' };\n}\n\n/** Action-local only. The ephemeral URL is never written to plugin state or logs. */\nexport async function shareIosBuild(sessionId: string, buildId: string): Promise<IosBuildShareReply> {\n try {\n const reply = (await call(sessionId, 'shareBuild', { buildId })) as IosBuildShareReply;\n if (\n reply?.ok === true &&\n typeof reply.url === 'string' &&\n /^https?:\\/\\//.test(reply.url) &&\n typeof reply.expiresAt === 'number' &&\n reply.expiresAt > Date.now()\n )\n return reply;\n if (reply?.ok === false && reply.reason === 'remote-off')\n return { ok: false, reason: 'remote-off', message: 'Remote access is off. Open the build in Po locally.' };\n } catch {\n /* No bearer URLs in exception text. */\n }\n return {\n ok: false,\n reason: 'unavailable',\n message: 'The build is unavailable or changed. Try again when the current build appears.',\n };\n}\n","import type { IosDeviceView } from '../../../../../types/iosUi';\n\nexport const downloadLinkNote = 'Links expire after 10 minutes. Anyone with the link can download.';\n\nexport interface IosActivityViewProps {\n devices: { id: string; name: string; detail: string; canView: boolean }[];\n build?: { name: string; detail: string };\n details: { note: string; action: string; blocked: boolean };\n install: { note: string; action: string; blocked: boolean };\n installExpanded?: boolean;\n notice?: string;\n footer?: string;\n busy?: boolean;\n canOpen?: boolean;\n onView: (id: string) => void;\n onDownload: () => void;\n onCopy: () => void;\n onOpen: () => void;\n onInstall: () => void;\n}\n\n/** Inventory is not permission to capture. Only an owned simulator lease can open. */\nexport function canViewDevice(device: IosDeviceView): boolean {\n return device.state === 'owned' && !!device.leaseId && device.kind === 'simulator' && device.capture === 'available';\n}\n\nexport function deviceDetail(device: IosDeviceView): string {\n const state =\n device.state === 'owned'\n ? 'This session'\n : device.state === 'other-session'\n ? 'Another session'\n : device.state === 'disconnected'\n ? 'Disconnected'\n : 'Available';\n return `${device.detail} · ${state}${device.capture === 'unsupported' ? ' · Screen capture unsupported' : ''}`;\n}\n","import { Button } from '@agimon-ai/po-web-components';\n\nimport { downloadLinkNote, type IosActivityViewProps } from '../_lib/iosViewModel';\n\nexport function IosActivityView({\n devices,\n build,\n details,\n install,\n notice,\n footer,\n installExpanded = false,\n busy = false,\n canOpen = false,\n onView,\n onDownload,\n onCopy,\n onOpen,\n onInstall,\n}: IosActivityViewProps) {\n return (\n <section aria-label=\"iOS Activity\" className=\"w-full max-w-sm space-y-4 text-base text-po-text\">\n <div className=\"space-y-3\">\n {devices.length === 0 ? (\n <p className=\"text-sm text-po-dim\">No device is leased to this session.</p>\n ) : (\n devices.map((device) => (\n <div key={device.id} className=\"flex flex-wrap items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <p className=\"font-semibold\">{device.name}</p>\n <p className=\"text-sm text-po-dim\">{device.detail}</p>\n </div>\n {device.canView && (\n <Button size=\"sm\" onClick={() => onView(device.id)}>\n View screen\n </Button>\n )}\n </div>\n ))\n )}\n </div>\n {build && (\n <div className=\"space-y-3 border-t border-po-border pt-4\">\n <div>\n <h3 className=\"font-semibold text-po-hi\">Latest build</h3>\n <p className=\"mt-2 break-all font-mono\">{build.name}</p>\n <p className=\"text-sm text-po-dim\">{build.detail}</p>\n </div>\n <p className=\"text-sm text-po-dim\">{details.note}</p>\n {!details.blocked && <p className=\"text-sm text-po-dim\">{downloadLinkNote}</p>}\n <Button className=\"w-full\" variant=\"primary\" disabled={details.blocked} loading={busy} onClick={onDownload}>\n {details.action}\n </Button>\n <div className=\"flex flex-wrap gap-2\">\n <Button size=\"sm\" variant=\"link\" disabled={details.blocked} onClick={onCopy}>\n Copy download link\n </Button>\n <Button size=\"sm\" variant=\"link\" disabled={!canOpen} onClick={onOpen}>\n Open in Po\n </Button>\n </div>\n <details className=\"text-sm\" open={installExpanded}>\n <summary className=\"cursor-pointer rounded-sm text-po-dim focus-visible:outline-2 focus-visible:outline-po-green\">\n Install on iPhone\n </summary>\n <div className=\"mt-3 space-y-2\">\n <p className=\"text-po-dim\">{install.note}</p>\n <Button size=\"sm\" disabled={install.blocked} onClick={onInstall}>\n {install.action}\n </Button>\n </div>\n </details>\n </div>\n )}\n {notice && (\n <p role=\"status\" className=\"text-sm text-po-blue\">\n {notice}\n </p>\n )}\n {footer && <p className=\"text-sm text-po-dim\">{footer}</p>}\n </section>\n );\n}\n","import type { IosFrameReply } from '../../../../../types/iosUi';\n\n/** Serial visible-reader polling. Late replies after cleanup are never delivered. */\nexport function pollIosFrames(\n fetchFrame: (since?: string) => Promise<IosFrameReply>,\n receive: (reply: IosFrameReply) => void,\n): () => void {\n let stopped = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n let hash: string | undefined;\n const tick = async () => {\n let reply: IosFrameReply;\n try {\n reply = await fetchFrame(hash);\n } catch {\n reply = { state: 'error', message: 'Could not reach the simulator.' };\n }\n if (stopped) return;\n if (reply.state === 'ok') hash = reply.hash;\n else if (reply.state === 'error') hash = undefined;\n receive(reply);\n if (reply.state !== 'released' && reply.state !== 'capture-unavailable') timer = setTimeout(() => void tick(), 750);\n };\n void tick();\n return () => {\n stopped = true;\n clearTimeout(timer);\n };\n}\n","import { Button } from '@agimon-ai/po-web-components';\nimport type { ReactNode } from 'react';\n\nexport function IosDeviceView({\n name,\n status,\n note,\n frame,\n controls,\n composer,\n onClose,\n}: {\n name: string;\n status: string;\n note: string;\n frame: ReactNode;\n controls?: ReactNode;\n composer?: ReactNode;\n onClose?: () => void;\n}) {\n return (\n <div className=\"flex h-full min-h-96 w-full flex-col bg-po-bg text-base text-po-text\">\n <div className=\"flex flex-wrap items-center justify-between gap-2 border-b border-po-border bg-po-panel px-4 py-3\">\n <div>\n <h2 className=\"font-semibold text-po-hi\">{name}</h2>\n <p className=\"text-sm text-po-dim\">View only · {status}</p>\n </div>\n {onClose && (\n <Button size=\"sm\" onClick={onClose}>\n Close view\n </Button>\n )}\n </div>\n <div className=\"flex min-h-0 flex-1 flex-col items-center gap-3 overflow-auto bg-po-deep p-4\">\n <p role=\"status\" className=\"max-w-lg text-center text-sm text-po-dim\">\n {note}\n </p>\n {frame}\n {controls}\n </div>\n {composer}\n </div>\n );\n}\n","import type { TransientTab } from '@agimon-ai/po-core/web';\nimport type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { useEffect, useState } from 'react';\n\nimport type { IosDeviceView as Device, IosFrameReply } from '../../../../../types/iosUi';\nimport { useIosActivity, fetchIosFrame } from '../_lib/iosActivityStore';\nimport { pollIosFrames } from '../_lib/iosFrames';\nimport { canViewDevice } from '../_lib/iosViewModel';\nimport { IosDeviceView } from './IosDeviceView';\n\nexport function iosDeviceTab(device: Device): TransientTab {\n return {\n id: `ios-device-${device.id}-${device.leaseId}`,\n label: device.name,\n retainComposer: true,\n panel: (props: WebPluginSlotProps) => <IosDevicePanel key={props.sessionId} {...props} opened={device} />,\n };\n}\n\nfunction useVisible(): boolean {\n const [visible, setVisible] = useState(typeof document === 'undefined' || !document.hidden);\n useEffect(() => {\n const update = () => setVisible(!document.hidden);\n document.addEventListener('visibilitychange', update);\n return () => document.removeEventListener('visibilitychange', update);\n }, []);\n return visible;\n}\n\nexport function IosDevicePanel({ sessionId, opened, closeTransientTab }: WebPluginSlotProps & { opened: Device }) {\n const activity = useIosActivity(sessionId);\n const device = activity.devices.find((item) => item.id === opened.id);\n const owned = !!device && canViewDevice(device) && device.leaseId === opened.leaseId;\n const visible = useVisible();\n const [frame, setFrame] = useState<string>();\n const [reply, setReply] = useState<IosFrameReply>();\n const released = reply?.state === 'released';\n const unavailable = reply?.state === 'capture-unavailable';\n useEffect(() => {\n setFrame(undefined);\n if (!sessionId || !owned || !visible || released || unavailable || !opened.leaseId) return;\n return pollIosFrames(\n (since) => fetchIosFrame(sessionId, opened.leaseId!, since),\n (next) => {\n setReply(next);\n if (next.state === 'ok') setFrame(next.src);\n else if (next.state === 'released' || next.state === 'capture-unavailable' || next.state === 'error')\n setFrame(undefined);\n },\n );\n }, [sessionId, owned, visible, released, unavailable, opened.leaseId]);\n const status =\n !owned || released\n ? 'Device released or ownership changed'\n : unavailable\n ? 'Screen capture unavailable'\n : !visible\n ? 'Capture paused while hidden'\n : reply?.state === 'error'\n ? 'Connection unavailable'\n : frame\n ? 'Updated just now'\n : 'Waiting for first frame';\n const pixels = owned && visible && !released && !unavailable ? frame : undefined;\n return (\n <IosDeviceView\n name={`${opened.name}${owned && !released ? ' · This session' : ''}`}\n status={status}\n note={owned && !released ? 'View only. Po controls this session’s simulator.' : 'View only.'}\n onClose={() => closeTransientTab(`ios-device-${opened.id}-${opened.leaseId}`)}\n frame={\n pixels ? (\n <img src={pixels} alt=\"Current simulator screen\" className=\"max-h-full w-60 shrink-0 object-contain\" />\n ) : (\n <div className=\"flex min-h-48 w-full max-w-sm flex-1 items-center justify-center rounded-md border border-po-border p-6 text-center text-po-dim\">\n {status}\n </div>\n )\n }\n />\n );\n}\n","import type { TransientTab, WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useIosActivity, shareIosBuild } from '../_lib/iosActivityStore';\nimport { canViewDevice, deviceDetail } from '../_lib/iosViewModel';\nimport { IosActivityView } from './IosActivityView';\nimport { iosDeviceTab } from './IosDevicePanel';\n\nexport function iosActivityTab(): TransientTab {\n return { id: 'ios-activity', label: 'iOS', panel: IosActivityPanel };\n}\n\nexport function IosActivityPanel(props: WebPluginSlotProps) {\n const activity = useIosActivity(props.sessionId);\n const [busy, setBusy] = useState(false);\n const [notice, setNotice] = useState('');\n const mounted = useRef(true);\n const currentBuild = useRef(`${props.sessionId}:${activity.build?.id}`);\n currentBuild.current = `${props.sessionId}:${activity.build?.id}`;\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n const build = activity.build;\n const artifactTab = build ? props.fileTabFor(`artifact:${build.artifactPath}`) : undefined;\n const share = async (copy: boolean) => {\n if (!props.sessionId || !build || busy) return;\n setBusy(true);\n setNotice('');\n try {\n const reply = await shareIosBuild(props.sessionId, build.id);\n if (!mounted.current || currentBuild.current !== `${props.sessionId}:${build.id}`) return;\n if (!reply.ok) {\n setNotice(reply.message);\n return;\n }\n if (copy) {\n await navigator.clipboard.writeText(reply.url);\n if (mounted.current) setNotice('Download link copied. Anyone with the link can download for 10 minutes.');\n } else {\n const anchor = document.createElement('a');\n anchor.href = reply.url;\n anchor.download = build.name;\n anchor.rel = 'noopener';\n document.body.append(anchor);\n anchor.click();\n anchor.remove();\n }\n } catch {\n if (mounted.current) setNotice('The download handoff was unavailable. Try again or open the build in Po.');\n } finally {\n if (mounted.current) setBusy(false);\n }\n };\n return (\n <IosActivityView\n devices={activity.devices.map((device) => ({\n id: device.id,\n name: device.name,\n detail: deviceDetail(device),\n canView: canViewDevice(device),\n }))}\n build={build ? { name: build.name, detail: `${(build.size / 1024 / 1024).toFixed(1)} MB` } : undefined}\n details={{\n note:\n activity.error ??\n (!activity.supported\n ? 'iOS is unavailable on this host.'\n : !build\n ? 'No build is registered for this session.'\n : 'Download this build without connecting a device.'),\n action: busy ? 'Preparing link' : 'Download build',\n blocked: !build || busy,\n }}\n install={{\n note: 'Direct install is unavailable. Compatible signing, registered phone eligibility and HTTPS installation have not been verified.',\n action: 'Install unavailable',\n blocked: true,\n }}\n notice={notice}\n busy={busy}\n canOpen={!!artifactTab}\n footer={\n build && !artifactTab\n ? 'Open in Po is unavailable because this host cannot preview the build artifact.'\n : undefined\n }\n onView={(id) => {\n const device = activity.devices.find((item) => item.id === id);\n if (device && canViewDevice(device)) props.openTransientTab(iosDeviceTab(device));\n }}\n onDownload={() => void share(false)}\n onCopy={() => void share(true)}\n onOpen={() => {\n if (artifactTab) props.openTransientTab(artifactTab);\n }}\n onInstall={() => {}}\n />\n );\n}\n","import { defineActivityGroup } from '@agimon-ai/po-core/web';\nimport { ActivityIcon } from '@agimon-ai/po-web-components';\n\nimport { iosActivityTab } from '../_components/IosActivityPanel';\nimport { iosActivitySource } from '../_lib/iosActivityStore';\nexport default defineActivityGroup({\n keys: 'g i',\n icon: ActivityIcon,\n activeSource: iosActivitySource,\n marksBackgroundWork: false,\n order: 46,\n transientTab: iosActivityTab,\n});\n","import { defineChannelFile } from '@agimon-ai/po-core/web';\n\nimport { iosActivityChannel } from '../_lib/iosActivityStore';\nexport default defineChannelFile(iosActivityChannel);\n","import { defineFill } from '@agimon-ai/po-core/web';\n\nimport { IosActivityPanel } from '../_components/IosActivityPanel';\nexport default defineFill({ component: IosActivityPanel });\n","import { defineWebLifecycle } from '@agimon-ai/po-core/web';\n\nimport { startIosRuntime } from '../_lib/iosActivityStore';\nexport default defineWebLifecycle(startIosRuntime);\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport lifecycleStart from '../src/extensions/(frontend)/lifecycle/start.web';\nimport settingIos from '../src/extensions/(frontend)/setting/ios.panel.web';\nimport activityGroupIos from '../src/extensions/workspaces/sessions/(frontend)/activity-group/ios.web';\nimport channelIosActivity from '../src/extensions/workspaces/sessions/(frontend)/channel/ios-activity.web';\nimport fillIos from '../src/extensions/workspaces/sessions/(frontend)/fill/Ios.activity.ios.web';\nimport lifecycleStart2 from '../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const webPlugin = defineWebPlugin({\n id: 'ios',\n global: {\n get settingsPanels(): WebPluginContributions['settingsPanels'] { return [via({ id: 'ios' }, settingIos)]; },\n get start(): WebPluginContributions['start'] { return lifecycleStart; },\n },\n session: {\n get activityGroups(): WebPluginContributions['activityGroups'] { return [via({ name: 'ios' }, activityGroupIos)]; },\n get channels(): WebPluginContributions['channels'] { return [via({ channel: 'ios_activity' }, channelIosActivity)]; },\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'activity.ios', id: 'ios' }, fillIos)]; },\n get start(): WebPluginContributions['start'] { return lifecycleStart2; },\n },\n});\n"],"mappings":";;;;;;AAEA,MAAa,kBAAkB,kBAAsE,KAAA,CAAS;AAE9G,SAAgB,qBAAqB,SAAuC;CAC1E,MAAM,UAAkD,SAAS,QAAQ,mBAAmB,IAAI;CAChG,gBAAgB,aAAa,MAAM;CACnC,aAAa,gBAAgB,QAAQ,YAAa,YAAY,SAAS,KAAA,IAAY,OAAQ;AAC7F;;;ACJA,IAAA,sBAAe,mBAAmB,oBAAoB;;;ACOtD,MAAa,oBAAoB;CAC/B,WAAW;CACX,WAAW;CACX,YAAY;CACZ,qBAAqB;CACrB,oBAAoB;AACtB;;;ACdA,MAAa,aAAa;CACxB;EAAE,KAAK;EAAc,MAAM;EAAa,OAAO;EAAiB,QAAQ;CAAsC;CAC9G;EACE,KAAK;EACL,MAAM;EACN,OAAO;EACP,QAAQ;CACV;CACA;EAAE,KAAK;EAAa,MAAM;EAAa,OAAO;EAAa,QAAQ;CAAiC;CACpG;EACE,KAAK;EACL,MAAM;EACN,OAAO;EACP,QAAQ;CACV;CACA;EACE,KAAK;EACL,MAAM;EACN,OAAO;EACP,QAAQ;CACV;AACF;AACA,MAAa,2BACX;AACF,MAAa,yBAAyB;AACtC,MAAa,YAAY,UAAkB,uDAAuD,KAAK,KAAK;AAC5G,MAAa,eAAe;CAC1B,QAAQ;EAAC;EAAO;E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"}
|
package/dist/index.cjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "@agimon-ai/po-db";
|
|
2
|
+
import { Static, Type } from "typebox";
|
|
2
3
|
//#region src/services/simctl/type.d.ts
|
|
3
4
|
interface SimDevice {
|
|
4
5
|
readonly udid: string;
|
|
@@ -222,6 +223,7 @@ interface PoolStatus {
|
|
|
222
223
|
}
|
|
223
224
|
interface PhysicalDeviceStatus extends PhysicalDevice {
|
|
224
225
|
readonly leased: boolean;
|
|
226
|
+
readonly availability: 'available' | 'excluded';
|
|
225
227
|
/** Present only on the caller's own lease. */
|
|
226
228
|
readonly leaseId?: string;
|
|
227
229
|
}
|
|
@@ -252,12 +254,60 @@ interface IosPool {
|
|
|
252
254
|
dispose(): Promise<void>;
|
|
253
255
|
}
|
|
254
256
|
//#endregion
|
|
257
|
+
//#region src/schemas/iosSettingsMethods.d.ts
|
|
258
|
+
/** Read-only activation snapshot and discovered inventory. Never starts signing, leases or runtimes. */
|
|
259
|
+
declare const iosSettingsMethod: import("@agimon-ai/po-core/pluginProtocol").PoPluginMethod<Type.TObject<{}>, Type.TObject<{
|
|
260
|
+
active: Type.TBoolean;
|
|
261
|
+
configFile: Type.TString;
|
|
262
|
+
applied: Type.TOptional<Type.TObject<{
|
|
263
|
+
pool: Type.TObject<{
|
|
264
|
+
minBooted: Type.TNumber;
|
|
265
|
+
maxBooted: Type.TNumber;
|
|
266
|
+
maxDevices: Type.TNumber;
|
|
267
|
+
idleShutdownMinutes: Type.TNumber;
|
|
268
|
+
waitTimeoutSeconds: Type.TNumber;
|
|
269
|
+
deviceType: Type.TOptional<Type.TString>;
|
|
270
|
+
runtime: Type.TOptional<Type.TString>;
|
|
271
|
+
}>;
|
|
272
|
+
developmentTeam: Type.TOptional<Type.TString>;
|
|
273
|
+
availability: Type.TRecord<"^.*$", Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"excluded">]>>;
|
|
274
|
+
}>>;
|
|
275
|
+
phones: Type.TArray<Type.TObject<{
|
|
276
|
+
udid: Type.TString;
|
|
277
|
+
name: Type.TString;
|
|
278
|
+
paired: Type.TBoolean;
|
|
279
|
+
connected: Type.TBoolean;
|
|
280
|
+
leased: Type.TBoolean;
|
|
281
|
+
availability: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"excluded">]>;
|
|
282
|
+
}>>;
|
|
283
|
+
runtimes: Type.TArray<Type.TObject<{
|
|
284
|
+
identifier: Type.TString;
|
|
285
|
+
name: Type.TString;
|
|
286
|
+
isAvailable: Type.TBoolean;
|
|
287
|
+
models: Type.TArray<Type.TObject<{
|
|
288
|
+
identifier: Type.TString;
|
|
289
|
+
name: Type.TString;
|
|
290
|
+
}>>;
|
|
291
|
+
}>>;
|
|
292
|
+
inventoryError: Type.TOptional<Type.TString>;
|
|
293
|
+
runtimeError: Type.TOptional<Type.TString>;
|
|
294
|
+
}>>;
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/types/iosSettings.d.ts
|
|
297
|
+
type IosSettingsStatus = Static<typeof iosSettingsMethod.output>;
|
|
298
|
+
/** Published by the elected activation beside the current pool, withdrawn with it. */
|
|
299
|
+
interface IosSettingsRuntime {
|
|
300
|
+
readonly configFile: string;
|
|
301
|
+
readonly applied: NonNullable<IosSettingsStatus['applied']>;
|
|
302
|
+
}
|
|
303
|
+
//#endregion
|
|
255
304
|
//#region src/schemas/contracts.d.ts
|
|
256
305
|
/** Bound once at the global level; every session leases from the same pool. */
|
|
257
306
|
export declare const IOS_POOL_CONTRACT: import("@agimon-ai/po-core/serverPlugin").PoServiceContract<IosPool>;
|
|
258
307
|
declare module '@deepseek-ai/cordis' {
|
|
259
308
|
interface Context {
|
|
260
309
|
'po/ios-pool': IosPool;
|
|
310
|
+
'po/ios-settings': IosSettingsRuntime;
|
|
261
311
|
}
|
|
262
312
|
}
|
|
263
313
|
//#endregion
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/services/simctl/type.ts","../src/services/devicectl/type.ts","../src/services/simHelper/type.ts","../src/services/deviceRunner/type.ts","../src/services/poolStore/type.ts","../src/services/devicePool/type.ts","../src/schemas/contracts.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/services/simctl/type.ts","../src/services/devicectl/type.ts","../src/services/simHelper/type.ts","../src/services/deviceRunner/type.ts","../src/services/poolStore/type.ts","../src/services/devicePool/type.ts","../src/schemas/iosSettingsMethods.ts","../src/types/iosSettings.ts","../src/schemas/contracts.ts"],"mappings":";;;UAgBiB;WACN;WACA;;WAEA;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;WACA,+BAA+B;;UAGzB;WACN;WACA;;UAGM;WACN;WACA;;;UAIM;WACN;;EAET,WAAW,SAAS,cAAc;EAClC,YAAY,SAAS,cAAc,QAAQ;EAC3C,aAAa,SAAS,cAAc,QAAQ;EAC5C,OAAO,cAAc,MAAM,YAAY,SAAS,cAAc;;EAE9D,KAAK,cAAc,SAAS,cAAc;EAC1C,SAAS,cAAc,SAAS,cAAc;EAC9C,YAAY,SAAS,cAAc;EACnC,MAAM,cAAc,SAAS,cAAc;EAC3C,OAAO,cAAc,SAAS,cAAc;EAC5C,QAAQ,cAAc,iBAAiB,SAAS,cAAc;EAC9D,UAAU,cAAc,kBAAkB,SAAS,cAAc;EACjE,OAAO,cAAc,kBAAkB,yBAAyB,SAAS,cAAc;;EAEvF,UAAU,cAAc,kBAAkB,SAAS,cAAc;EACjE,QAAQ,cAAc,aAAa,SAAS,cAAc;EAC1D,aAAa,cAAc,SAAS,cAAc;;EAElD,WAAW,cAAc,kBAAkB,mBAAmB,SAAS,cAAc;EACrF,KAAK,cAAc,OAAO,UAAU,SAAS,cAAc;EAC3D,WAAW,iBAAiB,SAAS,cAAc;;;;;UCxEpC;;WAEN;;WAEA;WACA;WACA;WACA;WACA;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E1D,QAAQ,iBAAiB,QAAQ;;EAEjC,cAAc,eAAe,cAAc,gBAAgB,SAAS,cAAc,QAAQ;;EAE1F,aAAa,eAAe,mBAAmB,QAAQ;;EAEvD,UAAU,GAAG,eAAe,6BAA6B,OAAO,OAAO,aAAa,QAAQ,KAAK,QAAQ;EACzG,OAAO,gBAAgB,QAAQ;EAC/B,QAAQ,eAAe,kBAAkB,QAAQ,YAAY,QAAQ;EACrE,WAAW,gBAAgB;EAC3B,gBAAgB,cAAc,mBAAmB;EACjD,gBAAgB,cAAc,mBAAmB;;EAEjD,QAAQ;EACR,WAAW;;;;;cC1GA,+DAAiB,eAAA,KAAA,aAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCVlB,oBAAoB,cAAc,kBAAkB;;UAE/C;WACN;WACA,SAAS,YAAY;;;;;qBCFnB,6DAAiB,kBAAA;;YAKlB;IACR,eAAe;IACf,mBAAmB"}
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as IOS_POOL_CONTRACT } from "./contracts-
|
|
1
|
+
export { t as IOS_POOL_CONTRACT } from "./contracts-BQjfOjy0.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-ios",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.21",
|
|
4
4
|
"description": "Leased iOS simulators and accessibility-first app control for Po sessions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coding-agent",
|
|
@@ -10,8 +10,16 @@
|
|
|
10
10
|
"typescript"
|
|
11
11
|
],
|
|
12
12
|
"homepage": "https://agimon.ai",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/AgiFlow/po/issues"
|
|
15
|
+
},
|
|
13
16
|
"license": "BUSL-1.1",
|
|
14
17
|
"author": "Vuong Ngo",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/AgiFlow/po.git",
|
|
21
|
+
"directory": "layers/ios/po-ios"
|
|
22
|
+
},
|
|
15
23
|
"files": [
|
|
16
24
|
"dist",
|
|
17
25
|
"native/sim-helper/Package.swift",
|
|
@@ -43,29 +51,46 @@
|
|
|
43
51
|
"import": "./dist/apiContracts.mjs",
|
|
44
52
|
"require": "./dist/apiContracts.cjs"
|
|
45
53
|
},
|
|
54
|
+
"./extensions/native": {
|
|
55
|
+
"import": "./dist/extensions/native.mjs"
|
|
56
|
+
},
|
|
46
57
|
"./extensions/server": {
|
|
47
58
|
"types": "./dist/extensions/server.d.mts",
|
|
48
59
|
"import": "./dist/extensions/server.mjs",
|
|
49
60
|
"require": "./dist/extensions/server.cjs"
|
|
50
61
|
},
|
|
62
|
+
"./extensions/web": {
|
|
63
|
+
"import": "./dist/extensions/web.mjs"
|
|
64
|
+
},
|
|
51
65
|
"./package.json": "./package.json"
|
|
52
66
|
},
|
|
53
67
|
"publishConfig": {
|
|
54
68
|
"access": "public"
|
|
55
69
|
},
|
|
56
70
|
"dependencies": {
|
|
57
|
-
"@agimon-ai/po-
|
|
58
|
-
"@agimon-ai/po-
|
|
59
|
-
"@agimon-ai/po-
|
|
71
|
+
"@agimon-ai/po-artifact": "0.0.0-alpha.85",
|
|
72
|
+
"@agimon-ai/po-config": "0.0.0-alpha.86",
|
|
73
|
+
"@agimon-ai/po-core": "0.0.0-alpha.86",
|
|
74
|
+
"@agimon-ai/po-db": "0.0.0-alpha.86",
|
|
75
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.86",
|
|
60
76
|
"@deepseek-ai/cordis": "4.0.5",
|
|
77
|
+
"@tanstack/react-store": "0.11.2",
|
|
78
|
+
"react": "19.3.1",
|
|
61
79
|
"typebox": "1.4.2"
|
|
62
80
|
},
|
|
63
81
|
"devDependencies": {
|
|
64
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
65
|
-
"@agimon-ai/
|
|
82
|
+
"@agimon-ai/po-build": "0.0.0-alpha.86",
|
|
83
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.86",
|
|
84
|
+
"@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.86",
|
|
85
|
+
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.86",
|
|
66
86
|
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
67
87
|
"@types/node": "26.6.5",
|
|
88
|
+
"@types/react": "19.3.0",
|
|
68
89
|
"@vitest/coverage-v8": "5.0.4",
|
|
90
|
+
"jsdom": "30.1.2",
|
|
91
|
+
"react-dom": "19.3.1",
|
|
92
|
+
"react-native": "0.88.0",
|
|
93
|
+
"react-native-unistyles": "3.5.3",
|
|
69
94
|
"tsdown": "0.23.1",
|
|
70
95
|
"typescript": "7.0.2",
|
|
71
96
|
"vitest": "5.0.4"
|
|
@@ -81,6 +106,17 @@
|
|
|
81
106
|
"engines": {
|
|
82
107
|
"node": ">=24"
|
|
83
108
|
},
|
|
109
|
+
"poNative": {
|
|
110
|
+
"pluginId": "ios",
|
|
111
|
+
"channels": [
|
|
112
|
+
"ios_activity"
|
|
113
|
+
],
|
|
114
|
+
"client": "./dist/extensions/native.mjs",
|
|
115
|
+
"scopes": [
|
|
116
|
+
"global",
|
|
117
|
+
"session"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
84
120
|
"poServer": {
|
|
85
121
|
"entry": "./generated/server.ts",
|
|
86
122
|
"dist": "./dist/extensions/server.mjs",
|
|
@@ -105,10 +141,21 @@
|
|
|
105
141
|
]
|
|
106
142
|
}
|
|
107
143
|
},
|
|
144
|
+
"poWeb": {
|
|
145
|
+
"pluginId": "ios",
|
|
146
|
+
"channels": [
|
|
147
|
+
"ios_activity"
|
|
148
|
+
],
|
|
149
|
+
"client": "./dist/extensions/web.mjs",
|
|
150
|
+
"scopes": [
|
|
151
|
+
"global",
|
|
152
|
+
"session"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
108
155
|
"scripts": {
|
|
109
156
|
"build": "tsdown",
|
|
110
157
|
"test": "vitest --run",
|
|
111
|
-
"typecheck": "tsrs --noEmit",
|
|
158
|
+
"typecheck": "tsrs --noEmit && tsrs --noEmit -p tsconfig.web.json && tsrs --noEmit -p tsconfig.native.json",
|
|
112
159
|
"lint": "oxlint . && oxfmt . --check",
|
|
113
160
|
"fixcode": "oxlint . --fix && oxfmt ."
|
|
114
161
|
}
|
|
@@ -27,6 +27,21 @@ const { lines } = await ios.logs({ process: 'App', lastSeconds: 30 });
|
|
|
27
27
|
await ios.release();
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
## Register a produced build
|
|
31
|
+
|
|
32
|
+
Registration is explicit producer intent, never inferred from an `.ipa` extension or the artifact list.
|
|
33
|
+
Call `const { path } = await ios.buildDirectory()` for this session's host-owned artifact destination.
|
|
34
|
+
Save an already-produced build file under that directory, finish writing it, then call
|
|
35
|
+
`await ios.registerBuild({ artifactPath: 'App.ipa', name: 'My app.ipa' })` using a relative path.
|
|
36
|
+
The returned opaque ID and artifact reference are durable metadata, not a public URL.
|
|
37
|
+
Registration does not build, sign, release, install, or prove signed-IPA eligibility. Install remains unavailable
|
|
38
|
+
for this download handoff. Do not run signing or release commands unless separately authorized.
|
|
39
|
+
|
|
40
|
+
Download, Copy and Open are explicit person actions in Activity. Only those actions may request the
|
|
41
|
+
short-lived download link. Do not publish links during registration, put bearer URLs into logs, transcripts
|
|
42
|
+
or persistent state, or use ordinary `shareFile` to bypass its 25 MiB cap. If the file changes, disappears,
|
|
43
|
+
or the host refuses its ownership, register a newly completed build instead of retrying the old ID.
|
|
44
|
+
|
|
30
45
|
## Looking and acting
|
|
31
46
|
|
|
32
47
|
Prefer the accessibility tree to screenshots: it is smaller, exact, and gives you refs to act on.
|
|
@@ -67,7 +82,7 @@ await ios.release({ leaseId: phone.leaseId });
|
|
|
67
82
|
- Phone accessibility/input require `ios.device.developmentTeam` in global config, an unlocked Developer Mode phone and a USB cable. First use builds and installs a signed XCUITest runner, with a longer startup deadline. It listens only on USB link-local IPv4 and requires a per-run token. Without signing, basic app and console calls remain available.
|
|
68
83
|
- `observe`, `tap`, `type`, `swipe`, `waitFor` and `settle` use that runner. Observation selects a foreground app launched by this lease, otherwise SpringBoard. Launch the target app through `ios.launch` first, do not assume an app opened by tapping its icon becomes the observed target. Focus a text field before typing.
|
|
69
84
|
- Phone home, lock and Siri are explicitly unavailable. Native volume APIs exist but their effect and rotation are unverified. An explicit swipe from the bottom edge upward can leave an app. `screenshot`, `terminate` and `openUrl` remain simulator-only through this namespace.
|
|
70
|
-
- Native and real injected-platform-shell trials verified phone install, automatic runner startup, launch, observation, tap, focused typing, secure-value exclusion, swipe and app console capture. The first built-layer run exposed buffered launch status
|
|
85
|
+
- Native and real injected-platform-shell trials verified phone install, automatic runner startup, launch, observation, tap, focused typing, secure-value exclusion, swipe and app console capture. The first built-layer run exposed buffered launch status. After the fix, the approved built-layer rerun passed the supported workflow, console capture and sample/runner cleanup with no remaining lease. Its keyboard-up swipe changed visible rows but did not establish content scrolling; stronger scrolling was verified separately in the platform-shell trial. Do not call partial support complete.
|
|
71
86
|
- Phone `logs` returns the stdout, stderr and NSLog lines of the app last launched under the lease, not the system log. It refuses `process` and `subsystem`. Lines survive an app crash and are dropped on the next launch or release.
|
|
72
87
|
- Release stops and uninstalls the temporary XCUITest runner before freeing the lease. Other apps you installed stay on the phone, uninstall them first if the person wants that. If runner cleanup fails, the lease stays held: report it and retry release after resolving the error.
|
|
73
88
|
- Holding a phone and a simulator at once means two leases: pass `leaseId` to every call.
|