@agimon-ai/po-computer-use 0.0.0-alpha.193 → 0.0.0-alpha.194
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.
|
@@ -418,7 +418,6 @@ var desktop_permissions_panel_native_default = defineSettingsPanel({
|
|
|
418
418
|
var computer_use_native_default$1 = defineActivityGroup({
|
|
419
419
|
name: "computer-use",
|
|
420
420
|
keys: "c e",
|
|
421
|
-
order: 70,
|
|
422
421
|
statusKey: COMPUTER_USE_STATUS_KEY,
|
|
423
422
|
hideWhenEmpty: true,
|
|
424
423
|
marksBackgroundWork: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.mjs","names":["Badge","Button","DropdownMenu","DropdownMenuContent","DropdownMenuItem","DropdownMenuTrigger","fontOf","Panel","PoNativeTheme","StyleSheet","DESKTOP_PERMISSIONS","DesktopPermission","DesktopPermissionState","DesktopPermissionsViewState","COPY","Record","title","detail","accessibility","microphone","automation","LABEL","granted","denied","DesktopPermissionsView","state","remote","onAsk","onRefresh","permission","styles","page","sectionHead","sectionText","sectionTitle","status","asking","undefined","control","card","map","index","value","states","action","row","divider","rowHeading","rowTitle","error","create","theme","gap","spacing","uni__dependencies","flexDirection","alignItems","flex","minWidth","fontFamily","sans","fontSize","lg","lineHeight","fontWeight","semibold","color","colors","hi","sm","lineHeightRelaxed","dim","padding","overflow","flexWrap","base","flexShrink","borderTopWidth","hairlineWidth","borderTopColor","minHeight","alignSelf","styles","SettingsPanelProps","useCallback","useEffect","useRef","useState","AppState","DesktopPermission","readDesktopPermissions","DesktopPermissionsViewState","DesktopPermissionsView","DesktopPermissionsPanel","request","requestWithStepUp","state","setState","status","generation","busy","run","permission","current","version","undefined","asking","next","subscription","addEventListener","remove","WebPluginSlotProps","Button","CheckIcon","fontOf","PoNativeTheme","useCallback","useEffect","useState","useSyncExternalStore","StyleSheet","COMPUTER_USE_DEFAULT_DURATION_MS","computerUseChannelType","ComputerUseSessionView","computerUse","remaining","ms","seconds","Math","max","ceil","floor","String","padStart","ComputerUseView","state","error","onCancel","onStop","pending","phase","active","failure","message","expiresAt","undefined","now","setNow","Date","timer","setInterval","clearInterval","left","total","durationMs","controlled","target","scope","applicationName","styles","panel","header","title","artifact","status","row","check","text","dot","live","track","min","fill","width","detail","SessionPanel","sessionId","sendSessionFrame","subscribe","listener","subscription","store","unsubscribe","session","select","setError","type","payload","action","stop","ComputerUsePanel","props","create","theme","gap","spacing","uni__dependencies","flexDirection","alignItems","paddingBottom","borderBottomWidth","borderBottomColor","colors","flex","fontFamily","sans","fontSize","base","fontWeight","color","hi","height","borderRadius","backgroundColor","green","lineHeight","lineHeightRelaxed","overflow","justifyContent","sm","dim","red","styles","ToolMessageRenderProps","Badge","fontOf","MessageItemBody","MessageItemStatus","PoNativeTheme","StyleSheet","COMPUTER_ELEMENTS_PREVIEW","COMPUTER_LOGS_PREVIEW","COMPUTER_TOOL_COLLAPSED_LINES","ComputerElementView","ComputerFailureView","ComputerObservationView","ComputerResultView","ComputerRunView","computerResultHidden","computerResultView","computerResult","props","result","undefined","content","computerResultExpandable","view","isError","ComputerResultBody","expanded","toolName","output","running","testID","failure","kind","reason","lines","join","trim","outcomeUncertain","length","styles","stack","observation","run","sans","text","figure","strong","keep","applicationName","mono","faint","yield","bundleId","FailureBlock","done","completedActions","note","String","filter","Boolean","error","small","WindowLine","lead","windowTitle","dim","ElementRow","element","secure","role","includes","traits","enabled","row","label","ref","ObservationBlock","elements","shown","slice","hidden","chips","truncated","nextOffset","list","map","screenshotArtifact","RunBlock","figures","actions","observations","duration","logs","fields","field","key","value","line","index","TextLines","create","theme","gap","spacing","uni__dependencies","flexDirection","flexWrap","alignItems","minWidth","fontFamily","fontSize","base","lineHeight","sm","color","colors","fontWeight","semibold","red","flexShrink","maxWidth","marginLeft","styles","ToolMessageRenderProps","fontOf","MessageItem","MessageItemHeader","toolTone","PoNativeTheme","StyleSheet","computerActionCallParts","ComputerResultBody","computerResultExpandable","ComputerActionToolCard","props","toolName","args","running","isError","kind","target","expanded","styles","summary","undefined","sans","primary","length","detail","join","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","maxWidth","color","colors","text","dim","styles","ToolMessageRenderProps","fontOf","MessageItem","MessageItemHeader","toolTone","PoNativeTheme","StyleSheet","computerExecCallSummary","computerExecPathParts","ComputerResultBody","computerResultExpandable","ComputerExecToolCard","props","toolName","args","running","isError","path","expanded","styles","summary","folder","length","sans","primary","name","create","theme","flex","flexDirection","alignItems","minWidth","fontFamily","fontSize","base","lineHeight","uni__dependencies","flexShrink","color","colors","dim","maxWidth","text","styles","ToolMessageRenderProps","fontOf","MessageItem","MessageItemHeader","toolTone","PoNativeTheme","StyleSheet","computerStateCallSummary","ComputerResultBody","computerResultExpandable","ComputerStateToolCard","props","toolName","args","running","isError","expanded","styles","summary","sans","primary","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","text","settingDesktopPermissions","activityGroupComputerUse","channelComputerUse","fillComputerUse","toolComputerAction","toolComputerExec","toolComputerState"],"sources":["../../src/types/computerUseApi.ts","../../src/types/desktopPermissions.ts","../../src/types/apiRoutes.ts","../../src/extensions/(frontend)/setting/_lib/desktopPermissions.native.ts","../../src/extensions/(frontend)/setting/_components/DesktopPermissionsView.native.tsx","../../src/extensions/(frontend)/setting/_components/DesktopPermissionsPanel.native.tsx","../../src/extensions/(frontend)/setting/desktop-permissions.panel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/computerUseStore.native.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/computer-use.native.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerResultBody.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-action.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-state.native.tsx","../../generated/native.ts"],"sourcesContent":["export const API_BASE_PATH = 'computer-use';\nexport const computerUseChannelType = 'computer_use_state';\nexport const COMPUTER_USE_MODE_ID = 'computer-use';\nexport const COMPUTER_USE_STATUS_KEY = 'po-computer-use';\nexport const COMPUTER_USE_MODE_STATUS_KEY = 'po-computer-use-mode';\nexport const COMPUTER_USE_MAX_DURATION_MS = 1_800 * 1_000;\nexport const COMPUTER_USE_DEFAULT_DURATION_MS = 300 * 1_000;\n/** The session lengths a person can pick when granting control, up to the maximum. */\nexport const COMPUTER_USE_DURATION_CHOICES_MS = [\n COMPUTER_USE_DEFAULT_DURATION_MS,\n 900_000,\n COMPUTER_USE_MAX_DURATION_MS,\n] as const;\nexport const COMPUTER_USE_CONFIRMATION_WINDOW_MS = 2 * 60 * 1_000;\n\n/**\n * Every path this API answers on, below its mount.\n *\n * The typed route table in `./apiRoutes` is built from this, the dispatcher\n * reads that table, and the hub channel addresses the broker with these same\n * strings, so a route cannot move on one side alone.\n */\nexport const COMPUTER_USE_ROUTES = {\n artifact: '/artifact',\n agentState: '/agent/state',\n agentObserve: '/agent/observe',\n agentAction: '/agent/action',\n agentStop: '/agent/stop',\n hubState: '/hub/state',\n hubActivation: '/hub/activation',\n hubAuthorization: '/hub/authorization',\n hubNext: '/hub/next',\n hubComplete: '/hub/complete',\n hubStop: '/hub/stop',\n hubRequestStop: '/hub/request-stop',\n} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\n\n/** A consented trace extra, read through the same grant-bound host store as the recording. */\nexport interface ComputerUseTraceFileView {\n readonly artifactId: string;\n readonly sizeBytes: number;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseArtifactView {\n readonly artifactId: string;\n readonly status: 'ready' | 'failed';\n readonly sizeBytes?: number;\n readonly downloadUrl?: string;\n readonly previewUrl?: string;\n readonly actionCount?: number;\n readonly completedAt?: string;\n readonly trace?: ComputerUseTraceFileView;\n readonly windows?: readonly ComputerUseTraceFileView[];\n readonly failure?: { readonly code: string; readonly message: string };\n}\n\nexport interface ComputerUseSessionView {\n readonly sessionId: string;\n readonly revision: number;\n readonly wake: number;\n readonly phase: 'inactive' | 'awaiting_confirmation' | 'activating' | 'active' | 'stopping' | 'failed';\n readonly requestId?: string;\n readonly target?: Record<string, unknown>;\n readonly durationMs?: number;\n readonly expiresAt?: number;\n readonly failure?: { readonly code: string; readonly message: string };\n readonly artifact?: ComputerUseArtifactView;\n}\n\nexport interface ComputerUseActivationRequest {\n readonly requestId: string;\n readonly target?: Record<string, unknown>;\n readonly durationSeconds: number;\n readonly createdAt: number;\n readonly confirmationExpiresAt: number;\n /** Set by the session broker only after the person approves the saved request. */\n readonly confirmedAt?: number;\n /** True only when the person approved keeping a redacted trace and window images for this one window. */\n readonly traceConsent: boolean;\n readonly caller: { readonly locality: 'approval'; readonly approvalId: string };\n}\n\nexport interface ComputerUseBrokerRequest {\n readonly id: string;\n readonly operation: 'observe' | 'act';\n readonly payload?: unknown;\n readonly grantId: string;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseChannelPayload {\n readonly state: ComputerUseSessionView;\n readonly targets: readonly Record<string, unknown>[];\n readonly busy?: true;\n}\n\nexport type ComputerUseBrowserCommand = {\n readonly action: 'status' | 'stop';\n};\n","/** The mount's only path: GET reads the permission states, POST asks macOS for one. */\nexport const DESKTOP_PERMISSIONS_PATH = '/';\n\n/** The macOS privacy permissions Desktop reports, in the order the settings page shows them. */\nexport const DESKTOP_PERMISSIONS = [\n 'accessibility',\n 'screen-recording',\n 'microphone',\n 'automation',\n 'full-disk-access',\n] as const;\nexport type DesktopPermission = (typeof DESKTOP_PERMISSIONS)[number];\n\n/** `per-app` is Automation: macOS asks once for each app Po controls and reports no overall state. */\nexport type DesktopPermissionState = 'granted' | 'denied' | 'not-determined' | 'per-app';\nexport type DesktopPermissionStates = Record<DesktopPermission, DesktopPermissionState>;\n\nexport interface DesktopPermissionRequest {\n readonly permission: DesktopPermission;\n}\n\nexport function isDesktopPermission(value: unknown): value is DesktopPermission {\n return typeof value === 'string' && (DESKTOP_PERMISSIONS as readonly string[]).includes(value);\n}\n","import type { ApiResponseOf, ApiRoutes } from '@agimon-ai/po-core/web';\n\nimport {\n COMPUTER_USE_ROUTES,\n type ComputerUseActivationRequest,\n type ComputerUseBrokerRequest,\n type ComputerUseSessionView,\n} from './computerUseApi';\nimport { DESKTOP_PERMISSIONS_PATH, type DesktopPermissionStates } from './desktopPermissions';\n\n/**\n * This package's routes, as data.\n *\n * No scope and no base path: the build reads both off\n * `src/extensions/workspaces/sessions/(backend)/api/computer-use/`, so the\n * mount is stated once, by the folder that creates it.\n *\n * The paths come from `COMPUTER_USE_ROUTES` rather than being written out\n * again. That table already addressed the broker from the hub channel and from\n * the broker's own dispatcher, and a second copy here is exactly the\n * disagreement this file exists to prevent. The dispatcher now reads this\n * table, so the page, the broker and the hub all resolve one set of strings.\n *\n * Recording reads can be reached from a browser with recording authorization. The `/agent/` and `/hub/` routes\n * each demand a host-issued bearer token and answer 404 without one; they are\n * declared here because they are this API's surface, not because a page calls\n * them.\n */\nexport const routes = {\n artifact: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.artifact,\n query: ['artifactId', 'offset'],\n raw: true,\n },\n agentState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.agentState,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Answers whatever the admitted Desktop provider returned, which is runtime-defined JSON. */\n agentObserve: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentObserve,\n response: undefined as unknown as ApiResponseOf<unknown>,\n },\n agentAction: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentAction,\n response: undefined as unknown as ApiResponseOf<unknown>,\n },\n agentStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubState,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Null until a reader has confirmed one; reading it moves the session to `activating`. */\n hubActivation: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubActivation,\n response: undefined as unknown as ApiResponseOf<ComputerUseActivationRequest | null>,\n },\n hubAuthorization: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubAuthorization,\n response: undefined as unknown as ApiResponseOf<{\n readonly grantId: string;\n readonly expiresAt?: number;\n } | null>,\n },\n hubNext: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubNext,\n response: undefined as unknown as ApiResponseOf<ComputerUseBrokerRequest | null>,\n },\n hubComplete: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubComplete,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubRequestStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubRequestStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Desktop's macOS permission states, served by the hub's `desktop-permissions` mount. */\n desktopPermissions: {\n method: 'GET',\n path: DESKTOP_PERMISSIONS_PATH,\n response: undefined as unknown as ApiResponseOf<DesktopPermissionStates>,\n },\n /** Asks macOS for the body's permission on the Mac running Desktop; answers the states after. */\n requestDesktopPermission: {\n method: 'POST',\n path: DESKTOP_PERMISSIONS_PATH,\n response: undefined as unknown as ApiResponseOf<DesktopPermissionStates>,\n },\n} as const satisfies ApiRoutes;\n","import { createApiClient, sessionApiAddress, type SettingsPanelProps } from '@agimon-ai/po-core/native';\n\nimport { routes } from '../../../../types/apiRoutes';\nimport {\n DESKTOP_PERMISSIONS,\n type DesktopPermission,\n type DesktopPermissionStates,\n} from '../../../../types/desktopPermissions';\n\nexport type DesktopPermissionsViewState =\n | { status: 'loading' }\n | { status: 'unavailable' }\n | { status: 'error'; error: string }\n | {\n status: 'ready';\n states: DesktopPermissionStates;\n asking?: DesktopPermission;\n };\n\n/** Reads the Mac, never the phone. A request uses the host's step-up transport. */\nexport async function readDesktopPermissions(\n request: SettingsPanelProps['request'],\n permission?: DesktopPermission,\n): Promise<DesktopPermissionsViewState> {\n try {\n const api = createApiClient(routes, {\n scopes: ['host'] as const,\n basePath: 'desktop-permissions',\n transport: request,\n sessionAddress: sessionApiAddress,\n });\n const route = permission === undefined ? api.host.desktopPermissions : api.host.requestDesktopPermission;\n const response = await request(\n route.url(),\n permission === undefined\n ? undefined\n : {\n method: route.spec.method,\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ permission }),\n },\n );\n if (response.status === 404) return { status: 'unavailable' };\n const body: unknown = await response.json().catch(() => undefined);\n if (typeof body === 'object' && body !== null && !Array.isArray(body)) {\n const record = body as Record<string, unknown>;\n if (\n response.ok &&\n !('error' in record) &&\n DESKTOP_PERMISSIONS.every((key) =>\n ['granted', 'denied', 'not-determined', 'per-app'].includes(record[key] as string),\n )\n ) {\n return { status: 'ready', states: record as DesktopPermissionStates };\n }\n if (typeof record.error === 'string') return { status: 'error', error: record.error };\n }\n return {\n status: 'error',\n error: 'Po Desktop did not return permission states. Try again.',\n };\n } catch (error) {\n return {\n status: 'error',\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n","import {\n Badge,\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n fontOf,\n Panel,\n} from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport {\n DESKTOP_PERMISSIONS,\n type DesktopPermission,\n type DesktopPermissionState,\n} from '../../../../types/desktopPermissions';\nimport type {} from '../../../../types/unistyles.native';\nimport type { DesktopPermissionsViewState } from '../_lib/desktopPermissions.native';\n\nconst COPY: Record<DesktopPermission, { title: string; detail: string }> = {\n accessibility: {\n title: 'Accessibility',\n detail: 'Lets Po press buttons, fill fields and scroll in the app window you approve for computer use.',\n },\n 'screen-recording': {\n title: 'Screen and system audio recording',\n detail:\n 'Lets Po see and record the window you approve, with its sound. macOS asks you to reopen Po after you allow it.',\n },\n microphone: {\n title: 'Microphone',\n detail: 'Lets you talk to Po, and adds your voice to computer-use recordings.',\n },\n automation: {\n title: 'Automation',\n detail:\n 'Lets Po and its agents control other apps, such as Finder or Mail. macOS asks once for each app; your answers are listed in System Settings.',\n },\n 'full-disk-access': {\n title: 'Full Disk Access',\n detail:\n 'Optional. Lets agents and their tools read Documents, Downloads and Mail without a prompt for each folder.',\n },\n};\nconst LABEL: Record<DesktopPermissionState, string> = {\n granted: 'Allowed',\n denied: 'Not allowed',\n 'not-determined': 'Not asked yet',\n 'per-app': 'Asked per app',\n};\n\nexport function DesktopPermissionsView({\n state,\n remote = true,\n onAsk,\n onRefresh,\n}: {\n state: DesktopPermissionsViewState;\n remote?: boolean;\n onAsk: (permission: DesktopPermission) => void;\n onRefresh: () => void;\n}) {\n return (\n <View style={styles.page}>\n <View style={styles.sectionHead}>\n <View style={styles.sectionText}>\n <Text accessibilityRole=\"header\" style={styles.sectionTitle}>\n On the paired Mac\n </Text>\n <Text style={styles.detail}>\n {remote\n ? 'These belong to the Mac running Po Desktop. When you ask from here, macOS shows its prompt on that Mac.'\n : 'Po asks macOS for each one when you are ready. The permission prompt appears on the Mac running Po Desktop. You can change them any time in System Settings, Privacy and Security.'}\n </Text>\n </View>\n {state.status === 'ready' ? (\n <DropdownMenu>\n <DropdownMenuTrigger\n variant=\"ghost\"\n disabled={state.asking !== undefined}\n accessibilityLabel=\"Permissions actions for the paired Mac\"\n style={styles.control}\n >\n ⋯\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuItem onSelect={onRefresh}>Check again</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n ) : null}\n </View>\n <Panel style={styles.card}>\n {state.status === 'ready' ? (\n DESKTOP_PERMISSIONS.map((permission, index) => {\n const value = state.states[permission];\n const asking = state.asking === permission;\n const action = asking ? 'Waiting for macOS' : value === 'not-determined' ? 'Allow' : 'Open System Settings';\n return (\n <View key={permission} style={[styles.row, index > 0 && styles.divider]}>\n <View style={styles.rowHeading}>\n <Text style={styles.rowTitle}>{COPY[permission].title}</Text>\n <Badge tone={value === 'granted' ? 'green' : 'neutral'}>{LABEL[value]}</Badge>\n </View>\n <Text style={styles.detail}>{COPY[permission].detail}</Text>\n {value !== 'granted' ? (\n <Button\n variant=\"outline\"\n style={styles.control}\n disabled={state.asking !== undefined}\n accessibilityLabel={`${action}: ${COPY[permission].title} on the paired Mac`}\n onPress={() => onAsk(permission)}\n >\n {action}\n </Button>\n ) : null}\n {asking ? (\n <Text accessibilityLiveRegion=\"polite\" style={styles.detail}>\n Waiting for your answer on the Mac.\n </Text>\n ) : null}\n </View>\n );\n })\n ) : (\n <View style={styles.row}>\n <Text accessibilityRole={state.status === 'error' ? 'alert' : 'header'} style={styles.rowTitle}>\n {state.status === 'loading'\n ? 'Checking with macOS'\n : state.status === 'unavailable'\n ? 'Po Desktop is not running here'\n : \"Po couldn't read the permissions just now\"}\n </Text>\n <Text style={styles.detail}>\n {state.status === 'loading'\n ? 'This takes a moment.'\n : state.status === 'unavailable'\n ? 'Permissions belong to the Mac running Po Desktop. Open Po Desktop there to see and change them.'\n : state.error}\n </Text>\n {state.status === 'error' ? (\n <Button\n variant=\"outline\"\n style={styles.control}\n accessibilityLabel=\"Try reading permissions from the paired Mac again\"\n onPress={onRefresh}\n >\n Try again\n </Button>\n ) : null}\n </View>\n )}\n </Panel>\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n page: {\n gap: theme.spacing(5),\n },\n sectionHead: {\n flexDirection: 'row',\n alignItems: 'flex-start',\n gap: theme.spacing(2),\n },\n sectionText: { flex: 1, minWidth: 0, gap: theme.spacing(2) },\n sectionTitle: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeight.lg,\n fontWeight: theme.fontWeight.semibold,\n color: theme.colors.hi,\n },\n detail: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.dim,\n },\n card: { padding: 0, overflow: 'hidden' },\n row: { padding: theme.spacing(4), gap: theme.spacing(3) },\n rowHeading: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n gap: theme.spacing(2),\n },\n rowTitle: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n fontWeight: theme.fontWeight.semibold,\n color: theme.colors.hi,\n flexShrink: 1,\n },\n divider: {\n borderTopWidth: StyleSheet.hairlineWidth,\n borderTopColor: theme.colors['border-soft'],\n },\n control: { minHeight: 44, minWidth: 44, alignSelf: 'flex-start' },\n}));\n","import type { SettingsPanelProps } from '@agimon-ai/po-core/native';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { AppState } from 'react-native';\n\nimport type { DesktopPermission } from '../../../../types/desktopPermissions';\nimport { readDesktopPermissions, type DesktopPermissionsViewState } from '../_lib/desktopPermissions.native';\nimport { DesktopPermissionsView } from './DesktopPermissionsView.native';\n\nexport function DesktopPermissionsPanel({ request, requestWithStepUp }: SettingsPanelProps) {\n const [state, setState] = useState<DesktopPermissionsViewState>({\n status: 'loading',\n });\n const generation = useRef(0);\n const busy = useRef(false);\n\n const run = useCallback(\n async (permission?: DesktopPermission) => {\n if (busy.current) return;\n busy.current = true;\n const version = ++generation.current;\n setState((current) =>\n permission !== undefined && current.status === 'ready'\n ? { ...current, asking: permission }\n : { status: 'loading' },\n );\n const next = await readDesktopPermissions(permission === undefined ? request : requestWithStepUp, permission);\n if (generation.current !== version) return;\n busy.current = false;\n setState(next);\n },\n [request, requestWithStepUp],\n );\n\n useEffect(() => {\n // Read macOS on mount and when returning from its permission prompt or System Settings.\n // oxlint-disable-next-line react/set-state-in-effect\n void run();\n const subscription = AppState.addEventListener('change', (next) => {\n if (next === 'active') void run();\n });\n return () => {\n generation.current += 1;\n busy.current = false;\n subscription.remove();\n };\n }, [run]);\n\n return (\n <DesktopPermissionsView state={state} onAsk={(permission) => void run(permission)} onRefresh={() => void run()} />\n );\n}\n","import { defineSettingsPanel } from '@agimon-ai/po-core/native';\n\nimport { DesktopPermissionsPanel } from './_components/DesktopPermissionsPanel.native';\n\nexport default defineSettingsPanel({\n label: 'Permissions',\n detail: 'What Po may do on the paired Mac',\n order: 46,\n component: DesktopPermissionsPanel,\n});\n","import { defineActivityGroup } from '@agimon-ai/po-core/native';\n\nimport { COMPUTER_USE_STATUS_KEY } from '../../../../../types/computerUseApi';\n\n/** Remote clients request control from the Desktop host through their session Activity. */\nexport default defineActivityGroup({\n name: 'computer-use',\n keys: 'c e',\n order: 70,\n statusKey: COMPUTER_USE_STATUS_KEY,\n hideWhenEmpty: true,\n marksBackgroundWork: false,\n});\n","import { defineSessionStore } from '@agimon-ai/po-core/native';\n\nimport { computerUseChannelType } from '../../../../../types/computerUseApi';\nimport type { ComputerUseChannelPayload, ComputerUseSessionView } from '../../../../../types/computerUseApi';\n\nexport interface ComputerUseSession extends ComputerUseChannelPayload {}\n\nconst initialState: ComputerUseSession = {\n state: { sessionId: '', revision: 0, wake: 0, phase: 'inactive' },\n targets: [],\n};\n\nexport const computerUse = defineSessionStore<ComputerUseSession>(initialState);\n\n/** Revision zero must hydrate the empty selector once; equal status polls then retain identity. */\nexport function updateComputerUseState(sessionId: string, state: ComputerUseSessionView) {\n computerUse.update(sessionId, (current) =>\n current.state.sessionId === '' || state.revision > current.state.revision ? { ...current, state } : current,\n );\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport const computerUseChannel = computerUse.channel<ComputerUseChannelPayload>({\n channel: computerUseChannelType,\n parse(input) {\n if (!isRecord(input) || !isRecord(input.state) || !Array.isArray(input.targets)) return null;\n if (typeof input.state.phase !== 'string' || typeof input.state.revision !== 'number') return null;\n return input as unknown as ComputerUseChannelPayload;\n },\n reduce: (_current, payload) => payload,\n});\n","import { defineChannelFile } from '@agimon-ai/po-core/native';\n\nimport { computerUseChannel } from '../_lib/computerUseStore.native';\n\nexport default defineChannelFile(computerUseChannel);\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport { Button, CheckIcon, fontOf } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { useCallback, useEffect, useState, useSyncExternalStore } from 'react';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { COMPUTER_USE_DEFAULT_DURATION_MS, computerUseChannelType } from '../../../../../../types/computerUseApi';\nimport type { ComputerUseSessionView } from '../../../../../../types/computerUseApi';\nimport { computerUse } from '../../_lib/computerUseStore.native';\n\nfunction remaining(ms: number): string {\n const seconds = Math.max(0, Math.ceil(ms / 1000));\n return `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, '0')} left`;\n}\n\nexport function ComputerUseView({\n state,\n error,\n onCancel,\n onStop,\n}: {\n state: ComputerUseSessionView;\n error?: string;\n onCancel: () => void;\n onStop: () => void;\n}) {\n const pending = state.phase === 'awaiting_confirmation' || state.phase === 'activating';\n const active = state.phase === 'active' || state.phase === 'stopping';\n const failure = error ?? state.failure?.message;\n const expiresAt = state.phase === 'active' ? state.expiresAt : undefined;\n const [now, setNow] = useState(Date.now);\n useEffect(() => {\n if (expiresAt === undefined) return;\n const timer = setInterval(() => setNow(Date.now()), 1000);\n return () => clearInterval(timer);\n }, [expiresAt]);\n const left = expiresAt === undefined ? undefined : expiresAt - now;\n const total = state.durationMs ?? COMPUTER_USE_DEFAULT_DURATION_MS;\n const controlled =\n state.target?.scope === 'desktop'\n ? 'your whole desktop'\n : typeof state.target?.applicationName === 'string'\n ? state.target.applicationName\n : 'the chosen window';\n // A monitor, not a setup form: an inactive session shows nothing, and a finished recording reaches the person by notification.\n if (state.phase === 'inactive') return null;\n return (\n <View style={styles.panel}>\n <View style={styles.header}>\n <Text style={styles.title} accessibilityRole=\"header\">\n Computer use\n </Text>\n </View>\n {failure ? (\n <Text style={styles.error} accessibilityRole=\"alert\">\n {failure}\n </Text>\n ) : null}\n {state.artifact?.status === 'ready' ? (\n <View style={styles.row}>\n <View style={styles.check}>\n <CheckIcon size={12} color=\"rail\" />\n </View>\n <Text style={styles.text}>Recording finished.</Text>\n </View>\n ) : null}\n {state.artifact?.failure ? <Text style={styles.error}>{state.artifact.failure.message}</Text> : null}\n {pending ? (\n <>\n <Text style={styles.text}>Desktop activation is pending.</Text>\n <Button variant=\"outline\" onPress={onCancel}>\n Cancel activation\n </Button>\n </>\n ) : active ? (\n <>\n <View style={styles.row} accessibilityLiveRegion=\"polite\">\n <View style={styles.dot} />\n <Text style={styles.live}>\n {state.phase === 'stopping' ? 'Po is handing control back' : `Po is controlling ${controlled}`}\n </Text>\n </View>\n {left === undefined ? null : (\n <View style={styles.row}>\n <View\n style={styles.track}\n accessibilityRole=\"progressbar\"\n accessibilityLabel=\"Time left\"\n accessibilityValue={{\n min: 0,\n max: total,\n now: Math.max(0, left),\n }}\n >\n <View\n style={[\n styles.fill,\n {\n width: `${Math.min(100, Math.max(0, (left / total) * 100))}%`,\n },\n ]}\n />\n </View>\n <Text style={styles.detail}>{remaining(left)}</Text>\n </View>\n )}\n <Button variant=\"outline\" disabled={state.phase === 'stopping'} onPress={onStop}>\n Stop computer use\n </Button>\n </>\n ) : null}\n </View>\n );\n}\n\nfunction SessionPanel({ sessionId, sendSessionFrame }: WebPluginSlotProps & { sessionId: string }) {\n const subscribe = useCallback((listener: () => void) => {\n const subscription = computerUse.store.subscribe(listener);\n return () => subscription.unsubscribe();\n }, []);\n // Native plugins may not import @tanstack/react-store; it is not a native host module.\n const session = useSyncExternalStore(subscribe, () => computerUse.select(computerUse.store.state, sessionId));\n const [error, setError] = useState<string>();\n\n useEffect(() => {\n sendSessionFrame(sessionId, {\n type: computerUseChannelType,\n payload: { action: 'status' },\n });\n }, [sessionId, sendSessionFrame]);\n\n const stop = (message: string) => {\n setError(undefined);\n try {\n sendSessionFrame(sessionId, {\n type: computerUseChannelType,\n payload: { action: 'stop' },\n });\n } catch {\n setError(message);\n }\n };\n\n return (\n <ComputerUseView\n state={session.state}\n error={error}\n onCancel={() => stop('The activation could not be cancelled.')}\n onStop={() => stop('The stop request is unavailable.')}\n />\n );\n}\n\nexport function ComputerUsePanel(props: WebPluginSlotProps) {\n return props.sessionId === null ? (\n <Text style={styles.detail}>Select a session.</Text>\n ) : (\n <SessionPanel key={props.sessionId} {...props} sessionId={props.sessionId} />\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n panel: { gap: theme.spacing(3) },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n borderBottomWidth: 1,\n borderBottomColor: theme.colors['border-soft'],\n },\n title: {\n flex: 1,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n fontWeight: '600',\n color: theme.colors.hi,\n },\n row: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2) },\n dot: {\n width: 8,\n height: 8,\n borderRadius: 4,\n backgroundColor: theme.colors.green,\n },\n live: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n color: theme.colors.green,\n },\n track: {\n flex: 1,\n height: 6,\n borderRadius: 3,\n overflow: 'hidden',\n backgroundColor: theme.colors['border-soft'],\n },\n fill: {\n height: '100%',\n borderRadius: 3,\n backgroundColor: theme.colors.green,\n },\n check: {\n width: 20,\n height: 20,\n borderRadius: 10,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.colors.green,\n },\n text: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n color: theme.colors.text,\n },\n detail: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.dim,\n },\n error: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n color: theme.colors.red,\n },\n}));\n","import { defineFill } from '@agimon-ai/po-core/native';\n\nimport { ComputerUsePanel } from './_components/ComputerUsePanel.native';\n\nexport default defineFill({\n id: 'computer-use',\n slot: 'activity.computer-use',\n component: ComputerUsePanel,\n});\n","// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web contract.\n\n/** Lines a computer tool card shows before it expands, on web and native alike. */\nexport const COMPUTER_TOOL_COLLAPSED_LINES = 8;\n/** Elements of an observation the native card lists before it expands. */\nexport const COMPUTER_ELEMENTS_PREVIEW = 5;\n/** Script log lines the native card lists before it expands. */\nexport const COMPUTER_LOGS_PREVIEW = 3;\n\nconst MS_PER_SECOND = 1000;\n\n/** The computer_state call's summary: it always observes the one authorized window. */\nexport function computerStateCallSummary(_args: Readonly<Record<string, unknown>>): string {\n return 'authorized window';\n}\n\n/**\n * The computer_action call as its two pieces: the action kind first, the element\n * it targets second. Either may be missing; the empty ones are dropped.\n */\nexport function computerActionCallParts(args: Readonly<Record<string, unknown>>): readonly string[] {\n const kind = typeof args.kind === 'string' ? args.kind : '';\n const ref = typeof args.elementRef === 'string' ? args.elementRef : '';\n return [kind, ref].filter(Boolean);\n}\n\n/** The computer_exec call's summary: the script it ran. */\nexport function computerExecCallSummary(args: Readonly<Record<string, unknown>>): string {\n return typeof args.scriptPath === 'string' ? args.scriptPath : '';\n}\n\n/**\n * The script path as its folder and its file name, so a phone header can let the\n * folder truncate while the script name stays whole.\n */\nexport function computerExecPathParts(path: string): {\n readonly folder: string;\n readonly name: string;\n} {\n const cut = path.lastIndexOf('/');\n return cut < 0 ? { folder: '', name: path } : { folder: path.slice(0, cut + 1), name: path.slice(cut + 1) };\n}\n\nexport interface ComputerElementView {\n readonly ref: string;\n /** The accessibility role in words: `AXTextField` reads `text field`. */\n readonly role: string;\n /** The label, else the value, else empty. */\n readonly label: string;\n readonly enabled: boolean;\n readonly secure: boolean;\n}\n\nexport interface ComputerObservationView {\n readonly applicationName: string;\n readonly windowTitle: string;\n readonly elements: readonly ComputerElementView[];\n /** The next page's offset when more elements exist than this page holds. */\n readonly nextOffset?: number;\n readonly truncated: boolean;\n readonly screenshotArtifact?: string;\n}\n\nexport interface ComputerFieldView {\n readonly key: string;\n readonly value: string;\n}\n\nexport interface ComputerRunView {\n /** The script's return value as short key and value pairs, never raw JSON. */\n readonly fields: readonly ComputerFieldView[];\n readonly logs: readonly string[];\n readonly actions?: number;\n readonly observations?: number;\n /** `3.4s`, from the run's metrics. */\n readonly duration?: string;\n readonly observation?: ComputerObservationView;\n}\n\nexport interface ComputerFailureView {\n readonly reason: string;\n /** Actions that finished before the run stopped, so the agent does not replay them. */\n readonly completedActions?: number;\n readonly outcomeUncertain: boolean;\n}\n\n/** What a computer tool result says, parsed and validated; `text` only when it is not JSON the card knows. */\nexport type ComputerResultView =\n | {\n readonly kind: 'observation';\n readonly observation: ComputerObservationView;\n }\n | { readonly kind: 'run'; readonly run: ComputerRunView }\n | { readonly kind: 'applied' }\n | {\n readonly kind: 'launched';\n readonly applicationName: string;\n readonly bundleId: string;\n }\n | { readonly kind: 'failure'; readonly failure: ComputerFailureView }\n | { readonly kind: 'text'; readonly lines: readonly string[] };\n\nfunction record(value: unknown): Record<string, unknown> | undefined {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\nconst text = (value: unknown): string => (typeof value === 'string' ? value : '');\nconst count = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : undefined;\n\n/** The result's text blocks joined; images (the screenshot) are dropped, as the web cards drop them. */\nexport function computerResultText(content: readonly unknown[]): string {\n return content\n .flatMap((block) => {\n const entry = record(block);\n return entry?.type === 'text' && typeof entry.text === 'string' ? [entry.text] : [];\n })\n .join('\\n');\n}\n\n/** `AXTextField` as `text field`; a role without the AX prefix is kept as it came. */\nexport function computerRoleWords(role: string): string {\n if (!role.startsWith('AX')) return role;\n return role\n .slice(2)\n .replace(/([a-z])([A-Z])/gu, '$1 $2')\n .toLowerCase();\n}\n\nfunction element(value: unknown): ComputerElementView[] {\n const entry = record(value);\n if (entry === undefined || typeof entry.ref !== 'string') return [];\n return [\n {\n ref: entry.ref,\n role: computerRoleWords(text(entry.role)),\n label: text(entry.label) || text(entry.value),\n enabled: entry.enabled !== false,\n secure: entry.secure === true,\n },\n ];\n}\n\n/** An observation when the value is one: an application name and an element list. */\nexport function computerObservationView(value: unknown): ComputerObservationView | undefined {\n const entry = record(value);\n if (entry === undefined || typeof entry.applicationName !== 'string' || !Array.isArray(entry.elements))\n return undefined;\n const nextOffset = count(entry.nextOffset);\n const artifact = text(entry.screenshotArtifact);\n return {\n applicationName: entry.applicationName,\n windowTitle: text(entry.windowTitle),\n elements: entry.elements.flatMap(element),\n truncated: entry.truncated === true || nextOffset !== undefined,\n ...(nextOffset === undefined ? {} : { nextOffset }),\n ...(artifact.length > 0 ? { screenshotArtifact: artifact } : {}),\n };\n}\n\n/** One value of a script result as a short phrase: scalars as they read, collections by their size. */\nfunction phrase(value: unknown): string {\n if (value === null || value === undefined) return 'none';\n if (typeof value === 'string') return value;\n if (typeof value === 'number' || typeof value === 'boolean') return String(value);\n if (Array.isArray(value)) return `${String(value.length)} item${value.length === 1 ? '' : 's'}`;\n const size = Object.keys(value as object).length;\n return `${String(size)} field${size === 1 ? '' : 's'}`;\n}\n\n/** A script's return value as fields: an object's own keys, or one `result` field for anything else. */\nexport function computerResultFields(value: unknown): ComputerFieldView[] {\n if (value === undefined) return [];\n const entry = record(value);\n if (entry === undefined) return [{ key: 'result', value: phrase(value) }];\n return Object.entries(entry).map(([key, field]) => ({\n key,\n value: phrase(field),\n }));\n}\n\nfunction run(entry: Record<string, unknown>): ComputerRunView | undefined {\n if (!Array.isArray(entry.logs)) return undefined;\n const observation = computerObservationView(entry.observation);\n const metrics = record(entry.metrics);\n const actions = count(metrics?.actions);\n const observations = count(metrics?.observations);\n const durationMs = count(metrics?.durationMs);\n return {\n fields: computerResultFields(entry.result),\n logs: entry.logs.filter((line): line is string => typeof line === 'string'),\n ...(actions === undefined ? {} : { actions }),\n ...(observations === undefined ? {} : { observations }),\n ...(durationMs === undefined ? {} : { duration: `${(durationMs / MS_PER_SECOND).toFixed(1)}s` }),\n ...(observation === undefined ? {} : { observation }),\n };\n}\n\nfunction failure(entry: Record<string, unknown>): ComputerFailureView | undefined {\n if (typeof entry.error !== 'string') return undefined;\n const completedActions = count(entry.completedActions);\n return {\n reason: entry.error,\n ...(completedActions === undefined ? {} : { completedActions }),\n outcomeUncertain: entry.outcomeUncertain === true,\n };\n}\n\n/** The text as lines a card can count: CRLF folded, tabs widened, trailing blank lines dropped. */\nfunction lines(value: string): string[] {\n if (value.length === 0) return [];\n const split = value.replaceAll('\\r\\n', '\\n').replaceAll('\\t', ' ').split('\\n');\n while (split.length > 0 && split.at(-1)?.trim() === '') split.pop();\n return split;\n}\n\n/**\n * A computer tool result as the card lays it out. The tools answer in JSON (an\n * observation, an action's outcome, a script run, a script failure) or in a\n * plain sentence when they fail early; anything that does not parse as a shape\n * the card knows falls back to its text lines.\n */\nexport function computerResultView(content: readonly unknown[]): ComputerResultView {\n const raw = computerResultText(content);\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n return { kind: 'text', lines: lines(raw) };\n }\n const entry = record(parsed);\n const observation = computerObservationView(parsed);\n if (observation !== undefined) return { kind: 'observation', observation };\n const ran = entry === undefined ? undefined : run(entry);\n if (ran !== undefined) return { kind: 'run', run: ran };\n const failed = entry === undefined ? undefined : failure(entry);\n if (failed !== undefined) return { kind: 'failure', failure: failed };\n if (entry?.launched === true && typeof entry.applicationName === 'string')\n return {\n kind: 'launched',\n applicationName: entry.applicationName,\n bundleId: text(entry.bundleId),\n };\n if (entry?.applied === true) return { kind: 'applied' };\n return { kind: 'text', lines: lines(raw) };\n}\n\n/** How many rows the view holds back while collapsed, so the card offers expand only when it reveals something. */\nexport function computerResultHidden(view: ComputerResultView): number {\n switch (view.kind) {\n case 'observation':\n return Math.max(0, view.observation.elements.length - COMPUTER_ELEMENTS_PREVIEW);\n case 'run':\n return Math.max(0, view.run.logs.length - COMPUTER_LOGS_PREVIEW);\n case 'text':\n return Math.max(0, view.lines.length - COMPUTER_TOOL_COLLAPSED_LINES);\n default:\n return 0;\n }\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport { Badge, fontOf, MessageItemBody, MessageItemStatus } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport {\n COMPUTER_ELEMENTS_PREVIEW,\n COMPUTER_LOGS_PREVIEW,\n COMPUTER_TOOL_COLLAPSED_LINES,\n type ComputerElementView,\n type ComputerFailureView,\n type ComputerObservationView,\n type ComputerResultView,\n type ComputerRunView,\n computerResultHidden,\n computerResultView,\n} from '../_lib/computerToolView';\n\n/** The parsed result, or none before the tool answers. */\nexport function computerResult(props: ToolMessageRenderProps): ComputerResultView | undefined {\n return props.result === null ? undefined : computerResultView(props.result.content);\n}\n\n/** Whether the card has rows to reveal: the header offers expand only then, and never on a failure. */\nexport function computerResultExpandable(props: ToolMessageRenderProps): boolean {\n const view = computerResult(props);\n return !props.isError && view !== undefined && computerResultHidden(view) > 0;\n}\n\n/**\n * The body the three computer tool cards share on native. The web cards print\n * the result's text; the tools answer in JSON, so this lays the parsed result\n * out instead: the window and its elements, a script's figures and logs, an\n * action's outcome. A preview shows while collapsed, as the web's first lines\n * do. A failure shows only its reason in red, with a quiet note of any actions\n * that already ran; the header's edge and outcome already say it failed.\n */\nexport function ComputerResultBody({ props, expanded }: { props: ToolMessageRenderProps; expanded: boolean }) {\n const { toolName, output, running, isError } = props;\n const view = computerResult(props);\n const testID = `tool-result-${toolName}`;\n if (isError) {\n const failure: ComputerFailureView =\n view?.kind === 'failure'\n ? view.failure\n : {\n reason: view?.kind === 'text' ? view.lines.join('\\n') : output.trim(),\n outcomeUncertain: false,\n };\n return failure.reason.length === 0 ? null : (\n <MessageItemBody testID={testID}>\n <FailureBlock failure={failure} />\n </MessageItemBody>\n );\n }\n if (view === undefined) {\n return running ? (\n <MessageItemBody testID={testID}>\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null;\n }\n if (view.kind === 'text' && view.lines.length === 0) return null;\n return (\n <MessageItemBody testID={testID}>\n <View style={styles.stack}>\n {view.kind === 'observation' ? <ObservationBlock observation={view.observation} expanded={expanded} /> : null}\n {view.kind === 'run' ? <RunBlock run={view.run} expanded={expanded} /> : null}\n {view.kind === 'applied' ? <Text style={[styles.sans, styles.text]}>Applied to the element.</Text> : null}\n {view.kind === 'launched' ? (\n <View style={styles.figure}>\n <Text numberOfLines={1} style={[styles.sans, styles.strong, styles.keep]}>\n Opened {view.applicationName}\n </Text>\n <Text numberOfLines={1} style={[styles.mono, styles.faint, styles.yield]}>\n {view.bundleId}\n </Text>\n </View>\n ) : null}\n {view.kind === 'text' ? <TextLines lines={view.lines} expanded={expanded} /> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n </View>\n </MessageItemBody>\n );\n}\n\nfunction FailureBlock({ failure }: { failure: ComputerFailureView }) {\n const done = failure.completedActions;\n const note = [\n done === undefined ? '' : `${String(done)} action${done === 1 ? '' : 's'} already ran`,\n failure.outcomeUncertain ? 'the last outcome is uncertain' : '',\n ].filter(Boolean);\n return (\n <View style={styles.stack}>\n <Text selectable style={[styles.sans, styles.error]}>\n {failure.reason}\n </Text>\n {note.length > 0 ? <Text style={[styles.small, styles.faint]}>{note.join(', ')}.</Text> : null}\n </View>\n );\n}\n\nfunction WindowLine({ observation, lead }: { observation: ComputerObservationView; lead?: string }) {\n return (\n <View style={styles.figure}>\n <Text numberOfLines={1} style={[styles.sans, styles.strong, styles.keep]}>\n {lead === undefined ? '' : `${lead} `}\n {observation.applicationName}\n </Text>\n {observation.windowTitle.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.dim, styles.yield]}>\n {observation.windowTitle}\n </Text>\n ) : null}\n </View>\n );\n}\n\nfunction ElementRow({ element }: { element: ComputerElementView }) {\n // A secure field's role already says so (`secure text field`); the flag is named only when it does not.\n const secure = element.secure && !element.role.includes('secure');\n const traits = [element.role, element.enabled ? '' : 'disabled', secure ? 'secure' : ''].filter(Boolean);\n return (\n <View style={styles.row} accessibilityLabel={`${element.label} ${traits.join(' ')} ${element.ref}`}>\n <Text numberOfLines={1} style={[styles.sans, element.enabled ? styles.text : styles.faint, styles.yield]}>\n {element.label.length > 0 ? element.label : element.role}\n </Text>\n <Text numberOfLines={1} style={[styles.small, styles.faint, styles.keep]}>\n {traits.join(' · ')}\n </Text>\n <Text numberOfLines={1} style={[styles.mono, styles.faint, styles.ref]}>\n {element.ref}\n </Text>\n </View>\n );\n}\n\nfunction ObservationBlock({ observation, expanded }: { observation: ComputerObservationView; expanded: boolean }) {\n const { elements } = observation;\n const shown = expanded ? elements : elements.slice(0, COMPUTER_ELEMENTS_PREVIEW);\n const hidden = elements.length - shown.length;\n return (\n <>\n <WindowLine observation={observation} />\n <View style={styles.chips}>\n <Badge size=\"xs\">{`${String(elements.length)} element${elements.length === 1 ? '' : 's'}`}</Badge>\n {observation.truncated ? (\n <Badge size=\"xs\" tone=\"yellow\">\n {observation.nextOffset === undefined\n ? 'more not shown'\n : `more from offset ${String(observation.nextOffset)}`}\n </Badge>\n ) : null}\n </View>\n {shown.length > 0 ? (\n <View style={styles.list}>\n {shown.map((element) => (\n <ElementRow key={element.ref} element={element} />\n ))}\n </View>\n ) : null}\n {hidden > 0 ? <MessageItemStatus expands>{hidden} more elements</MessageItemStatus> : null}\n {observation.screenshotArtifact === undefined ? null : (\n <Text numberOfLines={2} style={[styles.small, styles.faint]}>\n Screenshot saved to {observation.screenshotArtifact}\n </Text>\n )}\n </>\n );\n}\n\nfunction RunBlock({ run, expanded }: { run: ComputerRunView; expanded: boolean }) {\n const figures = [\n run.actions === undefined ? '' : `${String(run.actions)} action${run.actions === 1 ? '' : 's'}`,\n run.observations === undefined ? '' : `${String(run.observations)} observation${run.observations === 1 ? '' : 's'}`,\n run.duration ?? '',\n ].filter(Boolean);\n const logs = expanded ? run.logs : run.logs.slice(0, COMPUTER_LOGS_PREVIEW);\n const hidden = run.logs.length - logs.length;\n return (\n <>\n {figures.length > 0 ? (\n <View style={styles.chips}>\n {figures.map((figure) => (\n <Badge key={figure} size=\"xs\">\n {figure}\n </Badge>\n ))}\n </View>\n ) : null}\n {run.fields.length > 0 ? (\n <View style={styles.list}>\n {run.fields.map((field) => (\n <View key={field.key} style={styles.row}>\n <Text numberOfLines={1} style={[styles.small, styles.faint, styles.key]}>\n {field.key}\n </Text>\n <Text numberOfLines={1} selectable style={[styles.sans, styles.text, styles.yield]}>\n {field.value}\n </Text>\n </View>\n ))}\n </View>\n ) : null}\n {logs.length > 0 ? (\n <View style={styles.list}>\n {logs.map((line, index) => (\n <Text key={`${String(index)}-${line}`} numberOfLines={1} selectable style={[styles.mono, styles.dim]}>\n {line}\n </Text>\n ))}\n </View>\n ) : null}\n {hidden > 0 ? <MessageItemStatus expands>{hidden} more log lines</MessageItemStatus> : null}\n {run.observation === undefined ? null : <WindowLine observation={run.observation} lead=\"Ended on\" />}\n </>\n );\n}\n\nfunction TextLines({ lines, expanded }: { lines: readonly string[]; expanded: boolean }) {\n const shown = expanded ? lines : lines.slice(0, COMPUTER_TOOL_COLLAPSED_LINES);\n const hidden = lines.length - shown.length;\n return (\n <>\n <View style={styles.list}>\n {shown.map((line, index) => (\n <Text key={`${String(index)}-${line}`} selectable style={[styles.sans, styles.dim]}>\n {line}\n </Text>\n ))}\n </View>\n {hidden > 0 ? <MessageItemStatus expands>{hidden} more line(s)</MessageItemStatus> : null}\n </>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n stack: { gap: theme.spacing(2) },\n list: { gap: theme.spacing(1) },\n chips: { flexDirection: 'row', flexWrap: 'wrap', gap: theme.spacing(1.5) },\n figure: {\n flexDirection: 'row',\n alignItems: 'baseline',\n gap: theme.spacing(2),\n minWidth: 0,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'baseline',\n gap: theme.spacing(2),\n minWidth: 0,\n },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n small: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n },\n mono: {\n fontFamily: fontOf(theme.fontFamily.mono),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n },\n strong: { color: theme.colors.text, fontWeight: theme.fontWeight.semibold },\n text: { color: theme.colors.text },\n dim: { color: theme.colors.dim },\n faint: { color: theme.colors.faint },\n error: { color: theme.colors.red },\n // The primary piece stays whole up to most of the row; the secondary detail truncates first.\n keep: { flexShrink: 0, maxWidth: '60%' },\n yield: { flexShrink: 1, minWidth: 0 },\n key: { flexShrink: 0, maxWidth: '40%' },\n ref: { flexShrink: 0, marginLeft: 'auto' },\n}));\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport { fontOf, MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { computerActionCallParts } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody.native';\n\n/**\n * The computer_action tool's timeline item on native, as the web's: the action\n * and the element it targets in the header, the outcome's first lines beneath.\n */\nexport function ComputerActionToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n const [kind, ...target] = computerActionCallParts(args);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <View testID={`tool-call-${toolName}`} style={styles.summary}>\n {kind === undefined ? null : (\n <Text numberOfLines={1} style={[styles.sans, styles.primary]}>\n {kind}\n </Text>\n )}\n {target.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.detail]}>\n {target.join(' ')}\n </Text>\n ) : null}\n </View>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n minWidth: 0,\n },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n // The action is what Po did, so it stays whole; the element it targeted yields first.\n primary: { flexShrink: 0, maxWidth: '45%', color: theme.colors.text },\n detail: { flexShrink: 1, color: theme.colors.dim },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ComputerActionToolCard } from './_components/ComputerActionToolCard.native';\n\nexport default defineToolRenderer({\n tools: ['computer_action'],\n message: ComputerActionToolCard,\n});\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport { fontOf, MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { computerExecCallSummary, computerExecPathParts } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody.native';\n\n/**\n * The computer_exec tool's timeline item on native, as the web's: the script\n * path in the header, the run's first lines beneath it.\n */\nexport function ComputerExecToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n const path = computerExecPathParts(computerExecCallSummary(args));\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <View testID={`tool-call-${toolName}`} style={styles.summary}>\n {/* A long path loses its folder first, so the script name stays readable. */}\n {path.folder.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.folder]}>\n {path.folder}\n </Text>\n ) : null}\n <Text numberOfLines={1} style={[styles.sans, styles.primary]}>\n {path.name}\n </Text>\n </View>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: { flex: 1, flexDirection: 'row', alignItems: 'center', minWidth: 0 },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n folder: { flexShrink: 1, minWidth: 0, color: theme.colors.dim },\n primary: { flexShrink: 0, maxWidth: '100%', color: theme.colors.text },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ComputerExecToolCard } from './_components/ComputerExecToolCard.native';\n\nexport default defineToolRenderer({\n tools: ['computer_exec'],\n message: ComputerExecToolCard,\n});\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport { fontOf, MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { computerStateCallSummary } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody.native';\n\n/**\n * The computer_state tool's timeline item on native, as the web's: the observed\n * window in the header, the observation's first lines beneath it.\n */\nexport function ComputerStateToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <View testID={`tool-call-${toolName}`} style={styles.summary}>\n <Text numberOfLines={1} style={[styles.sans, styles.primary]}>\n {computerStateCallSummary(args)}\n </Text>\n </View>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n minWidth: 0,\n },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n primary: { flexShrink: 1, color: theme.colors.text },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ComputerStateToolCard } from './_components/ComputerStateToolCard.native';\n\nexport default defineToolRenderer({\n tools: ['computer_state'],\n message: ComputerStateToolCard,\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport settingDesktopPermissions from '../src/extensions/(frontend)/setting/desktop-permissions.panel.native';\nimport activityGroupComputerUse from '../src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.native';\nimport channelComputerUse from '../src/extensions/workspaces/sessions/(frontend)/channel/computer-use.native';\nimport fillComputerUse from '../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.native';\nimport toolComputerAction from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-action.native';\nimport toolComputerExec from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.native';\nimport toolComputerState from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-state.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\n id: 'computer-use',\n packageName: '@agimon-ai/po-computer-use',\n host: {\n get settingsPanels(): WebPluginContributions['settingsPanels'] { return [via({ id: 'desktop-permissions' }, settingDesktopPermissions)]; },\n },\n session: {\n get activityGroups(): WebPluginContributions['activityGroups'] { return [via({ name: 'computer-use' }, activityGroupComputerUse)]; },\n get channels(): WebPluginContributions['channels'] { return [via({ channel: 'computer_use' }, channelComputerUse)]; },\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'activity.computer-use', id: 'computer-use' }, fillComputerUse)]; },\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['computer_action'] }, toolComputerAction), via({ tools: ['computer_exec'] }, toolComputerExec), via({ tools: ['computer_state'] }, toolComputerState)]; },\n },\n});\n"],"mappings":";;;;;;;;;AACA,MAAa,yBAAyB;AAEtC,MAAa,0BAA0B;;;;;;;;AAmBvC,MAAa,sBAAsB;CACjC,UAAU;CACV,YAAY;CACZ,cAAc;CACd,aAAa;CACb,WAAW;CACX,UAAU;CACV,eAAe;CACf,kBAAkB;CAClB,SAAS;CACT,aAAa;CACb,SAAS;CACT,gBAAgB;AAClB;;;;AC/BA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;;;;;;;;;;ACkBA,MAAa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C,OAAOb,MAAMc,OAAOC;EAAIR,mBAAA,CAAA,CAAA;CAAC;AACrD,EAAE;;;AC3CF,IAAA,gCAAe,mBAAmB;CAChC,OAAO,CAAC,gBAAgB;CACxB,SAAS;AACX,CAAC;;;ACID,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,aAAa;CACb,MAAM,EACJ,IAAI,iBAA2D;EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,sBAAsB,GAAGS,wCAAyB,CAAC;CAAG,EAC3I;CACA,SAAS;EACP,IAAI,iBAA2D;GAAE,OAAO,CAAC,IAAI,EAAE,MAAM,eAAe,GAAGC,6BAAwB,CAAC;EAAG;EACnI,IAAI,WAA+C;GAAE,OAAO,CAAC,IAAI,EAAE,SAAS,eAAe,GAAGC,2BAAkB,CAAC;EAAG;EACpH,IAAI,QAAyC;GAAE,OAAO,CAAC,IAAI;IAAE,MAAM;IAAyB,IAAI;GAAe,GAAGC,gDAAe,CAAC;EAAG;EACrI,IAAI,gBAAyD;GAAE,OAAO;IAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,EAAE,GAAGC,8BAAkB;IAAG,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE,GAAGC,4BAAgB;IAAG,IAAI,EAAE,OAAO,CAAC,gBAAgB,EAAE,GAAGC,6BAAiB;GAAC;EAAG;CAC/O;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"native.mjs","names":["Badge","Button","DropdownMenu","DropdownMenuContent","DropdownMenuItem","DropdownMenuTrigger","fontOf","Panel","PoNativeTheme","StyleSheet","DESKTOP_PERMISSIONS","DesktopPermission","DesktopPermissionState","DesktopPermissionsViewState","COPY","Record","title","detail","accessibility","microphone","automation","LABEL","granted","denied","DesktopPermissionsView","state","remote","onAsk","onRefresh","permission","styles","page","sectionHead","sectionText","sectionTitle","status","asking","undefined","control","card","map","index","value","states","action","row","divider","rowHeading","rowTitle","error","create","theme","gap","spacing","uni__dependencies","flexDirection","alignItems","flex","minWidth","fontFamily","sans","fontSize","lg","lineHeight","fontWeight","semibold","color","colors","hi","sm","lineHeightRelaxed","dim","padding","overflow","flexWrap","base","flexShrink","borderTopWidth","hairlineWidth","borderTopColor","minHeight","alignSelf","styles","SettingsPanelProps","useCallback","useEffect","useRef","useState","AppState","DesktopPermission","readDesktopPermissions","DesktopPermissionsViewState","DesktopPermissionsView","DesktopPermissionsPanel","request","requestWithStepUp","state","setState","status","generation","busy","run","permission","current","version","undefined","asking","next","subscription","addEventListener","remove","WebPluginSlotProps","Button","CheckIcon","fontOf","PoNativeTheme","useCallback","useEffect","useState","useSyncExternalStore","StyleSheet","COMPUTER_USE_DEFAULT_DURATION_MS","computerUseChannelType","ComputerUseSessionView","computerUse","remaining","ms","seconds","Math","max","ceil","floor","String","padStart","ComputerUseView","state","error","onCancel","onStop","pending","phase","active","failure","message","expiresAt","undefined","now","setNow","Date","timer","setInterval","clearInterval","left","total","durationMs","controlled","target","scope","applicationName","styles","panel","header","title","artifact","status","row","check","text","dot","live","track","min","fill","width","detail","SessionPanel","sessionId","sendSessionFrame","subscribe","listener","subscription","store","unsubscribe","session","select","setError","type","payload","action","stop","ComputerUsePanel","props","create","theme","gap","spacing","uni__dependencies","flexDirection","alignItems","paddingBottom","borderBottomWidth","borderBottomColor","colors","flex","fontFamily","sans","fontSize","base","fontWeight","color","hi","height","borderRadius","backgroundColor","green","lineHeight","lineHeightRelaxed","overflow","justifyContent","sm","dim","red","styles","ToolMessageRenderProps","Badge","fontOf","MessageItemBody","MessageItemStatus","PoNativeTheme","StyleSheet","COMPUTER_ELEMENTS_PREVIEW","COMPUTER_LOGS_PREVIEW","COMPUTER_TOOL_COLLAPSED_LINES","ComputerElementView","ComputerFailureView","ComputerObservationView","ComputerResultView","ComputerRunView","computerResultHidden","computerResultView","computerResult","props","result","undefined","content","computerResultExpandable","view","isError","ComputerResultBody","expanded","toolName","output","running","testID","failure","kind","reason","lines","join","trim","outcomeUncertain","length","styles","stack","observation","run","sans","text","figure","strong","keep","applicationName","mono","faint","yield","bundleId","FailureBlock","done","completedActions","note","String","filter","Boolean","error","small","WindowLine","lead","windowTitle","dim","ElementRow","element","secure","role","includes","traits","enabled","row","label","ref","ObservationBlock","elements","shown","slice","hidden","chips","truncated","nextOffset","list","map","screenshotArtifact","RunBlock","figures","actions","observations","duration","logs","fields","field","key","value","line","index","TextLines","create","theme","gap","spacing","uni__dependencies","flexDirection","flexWrap","alignItems","minWidth","fontFamily","fontSize","base","lineHeight","sm","color","colors","fontWeight","semibold","red","flexShrink","maxWidth","marginLeft","styles","ToolMessageRenderProps","fontOf","MessageItem","MessageItemHeader","toolTone","PoNativeTheme","StyleSheet","computerActionCallParts","ComputerResultBody","computerResultExpandable","ComputerActionToolCard","props","toolName","args","running","isError","kind","target","expanded","styles","summary","undefined","sans","primary","length","detail","join","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","maxWidth","color","colors","text","dim","styles","ToolMessageRenderProps","fontOf","MessageItem","MessageItemHeader","toolTone","PoNativeTheme","StyleSheet","computerExecCallSummary","computerExecPathParts","ComputerResultBody","computerResultExpandable","ComputerExecToolCard","props","toolName","args","running","isError","path","expanded","styles","summary","folder","length","sans","primary","name","create","theme","flex","flexDirection","alignItems","minWidth","fontFamily","fontSize","base","lineHeight","uni__dependencies","flexShrink","color","colors","dim","maxWidth","text","styles","ToolMessageRenderProps","fontOf","MessageItem","MessageItemHeader","toolTone","PoNativeTheme","StyleSheet","computerStateCallSummary","ComputerResultBody","computerResultExpandable","ComputerStateToolCard","props","toolName","args","running","isError","expanded","styles","summary","sans","primary","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","text","settingDesktopPermissions","activityGroupComputerUse","channelComputerUse","fillComputerUse","toolComputerAction","toolComputerExec","toolComputerState"],"sources":["../../src/types/computerUseApi.ts","../../src/types/desktopPermissions.ts","../../src/types/apiRoutes.ts","../../src/extensions/(frontend)/setting/_lib/desktopPermissions.native.ts","../../src/extensions/(frontend)/setting/_components/DesktopPermissionsView.native.tsx","../../src/extensions/(frontend)/setting/_components/DesktopPermissionsPanel.native.tsx","../../src/extensions/(frontend)/setting/desktop-permissions.panel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/computerUseStore.native.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/computer-use.native.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerResultBody.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-action.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-state.native.tsx","../../generated/native.ts"],"sourcesContent":["export const API_BASE_PATH = 'computer-use';\nexport const computerUseChannelType = 'computer_use_state';\nexport const COMPUTER_USE_MODE_ID = 'computer-use';\nexport const COMPUTER_USE_STATUS_KEY = 'po-computer-use';\nexport const COMPUTER_USE_MODE_STATUS_KEY = 'po-computer-use-mode';\nexport const COMPUTER_USE_MAX_DURATION_MS = 1_800 * 1_000;\nexport const COMPUTER_USE_DEFAULT_DURATION_MS = 300 * 1_000;\n/** The session lengths a person can pick when granting control, up to the maximum. */\nexport const COMPUTER_USE_DURATION_CHOICES_MS = [\n COMPUTER_USE_DEFAULT_DURATION_MS,\n 900_000,\n COMPUTER_USE_MAX_DURATION_MS,\n] as const;\nexport const COMPUTER_USE_CONFIRMATION_WINDOW_MS = 2 * 60 * 1_000;\n\n/**\n * Every path this API answers on, below its mount.\n *\n * The typed route table in `./apiRoutes` is built from this, the dispatcher\n * reads that table, and the hub channel addresses the broker with these same\n * strings, so a route cannot move on one side alone.\n */\nexport const COMPUTER_USE_ROUTES = {\n artifact: '/artifact',\n agentState: '/agent/state',\n agentObserve: '/agent/observe',\n agentAction: '/agent/action',\n agentStop: '/agent/stop',\n hubState: '/hub/state',\n hubActivation: '/hub/activation',\n hubAuthorization: '/hub/authorization',\n hubNext: '/hub/next',\n hubComplete: '/hub/complete',\n hubStop: '/hub/stop',\n hubRequestStop: '/hub/request-stop',\n} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\n\n/** A consented trace extra, read through the same grant-bound host store as the recording. */\nexport interface ComputerUseTraceFileView {\n readonly artifactId: string;\n readonly sizeBytes: number;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseArtifactView {\n readonly artifactId: string;\n readonly status: 'ready' | 'failed';\n readonly sizeBytes?: number;\n readonly downloadUrl?: string;\n readonly previewUrl?: string;\n readonly actionCount?: number;\n readonly completedAt?: string;\n readonly trace?: ComputerUseTraceFileView;\n readonly windows?: readonly ComputerUseTraceFileView[];\n readonly failure?: { readonly code: string; readonly message: string };\n}\n\nexport interface ComputerUseSessionView {\n readonly sessionId: string;\n readonly revision: number;\n readonly wake: number;\n readonly phase: 'inactive' | 'awaiting_confirmation' | 'activating' | 'active' | 'stopping' | 'failed';\n readonly requestId?: string;\n readonly target?: Record<string, unknown>;\n readonly durationMs?: number;\n readonly expiresAt?: number;\n readonly failure?: { readonly code: string; readonly message: string };\n readonly artifact?: ComputerUseArtifactView;\n}\n\nexport interface ComputerUseActivationRequest {\n readonly requestId: string;\n readonly target?: Record<string, unknown>;\n readonly durationSeconds: number;\n readonly createdAt: number;\n readonly confirmationExpiresAt: number;\n /** Set by the session broker only after the person approves the saved request. */\n readonly confirmedAt?: number;\n /** True only when the person approved keeping a redacted trace and window images for this one window. */\n readonly traceConsent: boolean;\n readonly caller: { readonly locality: 'approval'; readonly approvalId: string };\n}\n\nexport interface ComputerUseBrokerRequest {\n readonly id: string;\n readonly operation: 'observe' | 'act';\n readonly payload?: unknown;\n readonly grantId: string;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseChannelPayload {\n readonly state: ComputerUseSessionView;\n readonly targets: readonly Record<string, unknown>[];\n readonly busy?: true;\n}\n\nexport type ComputerUseBrowserCommand = {\n readonly action: 'status' | 'stop';\n};\n","/** The mount's only path: GET reads the permission states, POST asks macOS for one. */\nexport const DESKTOP_PERMISSIONS_PATH = '/';\n\n/** The macOS privacy permissions Desktop reports, in the order the settings page shows them. */\nexport const DESKTOP_PERMISSIONS = [\n 'accessibility',\n 'screen-recording',\n 'microphone',\n 'automation',\n 'full-disk-access',\n] as const;\nexport type DesktopPermission = (typeof DESKTOP_PERMISSIONS)[number];\n\n/** `per-app` is Automation: macOS asks once for each app Po controls and reports no overall state. */\nexport type DesktopPermissionState = 'granted' | 'denied' | 'not-determined' | 'per-app';\nexport type DesktopPermissionStates = Record<DesktopPermission, DesktopPermissionState>;\n\nexport interface DesktopPermissionRequest {\n readonly permission: DesktopPermission;\n}\n\nexport function isDesktopPermission(value: unknown): value is DesktopPermission {\n return typeof value === 'string' && (DESKTOP_PERMISSIONS as readonly string[]).includes(value);\n}\n","import type { ApiResponseOf, ApiRoutes } from '@agimon-ai/po-core/web';\n\nimport {\n COMPUTER_USE_ROUTES,\n type ComputerUseActivationRequest,\n type ComputerUseBrokerRequest,\n type ComputerUseSessionView,\n} from './computerUseApi';\nimport { DESKTOP_PERMISSIONS_PATH, type DesktopPermissionStates } from './desktopPermissions';\n\n/**\n * This package's routes, as data.\n *\n * No scope and no base path: the build reads both off\n * `src/extensions/workspaces/sessions/(backend)/api/computer-use/`, so the\n * mount is stated once, by the folder that creates it.\n *\n * The paths come from `COMPUTER_USE_ROUTES` rather than being written out\n * again. That table already addressed the broker from the hub channel and from\n * the broker's own dispatcher, and a second copy here is exactly the\n * disagreement this file exists to prevent. The dispatcher now reads this\n * table, so the page, the broker and the hub all resolve one set of strings.\n *\n * Recording reads can be reached from a browser with recording authorization. The `/agent/` and `/hub/` routes\n * each demand a host-issued bearer token and answer 404 without one; they are\n * declared here because they are this API's surface, not because a page calls\n * them.\n */\nexport const routes = {\n artifact: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.artifact,\n query: ['artifactId', 'offset'],\n raw: true,\n },\n agentState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.agentState,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Answers whatever the admitted Desktop provider returned, which is runtime-defined JSON. */\n agentObserve: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentObserve,\n response: undefined as unknown as ApiResponseOf<unknown>,\n },\n agentAction: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentAction,\n response: undefined as unknown as ApiResponseOf<unknown>,\n },\n agentStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubState,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Null until a reader has confirmed one; reading it moves the session to `activating`. */\n hubActivation: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubActivation,\n response: undefined as unknown as ApiResponseOf<ComputerUseActivationRequest | null>,\n },\n hubAuthorization: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubAuthorization,\n response: undefined as unknown as ApiResponseOf<{\n readonly grantId: string;\n readonly expiresAt?: number;\n } | null>,\n },\n hubNext: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubNext,\n response: undefined as unknown as ApiResponseOf<ComputerUseBrokerRequest | null>,\n },\n hubComplete: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubComplete,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubRequestStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubRequestStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Desktop's macOS permission states, served by the hub's `desktop-permissions` mount. */\n desktopPermissions: {\n method: 'GET',\n path: DESKTOP_PERMISSIONS_PATH,\n response: undefined as unknown as ApiResponseOf<DesktopPermissionStates>,\n },\n /** Asks macOS for the body's permission on the Mac running Desktop; answers the states after. */\n requestDesktopPermission: {\n method: 'POST',\n path: DESKTOP_PERMISSIONS_PATH,\n response: undefined as unknown as ApiResponseOf<DesktopPermissionStates>,\n },\n} as const satisfies ApiRoutes;\n","import { createApiClient, sessionApiAddress, type SettingsPanelProps } from '@agimon-ai/po-core/native';\n\nimport { routes } from '../../../../types/apiRoutes';\nimport {\n DESKTOP_PERMISSIONS,\n type DesktopPermission,\n type DesktopPermissionStates,\n} from '../../../../types/desktopPermissions';\n\nexport type DesktopPermissionsViewState =\n | { status: 'loading' }\n | { status: 'unavailable' }\n | { status: 'error'; error: string }\n | {\n status: 'ready';\n states: DesktopPermissionStates;\n asking?: DesktopPermission;\n };\n\n/** Reads the Mac, never the phone. A request uses the host's step-up transport. */\nexport async function readDesktopPermissions(\n request: SettingsPanelProps['request'],\n permission?: DesktopPermission,\n): Promise<DesktopPermissionsViewState> {\n try {\n const api = createApiClient(routes, {\n scopes: ['host'] as const,\n basePath: 'desktop-permissions',\n transport: request,\n sessionAddress: sessionApiAddress,\n });\n const route = permission === undefined ? api.host.desktopPermissions : api.host.requestDesktopPermission;\n const response = await request(\n route.url(),\n permission === undefined\n ? undefined\n : {\n method: route.spec.method,\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ permission }),\n },\n );\n if (response.status === 404) return { status: 'unavailable' };\n const body: unknown = await response.json().catch(() => undefined);\n if (typeof body === 'object' && body !== null && !Array.isArray(body)) {\n const record = body as Record<string, unknown>;\n if (\n response.ok &&\n !('error' in record) &&\n DESKTOP_PERMISSIONS.every((key) =>\n ['granted', 'denied', 'not-determined', 'per-app'].includes(record[key] as string),\n )\n ) {\n return { status: 'ready', states: record as DesktopPermissionStates };\n }\n if (typeof record.error === 'string') return { status: 'error', error: record.error };\n }\n return {\n status: 'error',\n error: 'Po Desktop did not return permission states. Try again.',\n };\n } catch (error) {\n return {\n status: 'error',\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n","import {\n Badge,\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n fontOf,\n Panel,\n} from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport {\n DESKTOP_PERMISSIONS,\n type DesktopPermission,\n type DesktopPermissionState,\n} from '../../../../types/desktopPermissions';\nimport type {} from '../../../../types/unistyles.native';\nimport type { DesktopPermissionsViewState } from '../_lib/desktopPermissions.native';\n\nconst COPY: Record<DesktopPermission, { title: string; detail: string }> = {\n accessibility: {\n title: 'Accessibility',\n detail: 'Lets Po press buttons, fill fields and scroll in the app window you approve for computer use.',\n },\n 'screen-recording': {\n title: 'Screen and system audio recording',\n detail:\n 'Lets Po see and record the window you approve, with its sound. macOS asks you to reopen Po after you allow it.',\n },\n microphone: {\n title: 'Microphone',\n detail: 'Lets you talk to Po, and adds your voice to computer-use recordings.',\n },\n automation: {\n title: 'Automation',\n detail:\n 'Lets Po and its agents control other apps, such as Finder or Mail. macOS asks once for each app; your answers are listed in System Settings.',\n },\n 'full-disk-access': {\n title: 'Full Disk Access',\n detail:\n 'Optional. Lets agents and their tools read Documents, Downloads and Mail without a prompt for each folder.',\n },\n};\nconst LABEL: Record<DesktopPermissionState, string> = {\n granted: 'Allowed',\n denied: 'Not allowed',\n 'not-determined': 'Not asked yet',\n 'per-app': 'Asked per app',\n};\n\nexport function DesktopPermissionsView({\n state,\n remote = true,\n onAsk,\n onRefresh,\n}: {\n state: DesktopPermissionsViewState;\n remote?: boolean;\n onAsk: (permission: DesktopPermission) => void;\n onRefresh: () => void;\n}) {\n return (\n <View style={styles.page}>\n <View style={styles.sectionHead}>\n <View style={styles.sectionText}>\n <Text accessibilityRole=\"header\" style={styles.sectionTitle}>\n On the paired Mac\n </Text>\n <Text style={styles.detail}>\n {remote\n ? 'These belong to the Mac running Po Desktop. When you ask from here, macOS shows its prompt on that Mac.'\n : 'Po asks macOS for each one when you are ready. The permission prompt appears on the Mac running Po Desktop. You can change them any time in System Settings, Privacy and Security.'}\n </Text>\n </View>\n {state.status === 'ready' ? (\n <DropdownMenu>\n <DropdownMenuTrigger\n variant=\"ghost\"\n disabled={state.asking !== undefined}\n accessibilityLabel=\"Permissions actions for the paired Mac\"\n style={styles.control}\n >\n ⋯\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuItem onSelect={onRefresh}>Check again</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n ) : null}\n </View>\n <Panel style={styles.card}>\n {state.status === 'ready' ? (\n DESKTOP_PERMISSIONS.map((permission, index) => {\n const value = state.states[permission];\n const asking = state.asking === permission;\n const action = asking ? 'Waiting for macOS' : value === 'not-determined' ? 'Allow' : 'Open System Settings';\n return (\n <View key={permission} style={[styles.row, index > 0 && styles.divider]}>\n <View style={styles.rowHeading}>\n <Text style={styles.rowTitle}>{COPY[permission].title}</Text>\n <Badge tone={value === 'granted' ? 'green' : 'neutral'}>{LABEL[value]}</Badge>\n </View>\n <Text style={styles.detail}>{COPY[permission].detail}</Text>\n {value !== 'granted' ? (\n <Button\n variant=\"outline\"\n style={styles.control}\n disabled={state.asking !== undefined}\n accessibilityLabel={`${action}: ${COPY[permission].title} on the paired Mac`}\n onPress={() => onAsk(permission)}\n >\n {action}\n </Button>\n ) : null}\n {asking ? (\n <Text accessibilityLiveRegion=\"polite\" style={styles.detail}>\n Waiting for your answer on the Mac.\n </Text>\n ) : null}\n </View>\n );\n })\n ) : (\n <View style={styles.row}>\n <Text accessibilityRole={state.status === 'error' ? 'alert' : 'header'} style={styles.rowTitle}>\n {state.status === 'loading'\n ? 'Checking with macOS'\n : state.status === 'unavailable'\n ? 'Po Desktop is not running here'\n : \"Po couldn't read the permissions just now\"}\n </Text>\n <Text style={styles.detail}>\n {state.status === 'loading'\n ? 'This takes a moment.'\n : state.status === 'unavailable'\n ? 'Permissions belong to the Mac running Po Desktop. Open Po Desktop there to see and change them.'\n : state.error}\n </Text>\n {state.status === 'error' ? (\n <Button\n variant=\"outline\"\n style={styles.control}\n accessibilityLabel=\"Try reading permissions from the paired Mac again\"\n onPress={onRefresh}\n >\n Try again\n </Button>\n ) : null}\n </View>\n )}\n </Panel>\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n page: {\n gap: theme.spacing(5),\n },\n sectionHead: {\n flexDirection: 'row',\n alignItems: 'flex-start',\n gap: theme.spacing(2),\n },\n sectionText: { flex: 1, minWidth: 0, gap: theme.spacing(2) },\n sectionTitle: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeight.lg,\n fontWeight: theme.fontWeight.semibold,\n color: theme.colors.hi,\n },\n detail: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.dim,\n },\n card: { padding: 0, overflow: 'hidden' },\n row: { padding: theme.spacing(4), gap: theme.spacing(3) },\n rowHeading: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n gap: theme.spacing(2),\n },\n rowTitle: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n fontWeight: theme.fontWeight.semibold,\n color: theme.colors.hi,\n flexShrink: 1,\n },\n divider: {\n borderTopWidth: StyleSheet.hairlineWidth,\n borderTopColor: theme.colors['border-soft'],\n },\n control: { minHeight: 44, minWidth: 44, alignSelf: 'flex-start' },\n}));\n","import type { SettingsPanelProps } from '@agimon-ai/po-core/native';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { AppState } from 'react-native';\n\nimport type { DesktopPermission } from '../../../../types/desktopPermissions';\nimport { readDesktopPermissions, type DesktopPermissionsViewState } from '../_lib/desktopPermissions.native';\nimport { DesktopPermissionsView } from './DesktopPermissionsView.native';\n\nexport function DesktopPermissionsPanel({ request, requestWithStepUp }: SettingsPanelProps) {\n const [state, setState] = useState<DesktopPermissionsViewState>({\n status: 'loading',\n });\n const generation = useRef(0);\n const busy = useRef(false);\n\n const run = useCallback(\n async (permission?: DesktopPermission) => {\n if (busy.current) return;\n busy.current = true;\n const version = ++generation.current;\n setState((current) =>\n permission !== undefined && current.status === 'ready'\n ? { ...current, asking: permission }\n : { status: 'loading' },\n );\n const next = await readDesktopPermissions(permission === undefined ? request : requestWithStepUp, permission);\n if (generation.current !== version) return;\n busy.current = false;\n setState(next);\n },\n [request, requestWithStepUp],\n );\n\n useEffect(() => {\n // Read macOS on mount and when returning from its permission prompt or System Settings.\n // oxlint-disable-next-line react/set-state-in-effect\n void run();\n const subscription = AppState.addEventListener('change', (next) => {\n if (next === 'active') void run();\n });\n return () => {\n generation.current += 1;\n busy.current = false;\n subscription.remove();\n };\n }, [run]);\n\n return (\n <DesktopPermissionsView state={state} onAsk={(permission) => void run(permission)} onRefresh={() => void run()} />\n );\n}\n","import { defineSettingsPanel } from '@agimon-ai/po-core/native';\n\nimport { DesktopPermissionsPanel } from './_components/DesktopPermissionsPanel.native';\n\nexport default defineSettingsPanel({\n label: 'Permissions',\n detail: 'What Po may do on the paired Mac',\n order: 46,\n component: DesktopPermissionsPanel,\n});\n","import { defineActivityGroup } from '@agimon-ai/po-core/native';\n\nimport { COMPUTER_USE_STATUS_KEY } from '../../../../../types/computerUseApi';\n\n/** Remote clients request control from the Desktop host through their session Activity. */\nexport default defineActivityGroup({\n name: 'computer-use',\n keys: 'c e',\n statusKey: COMPUTER_USE_STATUS_KEY,\n hideWhenEmpty: true,\n marksBackgroundWork: false,\n});\n","import { defineSessionStore } from '@agimon-ai/po-core/native';\n\nimport { computerUseChannelType } from '../../../../../types/computerUseApi';\nimport type { ComputerUseChannelPayload, ComputerUseSessionView } from '../../../../../types/computerUseApi';\n\nexport interface ComputerUseSession extends ComputerUseChannelPayload {}\n\nconst initialState: ComputerUseSession = {\n state: { sessionId: '', revision: 0, wake: 0, phase: 'inactive' },\n targets: [],\n};\n\nexport const computerUse = defineSessionStore<ComputerUseSession>(initialState);\n\n/** Revision zero must hydrate the empty selector once; equal status polls then retain identity. */\nexport function updateComputerUseState(sessionId: string, state: ComputerUseSessionView) {\n computerUse.update(sessionId, (current) =>\n current.state.sessionId === '' || state.revision > current.state.revision ? { ...current, state } : current,\n );\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport const computerUseChannel = computerUse.channel<ComputerUseChannelPayload>({\n channel: computerUseChannelType,\n parse(input) {\n if (!isRecord(input) || !isRecord(input.state) || !Array.isArray(input.targets)) return null;\n if (typeof input.state.phase !== 'string' || typeof input.state.revision !== 'number') return null;\n return input as unknown as ComputerUseChannelPayload;\n },\n reduce: (_current, payload) => payload,\n});\n","import { defineChannelFile } from '@agimon-ai/po-core/native';\n\nimport { computerUseChannel } from '../_lib/computerUseStore.native';\n\nexport default defineChannelFile(computerUseChannel);\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport { Button, CheckIcon, fontOf } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { useCallback, useEffect, useState, useSyncExternalStore } from 'react';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { COMPUTER_USE_DEFAULT_DURATION_MS, computerUseChannelType } from '../../../../../../types/computerUseApi';\nimport type { ComputerUseSessionView } from '../../../../../../types/computerUseApi';\nimport { computerUse } from '../../_lib/computerUseStore.native';\n\nfunction remaining(ms: number): string {\n const seconds = Math.max(0, Math.ceil(ms / 1000));\n return `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, '0')} left`;\n}\n\nexport function ComputerUseView({\n state,\n error,\n onCancel,\n onStop,\n}: {\n state: ComputerUseSessionView;\n error?: string;\n onCancel: () => void;\n onStop: () => void;\n}) {\n const pending = state.phase === 'awaiting_confirmation' || state.phase === 'activating';\n const active = state.phase === 'active' || state.phase === 'stopping';\n const failure = error ?? state.failure?.message;\n const expiresAt = state.phase === 'active' ? state.expiresAt : undefined;\n const [now, setNow] = useState(Date.now);\n useEffect(() => {\n if (expiresAt === undefined) return;\n const timer = setInterval(() => setNow(Date.now()), 1000);\n return () => clearInterval(timer);\n }, [expiresAt]);\n const left = expiresAt === undefined ? undefined : expiresAt - now;\n const total = state.durationMs ?? COMPUTER_USE_DEFAULT_DURATION_MS;\n const controlled =\n state.target?.scope === 'desktop'\n ? 'your whole desktop'\n : typeof state.target?.applicationName === 'string'\n ? state.target.applicationName\n : 'the chosen window';\n // A monitor, not a setup form: an inactive session shows nothing, and a finished recording reaches the person by notification.\n if (state.phase === 'inactive') return null;\n return (\n <View style={styles.panel}>\n <View style={styles.header}>\n <Text style={styles.title} accessibilityRole=\"header\">\n Computer use\n </Text>\n </View>\n {failure ? (\n <Text style={styles.error} accessibilityRole=\"alert\">\n {failure}\n </Text>\n ) : null}\n {state.artifact?.status === 'ready' ? (\n <View style={styles.row}>\n <View style={styles.check}>\n <CheckIcon size={12} color=\"rail\" />\n </View>\n <Text style={styles.text}>Recording finished.</Text>\n </View>\n ) : null}\n {state.artifact?.failure ? <Text style={styles.error}>{state.artifact.failure.message}</Text> : null}\n {pending ? (\n <>\n <Text style={styles.text}>Desktop activation is pending.</Text>\n <Button variant=\"outline\" onPress={onCancel}>\n Cancel activation\n </Button>\n </>\n ) : active ? (\n <>\n <View style={styles.row} accessibilityLiveRegion=\"polite\">\n <View style={styles.dot} />\n <Text style={styles.live}>\n {state.phase === 'stopping' ? 'Po is handing control back' : `Po is controlling ${controlled}`}\n </Text>\n </View>\n {left === undefined ? null : (\n <View style={styles.row}>\n <View\n style={styles.track}\n accessibilityRole=\"progressbar\"\n accessibilityLabel=\"Time left\"\n accessibilityValue={{\n min: 0,\n max: total,\n now: Math.max(0, left),\n }}\n >\n <View\n style={[\n styles.fill,\n {\n width: `${Math.min(100, Math.max(0, (left / total) * 100))}%`,\n },\n ]}\n />\n </View>\n <Text style={styles.detail}>{remaining(left)}</Text>\n </View>\n )}\n <Button variant=\"outline\" disabled={state.phase === 'stopping'} onPress={onStop}>\n Stop computer use\n </Button>\n </>\n ) : null}\n </View>\n );\n}\n\nfunction SessionPanel({ sessionId, sendSessionFrame }: WebPluginSlotProps & { sessionId: string }) {\n const subscribe = useCallback((listener: () => void) => {\n const subscription = computerUse.store.subscribe(listener);\n return () => subscription.unsubscribe();\n }, []);\n // Native plugins may not import @tanstack/react-store; it is not a native host module.\n const session = useSyncExternalStore(subscribe, () => computerUse.select(computerUse.store.state, sessionId));\n const [error, setError] = useState<string>();\n\n useEffect(() => {\n sendSessionFrame(sessionId, {\n type: computerUseChannelType,\n payload: { action: 'status' },\n });\n }, [sessionId, sendSessionFrame]);\n\n const stop = (message: string) => {\n setError(undefined);\n try {\n sendSessionFrame(sessionId, {\n type: computerUseChannelType,\n payload: { action: 'stop' },\n });\n } catch {\n setError(message);\n }\n };\n\n return (\n <ComputerUseView\n state={session.state}\n error={error}\n onCancel={() => stop('The activation could not be cancelled.')}\n onStop={() => stop('The stop request is unavailable.')}\n />\n );\n}\n\nexport function ComputerUsePanel(props: WebPluginSlotProps) {\n return props.sessionId === null ? (\n <Text style={styles.detail}>Select a session.</Text>\n ) : (\n <SessionPanel key={props.sessionId} {...props} sessionId={props.sessionId} />\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n panel: { gap: theme.spacing(3) },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n borderBottomWidth: 1,\n borderBottomColor: theme.colors['border-soft'],\n },\n title: {\n flex: 1,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n fontWeight: '600',\n color: theme.colors.hi,\n },\n row: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2) },\n dot: {\n width: 8,\n height: 8,\n borderRadius: 4,\n backgroundColor: theme.colors.green,\n },\n live: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n color: theme.colors.green,\n },\n track: {\n flex: 1,\n height: 6,\n borderRadius: 3,\n overflow: 'hidden',\n backgroundColor: theme.colors['border-soft'],\n },\n fill: {\n height: '100%',\n borderRadius: 3,\n backgroundColor: theme.colors.green,\n },\n check: {\n width: 20,\n height: 20,\n borderRadius: 10,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.colors.green,\n },\n text: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n color: theme.colors.text,\n },\n detail: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.dim,\n },\n error: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n color: theme.colors.red,\n },\n}));\n","import { defineFill } from '@agimon-ai/po-core/native';\n\nimport { ComputerUsePanel } from './_components/ComputerUsePanel.native';\n\nexport default defineFill({\n id: 'computer-use',\n slot: 'activity.computer-use',\n component: ComputerUsePanel,\n});\n","// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web contract.\n\n/** Lines a computer tool card shows before it expands, on web and native alike. */\nexport const COMPUTER_TOOL_COLLAPSED_LINES = 8;\n/** Elements of an observation the native card lists before it expands. */\nexport const COMPUTER_ELEMENTS_PREVIEW = 5;\n/** Script log lines the native card lists before it expands. */\nexport const COMPUTER_LOGS_PREVIEW = 3;\n\nconst MS_PER_SECOND = 1000;\n\n/** The computer_state call's summary: it always observes the one authorized window. */\nexport function computerStateCallSummary(_args: Readonly<Record<string, unknown>>): string {\n return 'authorized window';\n}\n\n/**\n * The computer_action call as its two pieces: the action kind first, the element\n * it targets second. Either may be missing; the empty ones are dropped.\n */\nexport function computerActionCallParts(args: Readonly<Record<string, unknown>>): readonly string[] {\n const kind = typeof args.kind === 'string' ? args.kind : '';\n const ref = typeof args.elementRef === 'string' ? args.elementRef : '';\n return [kind, ref].filter(Boolean);\n}\n\n/** The computer_exec call's summary: the script it ran. */\nexport function computerExecCallSummary(args: Readonly<Record<string, unknown>>): string {\n return typeof args.scriptPath === 'string' ? args.scriptPath : '';\n}\n\n/**\n * The script path as its folder and its file name, so a phone header can let the\n * folder truncate while the script name stays whole.\n */\nexport function computerExecPathParts(path: string): {\n readonly folder: string;\n readonly name: string;\n} {\n const cut = path.lastIndexOf('/');\n return cut < 0 ? { folder: '', name: path } : { folder: path.slice(0, cut + 1), name: path.slice(cut + 1) };\n}\n\nexport interface ComputerElementView {\n readonly ref: string;\n /** The accessibility role in words: `AXTextField` reads `text field`. */\n readonly role: string;\n /** The label, else the value, else empty. */\n readonly label: string;\n readonly enabled: boolean;\n readonly secure: boolean;\n}\n\nexport interface ComputerObservationView {\n readonly applicationName: string;\n readonly windowTitle: string;\n readonly elements: readonly ComputerElementView[];\n /** The next page's offset when more elements exist than this page holds. */\n readonly nextOffset?: number;\n readonly truncated: boolean;\n readonly screenshotArtifact?: string;\n}\n\nexport interface ComputerFieldView {\n readonly key: string;\n readonly value: string;\n}\n\nexport interface ComputerRunView {\n /** The script's return value as short key and value pairs, never raw JSON. */\n readonly fields: readonly ComputerFieldView[];\n readonly logs: readonly string[];\n readonly actions?: number;\n readonly observations?: number;\n /** `3.4s`, from the run's metrics. */\n readonly duration?: string;\n readonly observation?: ComputerObservationView;\n}\n\nexport interface ComputerFailureView {\n readonly reason: string;\n /** Actions that finished before the run stopped, so the agent does not replay them. */\n readonly completedActions?: number;\n readonly outcomeUncertain: boolean;\n}\n\n/** What a computer tool result says, parsed and validated; `text` only when it is not JSON the card knows. */\nexport type ComputerResultView =\n | {\n readonly kind: 'observation';\n readonly observation: ComputerObservationView;\n }\n | { readonly kind: 'run'; readonly run: ComputerRunView }\n | { readonly kind: 'applied' }\n | {\n readonly kind: 'launched';\n readonly applicationName: string;\n readonly bundleId: string;\n }\n | { readonly kind: 'failure'; readonly failure: ComputerFailureView }\n | { readonly kind: 'text'; readonly lines: readonly string[] };\n\nfunction record(value: unknown): Record<string, unknown> | undefined {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\nconst text = (value: unknown): string => (typeof value === 'string' ? value : '');\nconst count = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : undefined;\n\n/** The result's text blocks joined; images (the screenshot) are dropped, as the web cards drop them. */\nexport function computerResultText(content: readonly unknown[]): string {\n return content\n .flatMap((block) => {\n const entry = record(block);\n return entry?.type === 'text' && typeof entry.text === 'string' ? [entry.text] : [];\n })\n .join('\\n');\n}\n\n/** `AXTextField` as `text field`; a role without the AX prefix is kept as it came. */\nexport function computerRoleWords(role: string): string {\n if (!role.startsWith('AX')) return role;\n return role\n .slice(2)\n .replace(/([a-z])([A-Z])/gu, '$1 $2')\n .toLowerCase();\n}\n\nfunction element(value: unknown): ComputerElementView[] {\n const entry = record(value);\n if (entry === undefined || typeof entry.ref !== 'string') return [];\n return [\n {\n ref: entry.ref,\n role: computerRoleWords(text(entry.role)),\n label: text(entry.label) || text(entry.value),\n enabled: entry.enabled !== false,\n secure: entry.secure === true,\n },\n ];\n}\n\n/** An observation when the value is one: an application name and an element list. */\nexport function computerObservationView(value: unknown): ComputerObservationView | undefined {\n const entry = record(value);\n if (entry === undefined || typeof entry.applicationName !== 'string' || !Array.isArray(entry.elements))\n return undefined;\n const nextOffset = count(entry.nextOffset);\n const artifact = text(entry.screenshotArtifact);\n return {\n applicationName: entry.applicationName,\n windowTitle: text(entry.windowTitle),\n elements: entry.elements.flatMap(element),\n truncated: entry.truncated === true || nextOffset !== undefined,\n ...(nextOffset === undefined ? {} : { nextOffset }),\n ...(artifact.length > 0 ? { screenshotArtifact: artifact } : {}),\n };\n}\n\n/** One value of a script result as a short phrase: scalars as they read, collections by their size. */\nfunction phrase(value: unknown): string {\n if (value === null || value === undefined) return 'none';\n if (typeof value === 'string') return value;\n if (typeof value === 'number' || typeof value === 'boolean') return String(value);\n if (Array.isArray(value)) return `${String(value.length)} item${value.length === 1 ? '' : 's'}`;\n const size = Object.keys(value as object).length;\n return `${String(size)} field${size === 1 ? '' : 's'}`;\n}\n\n/** A script's return value as fields: an object's own keys, or one `result` field for anything else. */\nexport function computerResultFields(value: unknown): ComputerFieldView[] {\n if (value === undefined) return [];\n const entry = record(value);\n if (entry === undefined) return [{ key: 'result', value: phrase(value) }];\n return Object.entries(entry).map(([key, field]) => ({\n key,\n value: phrase(field),\n }));\n}\n\nfunction run(entry: Record<string, unknown>): ComputerRunView | undefined {\n if (!Array.isArray(entry.logs)) return undefined;\n const observation = computerObservationView(entry.observation);\n const metrics = record(entry.metrics);\n const actions = count(metrics?.actions);\n const observations = count(metrics?.observations);\n const durationMs = count(metrics?.durationMs);\n return {\n fields: computerResultFields(entry.result),\n logs: entry.logs.filter((line): line is string => typeof line === 'string'),\n ...(actions === undefined ? {} : { actions }),\n ...(observations === undefined ? {} : { observations }),\n ...(durationMs === undefined ? {} : { duration: `${(durationMs / MS_PER_SECOND).toFixed(1)}s` }),\n ...(observation === undefined ? {} : { observation }),\n };\n}\n\nfunction failure(entry: Record<string, unknown>): ComputerFailureView | undefined {\n if (typeof entry.error !== 'string') return undefined;\n const completedActions = count(entry.completedActions);\n return {\n reason: entry.error,\n ...(completedActions === undefined ? {} : { completedActions }),\n outcomeUncertain: entry.outcomeUncertain === true,\n };\n}\n\n/** The text as lines a card can count: CRLF folded, tabs widened, trailing blank lines dropped. */\nfunction lines(value: string): string[] {\n if (value.length === 0) return [];\n const split = value.replaceAll('\\r\\n', '\\n').replaceAll('\\t', ' ').split('\\n');\n while (split.length > 0 && split.at(-1)?.trim() === '') split.pop();\n return split;\n}\n\n/**\n * A computer tool result as the card lays it out. The tools answer in JSON (an\n * observation, an action's outcome, a script run, a script failure) or in a\n * plain sentence when they fail early; anything that does not parse as a shape\n * the card knows falls back to its text lines.\n */\nexport function computerResultView(content: readonly unknown[]): ComputerResultView {\n const raw = computerResultText(content);\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n return { kind: 'text', lines: lines(raw) };\n }\n const entry = record(parsed);\n const observation = computerObservationView(parsed);\n if (observation !== undefined) return { kind: 'observation', observation };\n const ran = entry === undefined ? undefined : run(entry);\n if (ran !== undefined) return { kind: 'run', run: ran };\n const failed = entry === undefined ? undefined : failure(entry);\n if (failed !== undefined) return { kind: 'failure', failure: failed };\n if (entry?.launched === true && typeof entry.applicationName === 'string')\n return {\n kind: 'launched',\n applicationName: entry.applicationName,\n bundleId: text(entry.bundleId),\n };\n if (entry?.applied === true) return { kind: 'applied' };\n return { kind: 'text', lines: lines(raw) };\n}\n\n/** How many rows the view holds back while collapsed, so the card offers expand only when it reveals something. */\nexport function computerResultHidden(view: ComputerResultView): number {\n switch (view.kind) {\n case 'observation':\n return Math.max(0, view.observation.elements.length - COMPUTER_ELEMENTS_PREVIEW);\n case 'run':\n return Math.max(0, view.run.logs.length - COMPUTER_LOGS_PREVIEW);\n case 'text':\n return Math.max(0, view.lines.length - COMPUTER_TOOL_COLLAPSED_LINES);\n default:\n return 0;\n }\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport { Badge, fontOf, MessageItemBody, MessageItemStatus } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport {\n COMPUTER_ELEMENTS_PREVIEW,\n COMPUTER_LOGS_PREVIEW,\n COMPUTER_TOOL_COLLAPSED_LINES,\n type ComputerElementView,\n type ComputerFailureView,\n type ComputerObservationView,\n type ComputerResultView,\n type ComputerRunView,\n computerResultHidden,\n computerResultView,\n} from '../_lib/computerToolView';\n\n/** The parsed result, or none before the tool answers. */\nexport function computerResult(props: ToolMessageRenderProps): ComputerResultView | undefined {\n return props.result === null ? undefined : computerResultView(props.result.content);\n}\n\n/** Whether the card has rows to reveal: the header offers expand only then, and never on a failure. */\nexport function computerResultExpandable(props: ToolMessageRenderProps): boolean {\n const view = computerResult(props);\n return !props.isError && view !== undefined && computerResultHidden(view) > 0;\n}\n\n/**\n * The body the three computer tool cards share on native. The web cards print\n * the result's text; the tools answer in JSON, so this lays the parsed result\n * out instead: the window and its elements, a script's figures and logs, an\n * action's outcome. A preview shows while collapsed, as the web's first lines\n * do. A failure shows only its reason in red, with a quiet note of any actions\n * that already ran; the header's edge and outcome already say it failed.\n */\nexport function ComputerResultBody({ props, expanded }: { props: ToolMessageRenderProps; expanded: boolean }) {\n const { toolName, output, running, isError } = props;\n const view = computerResult(props);\n const testID = `tool-result-${toolName}`;\n if (isError) {\n const failure: ComputerFailureView =\n view?.kind === 'failure'\n ? view.failure\n : {\n reason: view?.kind === 'text' ? view.lines.join('\\n') : output.trim(),\n outcomeUncertain: false,\n };\n return failure.reason.length === 0 ? null : (\n <MessageItemBody testID={testID}>\n <FailureBlock failure={failure} />\n </MessageItemBody>\n );\n }\n if (view === undefined) {\n return running ? (\n <MessageItemBody testID={testID}>\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null;\n }\n if (view.kind === 'text' && view.lines.length === 0) return null;\n return (\n <MessageItemBody testID={testID}>\n <View style={styles.stack}>\n {view.kind === 'observation' ? <ObservationBlock observation={view.observation} expanded={expanded} /> : null}\n {view.kind === 'run' ? <RunBlock run={view.run} expanded={expanded} /> : null}\n {view.kind === 'applied' ? <Text style={[styles.sans, styles.text]}>Applied to the element.</Text> : null}\n {view.kind === 'launched' ? (\n <View style={styles.figure}>\n <Text numberOfLines={1} style={[styles.sans, styles.strong, styles.keep]}>\n Opened {view.applicationName}\n </Text>\n <Text numberOfLines={1} style={[styles.mono, styles.faint, styles.yield]}>\n {view.bundleId}\n </Text>\n </View>\n ) : null}\n {view.kind === 'text' ? <TextLines lines={view.lines} expanded={expanded} /> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n </View>\n </MessageItemBody>\n );\n}\n\nfunction FailureBlock({ failure }: { failure: ComputerFailureView }) {\n const done = failure.completedActions;\n const note = [\n done === undefined ? '' : `${String(done)} action${done === 1 ? '' : 's'} already ran`,\n failure.outcomeUncertain ? 'the last outcome is uncertain' : '',\n ].filter(Boolean);\n return (\n <View style={styles.stack}>\n <Text selectable style={[styles.sans, styles.error]}>\n {failure.reason}\n </Text>\n {note.length > 0 ? <Text style={[styles.small, styles.faint]}>{note.join(', ')}.</Text> : null}\n </View>\n );\n}\n\nfunction WindowLine({ observation, lead }: { observation: ComputerObservationView; lead?: string }) {\n return (\n <View style={styles.figure}>\n <Text numberOfLines={1} style={[styles.sans, styles.strong, styles.keep]}>\n {lead === undefined ? '' : `${lead} `}\n {observation.applicationName}\n </Text>\n {observation.windowTitle.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.dim, styles.yield]}>\n {observation.windowTitle}\n </Text>\n ) : null}\n </View>\n );\n}\n\nfunction ElementRow({ element }: { element: ComputerElementView }) {\n // A secure field's role already says so (`secure text field`); the flag is named only when it does not.\n const secure = element.secure && !element.role.includes('secure');\n const traits = [element.role, element.enabled ? '' : 'disabled', secure ? 'secure' : ''].filter(Boolean);\n return (\n <View style={styles.row} accessibilityLabel={`${element.label} ${traits.join(' ')} ${element.ref}`}>\n <Text numberOfLines={1} style={[styles.sans, element.enabled ? styles.text : styles.faint, styles.yield]}>\n {element.label.length > 0 ? element.label : element.role}\n </Text>\n <Text numberOfLines={1} style={[styles.small, styles.faint, styles.keep]}>\n {traits.join(' · ')}\n </Text>\n <Text numberOfLines={1} style={[styles.mono, styles.faint, styles.ref]}>\n {element.ref}\n </Text>\n </View>\n );\n}\n\nfunction ObservationBlock({ observation, expanded }: { observation: ComputerObservationView; expanded: boolean }) {\n const { elements } = observation;\n const shown = expanded ? elements : elements.slice(0, COMPUTER_ELEMENTS_PREVIEW);\n const hidden = elements.length - shown.length;\n return (\n <>\n <WindowLine observation={observation} />\n <View style={styles.chips}>\n <Badge size=\"xs\">{`${String(elements.length)} element${elements.length === 1 ? '' : 's'}`}</Badge>\n {observation.truncated ? (\n <Badge size=\"xs\" tone=\"yellow\">\n {observation.nextOffset === undefined\n ? 'more not shown'\n : `more from offset ${String(observation.nextOffset)}`}\n </Badge>\n ) : null}\n </View>\n {shown.length > 0 ? (\n <View style={styles.list}>\n {shown.map((element) => (\n <ElementRow key={element.ref} element={element} />\n ))}\n </View>\n ) : null}\n {hidden > 0 ? <MessageItemStatus expands>{hidden} more elements</MessageItemStatus> : null}\n {observation.screenshotArtifact === undefined ? null : (\n <Text numberOfLines={2} style={[styles.small, styles.faint]}>\n Screenshot saved to {observation.screenshotArtifact}\n </Text>\n )}\n </>\n );\n}\n\nfunction RunBlock({ run, expanded }: { run: ComputerRunView; expanded: boolean }) {\n const figures = [\n run.actions === undefined ? '' : `${String(run.actions)} action${run.actions === 1 ? '' : 's'}`,\n run.observations === undefined ? '' : `${String(run.observations)} observation${run.observations === 1 ? '' : 's'}`,\n run.duration ?? '',\n ].filter(Boolean);\n const logs = expanded ? run.logs : run.logs.slice(0, COMPUTER_LOGS_PREVIEW);\n const hidden = run.logs.length - logs.length;\n return (\n <>\n {figures.length > 0 ? (\n <View style={styles.chips}>\n {figures.map((figure) => (\n <Badge key={figure} size=\"xs\">\n {figure}\n </Badge>\n ))}\n </View>\n ) : null}\n {run.fields.length > 0 ? (\n <View style={styles.list}>\n {run.fields.map((field) => (\n <View key={field.key} style={styles.row}>\n <Text numberOfLines={1} style={[styles.small, styles.faint, styles.key]}>\n {field.key}\n </Text>\n <Text numberOfLines={1} selectable style={[styles.sans, styles.text, styles.yield]}>\n {field.value}\n </Text>\n </View>\n ))}\n </View>\n ) : null}\n {logs.length > 0 ? (\n <View style={styles.list}>\n {logs.map((line, index) => (\n <Text key={`${String(index)}-${line}`} numberOfLines={1} selectable style={[styles.mono, styles.dim]}>\n {line}\n </Text>\n ))}\n </View>\n ) : null}\n {hidden > 0 ? <MessageItemStatus expands>{hidden} more log lines</MessageItemStatus> : null}\n {run.observation === undefined ? null : <WindowLine observation={run.observation} lead=\"Ended on\" />}\n </>\n );\n}\n\nfunction TextLines({ lines, expanded }: { lines: readonly string[]; expanded: boolean }) {\n const shown = expanded ? lines : lines.slice(0, COMPUTER_TOOL_COLLAPSED_LINES);\n const hidden = lines.length - shown.length;\n return (\n <>\n <View style={styles.list}>\n {shown.map((line, index) => (\n <Text key={`${String(index)}-${line}`} selectable style={[styles.sans, styles.dim]}>\n {line}\n </Text>\n ))}\n </View>\n {hidden > 0 ? <MessageItemStatus expands>{hidden} more line(s)</MessageItemStatus> : null}\n </>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n stack: { gap: theme.spacing(2) },\n list: { gap: theme.spacing(1) },\n chips: { flexDirection: 'row', flexWrap: 'wrap', gap: theme.spacing(1.5) },\n figure: {\n flexDirection: 'row',\n alignItems: 'baseline',\n gap: theme.spacing(2),\n minWidth: 0,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'baseline',\n gap: theme.spacing(2),\n minWidth: 0,\n },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n small: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n },\n mono: {\n fontFamily: fontOf(theme.fontFamily.mono),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n },\n strong: { color: theme.colors.text, fontWeight: theme.fontWeight.semibold },\n text: { color: theme.colors.text },\n dim: { color: theme.colors.dim },\n faint: { color: theme.colors.faint },\n error: { color: theme.colors.red },\n // The primary piece stays whole up to most of the row; the secondary detail truncates first.\n keep: { flexShrink: 0, maxWidth: '60%' },\n yield: { flexShrink: 1, minWidth: 0 },\n key: { flexShrink: 0, maxWidth: '40%' },\n ref: { flexShrink: 0, marginLeft: 'auto' },\n}));\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport { fontOf, MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { computerActionCallParts } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody.native';\n\n/**\n * The computer_action tool's timeline item on native, as the web's: the action\n * and the element it targets in the header, the outcome's first lines beneath.\n */\nexport function ComputerActionToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n const [kind, ...target] = computerActionCallParts(args);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <View testID={`tool-call-${toolName}`} style={styles.summary}>\n {kind === undefined ? null : (\n <Text numberOfLines={1} style={[styles.sans, styles.primary]}>\n {kind}\n </Text>\n )}\n {target.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.detail]}>\n {target.join(' ')}\n </Text>\n ) : null}\n </View>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n minWidth: 0,\n },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n // The action is what Po did, so it stays whole; the element it targeted yields first.\n primary: { flexShrink: 0, maxWidth: '45%', color: theme.colors.text },\n detail: { flexShrink: 1, color: theme.colors.dim },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ComputerActionToolCard } from './_components/ComputerActionToolCard.native';\n\nexport default defineToolRenderer({\n tools: ['computer_action'],\n message: ComputerActionToolCard,\n});\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport { fontOf, MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { computerExecCallSummary, computerExecPathParts } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody.native';\n\n/**\n * The computer_exec tool's timeline item on native, as the web's: the script\n * path in the header, the run's first lines beneath it.\n */\nexport function ComputerExecToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n const path = computerExecPathParts(computerExecCallSummary(args));\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <View testID={`tool-call-${toolName}`} style={styles.summary}>\n {/* A long path loses its folder first, so the script name stays readable. */}\n {path.folder.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.folder]}>\n {path.folder}\n </Text>\n ) : null}\n <Text numberOfLines={1} style={[styles.sans, styles.primary]}>\n {path.name}\n </Text>\n </View>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: { flex: 1, flexDirection: 'row', alignItems: 'center', minWidth: 0 },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n folder: { flexShrink: 1, minWidth: 0, color: theme.colors.dim },\n primary: { flexShrink: 0, maxWidth: '100%', color: theme.colors.text },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ComputerExecToolCard } from './_components/ComputerExecToolCard.native';\n\nexport default defineToolRenderer({\n tools: ['computer_exec'],\n message: ComputerExecToolCard,\n});\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport { fontOf, MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { computerStateCallSummary } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody.native';\n\n/**\n * The computer_state tool's timeline item on native, as the web's: the observed\n * window in the header, the observation's first lines beneath it.\n */\nexport function ComputerStateToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <View testID={`tool-call-${toolName}`} style={styles.summary}>\n <Text numberOfLines={1} style={[styles.sans, styles.primary]}>\n {computerStateCallSummary(args)}\n </Text>\n </View>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n minWidth: 0,\n },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n primary: { flexShrink: 1, color: theme.colors.text },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ComputerStateToolCard } from './_components/ComputerStateToolCard.native';\n\nexport default defineToolRenderer({\n tools: ['computer_state'],\n message: ComputerStateToolCard,\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport settingDesktopPermissions from '../src/extensions/(frontend)/setting/desktop-permissions.panel.native';\nimport activityGroupComputerUse from '../src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.native';\nimport channelComputerUse from '../src/extensions/workspaces/sessions/(frontend)/channel/computer-use.native';\nimport fillComputerUse from '../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.native';\nimport toolComputerAction from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-action.native';\nimport toolComputerExec from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.native';\nimport toolComputerState from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-state.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\n id: 'computer-use',\n packageName: '@agimon-ai/po-computer-use',\n host: {\n get settingsPanels(): WebPluginContributions['settingsPanels'] { return [via({ id: 'desktop-permissions' }, settingDesktopPermissions)]; },\n },\n session: {\n get activityGroups(): WebPluginContributions['activityGroups'] { return [via({ name: 'computer-use' }, activityGroupComputerUse)]; },\n get channels(): WebPluginContributions['channels'] { return [via({ channel: 'computer_use' }, channelComputerUse)]; },\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'activity.computer-use', id: 'computer-use' }, fillComputerUse)]; },\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['computer_action'] }, toolComputerAction), via({ tools: ['computer_exec'] }, toolComputerExec), via({ tools: ['computer_state'] }, toolComputerState)]; },\n },\n});\n"],"mappings":";;;;;;;;;AACA,MAAa,yBAAyB;AAEtC,MAAa,0BAA0B;;;;;;;;AAmBvC,MAAa,sBAAsB;CACjC,UAAU;CACV,YAAY;CACZ,cAAc;CACd,aAAa;CACb,WAAW;CACX,UAAU;CACV,eAAe;CACf,kBAAkB;CAClB,SAAS;CACT,aAAa;CACb,SAAS;CACT,gBAAgB;AAClB;;;;AC/BA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;;;;;;;;;;ACkBA,MAAa,SAAS;CACpB,UAAU;EACR,QAAQ;EACR,MAAM,oBAAoB;EAC1B,OAAO,CAAC,cAAc,QAAQ;EAC9B,KAAK;CACP;CACA,YAAY;EACV,QAAQ;EACR,MAAM,oBAAoB;EAC1B,UAAU,KAAA;CACZ;;CAEA,cAAc;EACZ,QAAQ;EACR,MAAM,oBAAoB;EAC1B,UAAU,KAAA;CACZ;CACA,aAAa;EACX,QAAQ;EACR,MAAM,oBAAoB;EAC1B,UAAU,KAAA;CACZ;CACA,WAAW;EACT,QAAQ;EACR,MAAM,oBAAoB;EAC1B,UAAU,KAAA;CACZ;CACA,UAAU;EACR,QAAQ;EACR,MAAM,oBAAoB;EAC1B,UAAU,KAAA;CACZ;;CAEA,eAAe;EACb,QAAQ;EACR,MAAM,oBAAoB;EAC1B,UAAU,KAAA;CACZ;CACA,kBAAkB;EAChB,QAAQ;EACR,MAAM,oBAAoB;EAC1B,UAAU,KAAA;CAIZ;CACA,SAAS;EACP,QAAQ;EACR,MAAM,oBAAoB;EAC1B,UAAU,KAAA;CACZ;CACA,aAAa;EACX,QAAQ;EACR,MAAM,oBAAoB;EAC1B,UAAU,KAAA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,OAAO;IAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,EAAE,GAAGC,8BAAkB;IAAG,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE,GAAGC,4BAAgB;IAAG,IAAI,EAAE,OAAO,CAAC,gBAAgB,EAAE,GAAGC,6BAAiB;GAAC;EAAG;CAC/O;AACF,CAAC"}
|
package/dist/extensions/web.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.mjs","names":["legacy","computerUse","api","legacy","text","legacy","legacy","legacy","legacy","legacy","legacy","legacy","settingDesktopPermissions","settingComputerUse","settingDesktopEnvironment","settingComputerUse2","activityGroupComputerUse","channelComputerUse","fillComputerUse","modeComputerUse","toolComputerAction","toolComputerExec","toolComputerState"],"sources":["../../src/extensions/(frontend)/_lib/computerUseSettings.ts","../../src/extensions/(frontend)/_legacy/index.ts","../../src/extensions/(frontend)/setting/computer-use.web.ts","../../src/extensions/(frontend)/_lib/desktopEnvironmentSettings.ts","../../src/extensions/(frontend)/setting/desktop-environment.web.ts","../../src/types/computerUseApi.ts","../../src/types/desktopPermissions.ts","../../src/types/apiRoutes.ts","../../generated/client.ts","../../src/extensions/(frontend)/setting/_components/DesktopPermissionsView.tsx","../../src/extensions/(frontend)/setting/_components/DesktopPermissionsPanel.tsx","../../src/extensions/(frontend)/setting/desktop-permissions.panel.web.tsx","../../src/extensions/workspaces/(frontend)/_legacy/index.ts","../../src/extensions/workspaces/(frontend)/setting/computer-use.web.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/computerUseStore.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerResultBody.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerActionToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerExecToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerStateToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/_legacy/index.ts","../../src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.web.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/computer-use.web.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/mode/computer-use/mode.web.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-action.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-state.web.tsx","../../generated/web.ts"],"sourcesContent":["import type { SettingsSectionContribution } from '@agimon-ai/po-core/web';\n\nexport const computerUseSettingsSection: SettingsSectionContribution = {\n id: 'computer-use',\n desktopOnly: true,\n label: 'computer use',\n detail: 'control whether Po Desktop may expose session-scoped computer control',\n order: 45,\n fields: [\n {\n id: 'enabled',\n label: 'enable computer use',\n kind: 'toggle',\n keyPath: ['computerUse', 'enabled'],\n detail: 'Makes the computer-use mode available. Each control session still requires native confirmation.',\n },\n ],\n};\n","import type { WebPluginDefinition } from '@agimon-ai/po-core/web';\n\nimport { computerUseSettingsSection } from '../_lib/computerUseSettings';\n\nexport default {\n settingsSections: [computerUseSettingsSection],\n} satisfies NonNullable<WebPluginDefinition['host']>;\n","import { defineSettingsSection } from '@agimon-ai/po-core/web';\nimport { MonitorIcon } from '@agimon-ai/po-web-components';\n\nimport legacy from '../_legacy';\n\nexport default defineSettingsSection({\n ...legacy.settingsSections![0]!,\n icon: MonitorIcon,\n});\n","import type { SettingsSectionContribution } from '@agimon-ai/po-core/web';\n\n/**\n * What Po Desktop passes from your login shell to the server and agents. Settings\n * fields write single values, so the lists are shown here and edited in the file.\n */\nexport const desktopEnvironmentSettingsSection: SettingsSectionContribution = {\n id: 'desktop-environment',\n desktopOnly: true,\n label: 'desktop environment',\n detail: 'choose which login-shell variables Po Desktop passes to agents',\n order: 46,\n groups: [\n {\n id: 'shell',\n label: 'login shell',\n detail:\n 'Po Desktop reads your login shell once at start. Changes apply the next time Po Desktop starts. Core variables and PO_ settings always pass.',\n },\n ],\n fields: [\n {\n id: 'inherit',\n label: 'variables to pass',\n kind: 'select',\n keyPath: ['desktopEnvironment', 'inherit'],\n group: 'shell',\n presentation: 'cards',\n defaultValue: 'all',\n options: [\n {\n value: 'all',\n label: 'everything',\n detail: 'Every exported variable, including API keys, minus exclusions.',\n },\n {\n value: 'core',\n label: 'core only',\n detail: 'HOME, PATH, USER and similar. Add others under desktopEnvironment.set in ~/.po/config.yaml.',\n },\n ],\n },\n {\n id: 'exclude',\n label: 'excluded',\n kind: 'info',\n keyPath: ['desktopEnvironment', 'exclude'],\n group: 'shell',\n detail: 'Name patterns kept out, such as *_TOKEN. Edit desktopEnvironment.exclude in ~/.po/config.yaml.',\n },\n {\n id: 'include-only',\n label: 'only these',\n kind: 'info',\n keyPath: ['desktopEnvironment', 'includeOnly'],\n group: 'shell',\n detail: 'When set, only matching names pass. Edit desktopEnvironment.includeOnly in ~/.po/config.yaml.',\n },\n ],\n};\n","import { defineSettingsSection } from '@agimon-ai/po-core/web';\nimport { ShieldIcon } from '@agimon-ai/po-web-components';\n\nimport { desktopEnvironmentSettingsSection } from '../_lib/desktopEnvironmentSettings';\n\nexport default defineSettingsSection({\n ...desktopEnvironmentSettingsSection,\n icon: ShieldIcon,\n});\n","export const API_BASE_PATH = 'computer-use';\nexport const computerUseChannelType = 'computer_use_state';\nexport const COMPUTER_USE_MODE_ID = 'computer-use';\nexport const COMPUTER_USE_STATUS_KEY = 'po-computer-use';\nexport const COMPUTER_USE_MODE_STATUS_KEY = 'po-computer-use-mode';\nexport const COMPUTER_USE_MAX_DURATION_MS = 1_800 * 1_000;\nexport const COMPUTER_USE_DEFAULT_DURATION_MS = 300 * 1_000;\n/** The session lengths a person can pick when granting control, up to the maximum. */\nexport const COMPUTER_USE_DURATION_CHOICES_MS = [\n COMPUTER_USE_DEFAULT_DURATION_MS,\n 900_000,\n COMPUTER_USE_MAX_DURATION_MS,\n] as const;\nexport const COMPUTER_USE_CONFIRMATION_WINDOW_MS = 2 * 60 * 1_000;\n\n/**\n * Every path this API answers on, below its mount.\n *\n * The typed route table in `./apiRoutes` is built from this, the dispatcher\n * reads that table, and the hub channel addresses the broker with these same\n * strings, so a route cannot move on one side alone.\n */\nexport const COMPUTER_USE_ROUTES = {\n artifact: '/artifact',\n agentState: '/agent/state',\n agentObserve: '/agent/observe',\n agentAction: '/agent/action',\n agentStop: '/agent/stop',\n hubState: '/hub/state',\n hubActivation: '/hub/activation',\n hubAuthorization: '/hub/authorization',\n hubNext: '/hub/next',\n hubComplete: '/hub/complete',\n hubStop: '/hub/stop',\n hubRequestStop: '/hub/request-stop',\n} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\n\n/** A consented trace extra, read through the same grant-bound host store as the recording. */\nexport interface ComputerUseTraceFileView {\n readonly artifactId: string;\n readonly sizeBytes: number;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseArtifactView {\n readonly artifactId: string;\n readonly status: 'ready' | 'failed';\n readonly sizeBytes?: number;\n readonly downloadUrl?: string;\n readonly previewUrl?: string;\n readonly actionCount?: number;\n readonly completedAt?: string;\n readonly trace?: ComputerUseTraceFileView;\n readonly windows?: readonly ComputerUseTraceFileView[];\n readonly failure?: { readonly code: string; readonly message: string };\n}\n\nexport interface ComputerUseSessionView {\n readonly sessionId: string;\n readonly revision: number;\n readonly wake: number;\n readonly phase: 'inactive' | 'awaiting_confirmation' | 'activating' | 'active' | 'stopping' | 'failed';\n readonly requestId?: string;\n readonly target?: Record<string, unknown>;\n readonly durationMs?: number;\n readonly expiresAt?: number;\n readonly failure?: { readonly code: string; readonly message: string };\n readonly artifact?: ComputerUseArtifactView;\n}\n\nexport interface ComputerUseActivationRequest {\n readonly requestId: string;\n readonly target?: Record<string, unknown>;\n readonly durationSeconds: number;\n readonly createdAt: number;\n readonly confirmationExpiresAt: number;\n /** Set by the session broker only after the person approves the saved request. */\n readonly confirmedAt?: number;\n /** True only when the person approved keeping a redacted trace and window images for this one window. */\n readonly traceConsent: boolean;\n readonly caller: { readonly locality: 'approval'; readonly approvalId: string };\n}\n\nexport interface ComputerUseBrokerRequest {\n readonly id: string;\n readonly operation: 'observe' | 'act';\n readonly payload?: unknown;\n readonly grantId: string;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseChannelPayload {\n readonly state: ComputerUseSessionView;\n readonly targets: readonly Record<string, unknown>[];\n readonly busy?: true;\n}\n\nexport type ComputerUseBrowserCommand = {\n readonly action: 'status' | 'stop';\n};\n","/** The mount's only path: GET reads the permission states, POST asks macOS for one. */\nexport const DESKTOP_PERMISSIONS_PATH = '/';\n\n/** The macOS privacy permissions Desktop reports, in the order the settings page shows them. */\nexport const DESKTOP_PERMISSIONS = [\n 'accessibility',\n 'screen-recording',\n 'microphone',\n 'automation',\n 'full-disk-access',\n] as const;\nexport type DesktopPermission = (typeof DESKTOP_PERMISSIONS)[number];\n\n/** `per-app` is Automation: macOS asks once for each app Po controls and reports no overall state. */\nexport type DesktopPermissionState = 'granted' | 'denied' | 'not-determined' | 'per-app';\nexport type DesktopPermissionStates = Record<DesktopPermission, DesktopPermissionState>;\n\nexport interface DesktopPermissionRequest {\n readonly permission: DesktopPermission;\n}\n\nexport function isDesktopPermission(value: unknown): value is DesktopPermission {\n return typeof value === 'string' && (DESKTOP_PERMISSIONS as readonly string[]).includes(value);\n}\n","import type { ApiResponseOf, ApiRoutes } from '@agimon-ai/po-core/web';\n\nimport {\n COMPUTER_USE_ROUTES,\n type ComputerUseActivationRequest,\n type ComputerUseBrokerRequest,\n type ComputerUseSessionView,\n} from './computerUseApi';\nimport { DESKTOP_PERMISSIONS_PATH, type DesktopPermissionStates } from './desktopPermissions';\n\n/**\n * This package's routes, as data.\n *\n * No scope and no base path: the build reads both off\n * `src/extensions/workspaces/sessions/(backend)/api/computer-use/`, so the\n * mount is stated once, by the folder that creates it.\n *\n * The paths come from `COMPUTER_USE_ROUTES` rather than being written out\n * again. That table already addressed the broker from the hub channel and from\n * the broker's own dispatcher, and a second copy here is exactly the\n * disagreement this file exists to prevent. The dispatcher now reads this\n * table, so the page, the broker and the hub all resolve one set of strings.\n *\n * Recording reads can be reached from a browser with recording authorization. The `/agent/` and `/hub/` routes\n * each demand a host-issued bearer token and answer 404 without one; they are\n * declared here because they are this API's surface, not because a page calls\n * them.\n */\nexport const routes = {\n artifact: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.artifact,\n query: ['artifactId', 'offset'],\n raw: true,\n },\n agentState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.agentState,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Answers whatever the admitted Desktop provider returned, which is runtime-defined JSON. */\n agentObserve: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentObserve,\n response: undefined as unknown as ApiResponseOf<unknown>,\n },\n agentAction: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentAction,\n response: undefined as unknown as ApiResponseOf<unknown>,\n },\n agentStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubState,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Null until a reader has confirmed one; reading it moves the session to `activating`. */\n hubActivation: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubActivation,\n response: undefined as unknown as ApiResponseOf<ComputerUseActivationRequest | null>,\n },\n hubAuthorization: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubAuthorization,\n response: undefined as unknown as ApiResponseOf<{\n readonly grantId: string;\n readonly expiresAt?: number;\n } | null>,\n },\n hubNext: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubNext,\n response: undefined as unknown as ApiResponseOf<ComputerUseBrokerRequest | null>,\n },\n hubComplete: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubComplete,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubRequestStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubRequestStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Desktop's macOS permission states, served by the hub's `desktop-permissions` mount. */\n desktopPermissions: {\n method: 'GET',\n path: DESKTOP_PERMISSIONS_PATH,\n response: undefined as unknown as ApiResponseOf<DesktopPermissionStates>,\n },\n /** Asks macOS for the body's permission on the Mac running Desktop; answers the states after. */\n requestDesktopPermission: {\n method: 'POST',\n path: DESKTOP_PERMISSIONS_PATH,\n response: undefined as unknown as ApiResponseOf<DesktopPermissionStates>,\n },\n} as const satisfies ApiRoutes;\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { createApiClient, sessionApiAddress } from '@agimon-ai/po-core/web';\nimport { browserTransport } from '@agimon-ai/po-web-security/browser';\n\nimport { routes } from '../src/types/apiRoutes';\n\n/** Scopes the tree mounts 'computer-use' at for the computer-use mount. */\nexport const computerUseScopes = ['session'] as const;\n\nexport const computerUse = createApiClient(routes, {\n scopes: computerUseScopes,\n basePath: 'computer-use',\n transport: (input, init) => browserTransport.fetch(input, init),\n sessionAddress: sessionApiAddress,\n});\n\n/** Scopes the tree mounts 'desktop-permissions' at for the desktop-permissions mount. */\nexport const desktopPermissionsScopes = ['host', 'workspace', 'session'] as const;\n\nexport const desktopPermissions = createApiClient(routes, {\n scopes: desktopPermissionsScopes,\n basePath: 'desktop-permissions',\n transport: (input, init) => browserTransport.fetch(input, init),\n sessionAddress: sessionApiAddress,\n});\n","import {\n Badge,\n Button,\n SettingsActions,\n SettingsCard,\n SettingsRow,\n SettingsRowDescription,\n SettingsRowText,\n SettingsRowTitle,\n SettingsSection,\n SettingsSectionDescription,\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@agimon-ai/po-web-components';\n\nimport {\n DESKTOP_PERMISSIONS,\n type DesktopPermission,\n type DesktopPermissionState,\n type DesktopPermissionStates,\n} from '../../../../types/desktopPermissions';\n\nexport type DesktopPermissionsViewState =\n | { status: 'loading' }\n | {\n status: 'ready';\n states: DesktopPermissionStates;\n asking?: DesktopPermission;\n }\n | { status: 'unavailable' }\n | { status: 'error'; error: string };\n\nexport interface DesktopPermissionsViewProps {\n state: DesktopPermissionsViewState;\n /** Read from a paired device rather than the Desktop window, so prompts appear on another screen. */\n remote: boolean;\n onAsk: (permission: DesktopPermission) => void;\n onRefresh: () => void;\n}\n\nconst COPY: Record<DesktopPermission, { title: string; detail: string }> = {\n accessibility: {\n title: 'Accessibility',\n detail: 'Lets Po press buttons, fill fields and scroll in the app window you approve for computer use.',\n },\n 'screen-recording': {\n title: 'Screen and system audio recording',\n detail:\n 'Lets Po see and record the window you approve, with its sound. macOS asks you to reopen Po after you allow it.',\n },\n microphone: {\n title: 'Microphone',\n detail: 'Lets you talk to Po, and adds your voice to computer-use recordings.',\n },\n automation: {\n title: 'Automation',\n detail:\n 'Lets Po and its agents control other apps, such as Finder or Mail. macOS asks once for each app; your answers are listed in System Settings.',\n },\n 'full-disk-access': {\n title: 'Full Disk Access',\n detail:\n 'Optional. Lets agents and their tools read Documents, Downloads and Mail without a prompt for each folder.',\n },\n};\n\nconst BADGE: Record<DesktopPermissionState, { label: string; tone: 'green' | 'neutral' }> = {\n granted: { label: 'Allowed', tone: 'green' },\n denied: { label: 'Not allowed', tone: 'neutral' },\n 'not-determined': { label: 'Not asked yet', tone: 'neutral' },\n 'per-app': { label: 'Asked per app', tone: 'neutral' },\n};\n\nfunction PermissionRow({\n permission,\n state,\n asking,\n waiting,\n onAsk,\n}: {\n permission: DesktopPermission;\n state: DesktopPermissionState;\n asking: boolean;\n waiting: boolean;\n onAsk: (permission: DesktopPermission) => void;\n}) {\n const badge = BADGE[state];\n return (\n <SettingsRow asChild className=\"items-start\" data-testid={`desktop-permission-${permission}`}>\n <li>\n <SettingsRowText className=\"gap-1\">\n <SettingsRowTitle className=\"flex min-h-6 items-center gap-2\">\n {COPY[permission].title}\n <Badge tone={badge.tone}>{badge.label}</Badge>\n </SettingsRowTitle>\n <SettingsRowDescription>{COPY[permission].detail}</SettingsRowDescription>\n </SettingsRowText>\n {state === 'granted' ? null : (\n <Button variant=\"outline\" size=\"sm\" disabled={waiting} onClick={() => onAsk(permission)}>\n {asking ? 'Waiting for macOS' : state === 'not-determined' ? 'Allow' : 'Open System Settings'}\n </Button>\n )}\n </li>\n </SettingsRow>\n );\n}\n\nfunction Message({\n title,\n detail,\n alert,\n action,\n}: {\n title: string;\n detail: string;\n alert?: boolean;\n action?: () => void;\n}) {\n return (\n <SettingsRow asChild role={alert ? 'alert' : 'status'}>\n <li>\n <SettingsRowText>\n <SettingsRowTitle>{title}</SettingsRowTitle>\n <SettingsRowDescription>{detail}</SettingsRowDescription>\n </SettingsRowText>\n {action === undefined ? null : (\n <Button variant=\"outline\" size=\"sm\" onClick={action}>\n Try again\n </Button>\n )}\n </li>\n </SettingsRow>\n );\n}\n\n/** The macOS permissions Po needs on the Mac running Desktop, each with the one step that changes it. */\nexport function DesktopPermissionsView({ state, remote, onAsk, onRefresh }: DesktopPermissionsViewProps) {\n return (\n <SettingsSection data-testid=\"desktop-permissions\">\n <SettingsSectionHeader>\n <SettingsSectionTitle>On this Mac</SettingsSectionTitle>\n <SettingsSectionDescription>\n {remote\n ? 'These belong to the Mac running Po Desktop. When you ask from here, macOS shows its prompt on that Mac.'\n : 'Po asks macOS for each one when you are ready. You can change them any time in System Settings, Privacy and Security.'}\n </SettingsSectionDescription>\n {state.status === 'ready' ? (\n <SettingsActions>\n <Button variant=\"ghost\" size=\"sm\" onClick={onRefresh}>\n Check again\n </Button>\n </SettingsActions>\n ) : null}\n </SettingsSectionHeader>\n <SettingsCard asChild>\n <ul>\n {state.status === 'loading' ? (\n <Message title=\"Checking with macOS\" detail=\"This takes a moment.\" />\n ) : state.status === 'unavailable' ? (\n <Message\n title=\"Po Desktop is not running here\"\n detail=\"Permissions belong to the Mac running Po Desktop. Open Po Desktop there to see and change them.\"\n />\n ) : state.status === 'error' ? (\n <Message title=\"Po couldn't read the permissions just now\" detail={state.error} alert action={onRefresh} />\n ) : (\n DESKTOP_PERMISSIONS.map((permission) => (\n <PermissionRow\n key={permission}\n permission={permission}\n state={state.states[permission]}\n asking={state.asking === permission}\n waiting={state.asking !== undefined}\n onAsk={onAsk}\n />\n ))\n )}\n </ul>\n </SettingsCard>\n </SettingsSection>\n );\n}\n","import type { SettingsPanelProps } from '@agimon-ai/po-core/web';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { desktopPermissions as api } from '../../../../../generated/client';\nimport type { DesktopPermission, DesktopPermissionStates } from '../../../../types/desktopPermissions';\nimport { DesktopPermissionsView, type DesktopPermissionsViewState } from './DesktopPermissionsView';\n\n/** UI discovery only: picks the copy. The server checks Electron's injected proof, not this marker. */\nfunction inDesktopWindow(): boolean {\n return (window as Window & { poDesktop?: { platform?: string } }).poDesktop?.platform === 'desktop';\n}\n\nasync function viewStateOf(pending: Promise<Response>): Promise<DesktopPermissionsViewState> {\n try {\n const response = await pending;\n if (response.status === 404) return { status: 'unavailable' };\n const body = (await response.json().catch(() => undefined)) as Record<string, unknown> | undefined;\n if (response.ok && body !== undefined && !('error' in body))\n return { status: 'ready', states: body as DesktopPermissionStates };\n const error = typeof body?.error === 'string' ? body.error : undefined;\n return { status: 'error', error: error ?? 'Po Desktop did not answer.' };\n } catch (error) {\n return {\n status: 'error',\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\n/** Reads Desktop's macOS permissions through the host's transport, and asks for one with step-up. */\nexport function DesktopPermissionsPanel({ request, requestWithStepUp }: SettingsPanelProps) {\n const [state, setState] = useState<DesktopPermissionsViewState>({\n status: 'loading',\n });\n\n const load = useCallback(async () => {\n setState(await viewStateOf(request(api.host.desktopPermissions.url())));\n }, [request]);\n\n useEffect(() => {\n // Reading macOS is the external sync; the state it sets arrives after the request.\n // oxlint-disable-next-line react/set-state-in-effect\n void load();\n // A change made in System Settings shows up when the person comes back to Po.\n const onFocus = (): void => void load();\n window.addEventListener('focus', onFocus);\n return () => window.removeEventListener('focus', onFocus);\n }, [load]);\n\n const ask = async (permission: DesktopPermission): Promise<void> => {\n setState((current) => (current.status === 'ready' ? { ...current, asking: permission } : current));\n const route = api.host.requestDesktopPermission;\n setState(\n await viewStateOf(\n requestWithStepUp(route.url(), {\n method: route.spec.method,\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ permission }),\n }),\n ),\n );\n };\n\n return (\n <DesktopPermissionsView\n state={state}\n remote={!inDesktopWindow()}\n onAsk={(permission) => void ask(permission)}\n onRefresh={() => void load()}\n />\n );\n}\n","import { defineSettingsPanel } from '@agimon-ai/po-core/web';\nimport { ShieldIcon } from '@agimon-ai/po-web-components';\n\nimport { DesktopPermissionsPanel } from './_components/DesktopPermissionsPanel';\n\nexport default defineSettingsPanel({\n label: 'permissions',\n detail: 'what Po may do on this Mac',\n order: 46,\n icon: ShieldIcon,\n component: DesktopPermissionsPanel,\n});\n","import type { WebPluginDefinition } from '@agimon-ai/po-core/web';\n\nimport { computerUseSettingsSection } from '../../../(frontend)/_lib/computerUseSettings';\n\nexport default {\n settingsSections: [computerUseSettingsSection],\n} satisfies NonNullable<WebPluginDefinition['workspace']>;\n","import { defineSettingsSection } from '@agimon-ai/po-core/web';\nimport { MonitorIcon } from '@agimon-ai/po-web-components';\n\nimport legacy from '../_legacy';\n\nexport default defineSettingsSection({\n ...legacy.settingsSections![0]!,\n icon: MonitorIcon,\n});\n","import { defineSessionStore } from '@agimon-ai/po-core/web';\n\nimport { computerUseChannelType } from '../../../../../types/computerUseApi';\nimport type { ComputerUseChannelPayload } from '../../../../../types/computerUseApi';\n\nexport interface ComputerUseSession extends ComputerUseChannelPayload {}\n\nconst initialState: ComputerUseSession = {\n state: { sessionId: '', revision: 0, wake: 0, phase: 'inactive' },\n targets: [],\n};\n\nexport const computerUse = defineSessionStore<ComputerUseSession>(initialState);\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport const computerUseChannel = computerUse.channel<ComputerUseChannelPayload>({\n channel: computerUseChannelType,\n parse(input) {\n if (!isRecord(input) || !isRecord(input.state) || !Array.isArray(input.targets)) return null;\n if (typeof input.state.phase !== 'string' || typeof input.state.revision !== 'number') return null;\n return input as unknown as ComputerUseChannelPayload;\n },\n reduce: (_current, payload) => payload,\n});\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { Button, CheckIcon, MonitorIcon } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect, useState } from 'react';\n\nimport { COMPUTER_USE_DEFAULT_DURATION_MS, computerUseChannelType } from '../../../../../../types/computerUseApi';\nimport { computerUse } from '../../_lib/computerUseStore';\n\nfunction text(value: unknown, fallback: string): string {\n return typeof value === 'string' || typeof value === 'number' ? String(value) : fallback;\n}\n\nfunction remaining(ms: number): string {\n const seconds = Math.max(0, Math.ceil(ms / 1000));\n return `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, '0')} left`;\n}\n\nexport function ComputerUsePanel(props: WebPluginSlotProps) {\n return <SessionPanel key={props.sessionId ?? 'none'} {...props} />;\n}\n\nfunction SessionPanel({ sessionId, sendSessionFrame }: WebPluginSlotProps) {\n const session = useStore(computerUse.store, (state) => computerUse.select(state, sessionId));\n const [now, setNow] = useState(Date.now);\n const expiresAt = session.state.phase === 'active' ? session.state.expiresAt : undefined;\n const send = (payload: Record<string, unknown>) => {\n if (sessionId !== null) sendSessionFrame(sessionId, { type: computerUseChannelType, payload });\n };\n\n useEffect(() => {\n if (sessionId === null) return;\n sendSessionFrame(sessionId, {\n type: computerUseChannelType,\n payload: { action: 'status' },\n });\n }, [sendSessionFrame, sessionId]);\n\n useEffect(() => {\n if (expiresAt === undefined) return;\n const timer = setInterval(() => setNow(Date.now()), 1000);\n return () => clearInterval(timer);\n }, [expiresAt]);\n\n if (sessionId === null) return <p className=\"px-1 text-sm text-po-dim\">Select a session.</p>;\n const state = session.state;\n const artifact = state.artifact;\n // A monitor, not a setup form: an inactive session shows nothing, and a finished recording reaches the person by notification.\n if (state.phase === 'inactive') return null;\n const controlled =\n state.target?.scope === 'desktop' ? 'your whole desktop' : text(state.target?.applicationName, 'the chosen window');\n const left = expiresAt === undefined ? undefined : expiresAt - now;\n const total = state.durationMs ?? COMPUTER_USE_DEFAULT_DURATION_MS;\n return (\n <div data-testid=\"computer-use-panel\" className=\"flex flex-col gap-3 text-base text-po-text\">\n <header className=\"flex items-center gap-2 border-b border-po-border-soft pb-2\">\n <MonitorIcon aria-hidden className=\"size-4 text-po-dim\" />\n <strong className=\"flex-1 text-po-hi\">Computer use</strong>\n </header>\n {state.failure ? <p className=\"text-po-red\">{state.failure.message}</p> : null}\n {artifact?.status === 'ready' ? (\n <p data-testid=\"computer-use-artifact\" className=\"flex items-center gap-2\">\n <span aria-hidden className=\"flex size-5 items-center justify-center rounded-full bg-po-green text-po-rail\">\n <CheckIcon className=\"size-3\" />\n </span>\n Recording finished.\n </p>\n ) : null}\n {artifact?.failure ? <p className=\"text-po-red\">{artifact.failure.message}</p> : null}\n\n {state.phase === 'awaiting_confirmation' || state.phase === 'activating' ? (\n <div>\n <p>Desktop activation is pending.</p>\n <Button size=\"sm\" type=\"button\" onClick={() => send({ action: 'stop' })}>\n Cancel activation\n </Button>\n </div>\n ) : null}\n {state.phase === 'active' || state.phase === 'stopping' ? (\n <div className=\"flex flex-col gap-2\">\n <p className=\"flex items-center gap-2 text-po-green\">\n <span aria-hidden className=\"size-2 rounded-full bg-po-green\" />\n {state.phase === 'stopping' ? 'Po is handing control back' : `Po is controlling ${controlled}`}\n </p>\n {left === undefined ? null : (\n <div className=\"flex items-center gap-2\">\n <div\n role=\"progressbar\"\n aria-label=\"Time left\"\n aria-valuemin={0}\n aria-valuemax={total}\n aria-valuenow={Math.max(0, left)}\n className=\"h-1.5 flex-1 overflow-hidden rounded-full bg-po-border-soft\"\n >\n <div\n className=\"h-full rounded-full bg-po-green\"\n style={{\n width: `${Math.min(100, Math.max(0, (left / total) * 100))}%`,\n }}\n />\n </div>\n <span className=\"text-sm text-po-dim tabular-nums\">{remaining(left)}</span>\n </div>\n )}\n <Button\n size=\"sm\"\n type=\"button\"\n disabled={state.phase === 'stopping'}\n className=\"min-h-7 rounded border border-po-border bg-po-panel px-2 py-1\"\n onClick={() => send({ action: 'stop' })}\n >\n Stop computer use\n </Button>\n </div>\n ) : null}\n </div>\n );\n}\n","// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web contract.\n\n/** Lines a computer tool card shows before it expands, on web and native alike. */\nexport const COMPUTER_TOOL_COLLAPSED_LINES = 8;\n/** Elements of an observation the native card lists before it expands. */\nexport const COMPUTER_ELEMENTS_PREVIEW = 5;\n/** Script log lines the native card lists before it expands. */\nexport const COMPUTER_LOGS_PREVIEW = 3;\n\nconst MS_PER_SECOND = 1000;\n\n/** The computer_state call's summary: it always observes the one authorized window. */\nexport function computerStateCallSummary(_args: Readonly<Record<string, unknown>>): string {\n return 'authorized window';\n}\n\n/**\n * The computer_action call as its two pieces: the action kind first, the element\n * it targets second. Either may be missing; the empty ones are dropped.\n */\nexport function computerActionCallParts(args: Readonly<Record<string, unknown>>): readonly string[] {\n const kind = typeof args.kind === 'string' ? args.kind : '';\n const ref = typeof args.elementRef === 'string' ? args.elementRef : '';\n return [kind, ref].filter(Boolean);\n}\n\n/** The computer_exec call's summary: the script it ran. */\nexport function computerExecCallSummary(args: Readonly<Record<string, unknown>>): string {\n return typeof args.scriptPath === 'string' ? args.scriptPath : '';\n}\n\n/**\n * The script path as its folder and its file name, so a phone header can let the\n * folder truncate while the script name stays whole.\n */\nexport function computerExecPathParts(path: string): {\n readonly folder: string;\n readonly name: string;\n} {\n const cut = path.lastIndexOf('/');\n return cut < 0 ? { folder: '', name: path } : { folder: path.slice(0, cut + 1), name: path.slice(cut + 1) };\n}\n\nexport interface ComputerElementView {\n readonly ref: string;\n /** The accessibility role in words: `AXTextField` reads `text field`. */\n readonly role: string;\n /** The label, else the value, else empty. */\n readonly label: string;\n readonly enabled: boolean;\n readonly secure: boolean;\n}\n\nexport interface ComputerObservationView {\n readonly applicationName: string;\n readonly windowTitle: string;\n readonly elements: readonly ComputerElementView[];\n /** The next page's offset when more elements exist than this page holds. */\n readonly nextOffset?: number;\n readonly truncated: boolean;\n readonly screenshotArtifact?: string;\n}\n\nexport interface ComputerFieldView {\n readonly key: string;\n readonly value: string;\n}\n\nexport interface ComputerRunView {\n /** The script's return value as short key and value pairs, never raw JSON. */\n readonly fields: readonly ComputerFieldView[];\n readonly logs: readonly string[];\n readonly actions?: number;\n readonly observations?: number;\n /** `3.4s`, from the run's metrics. */\n readonly duration?: string;\n readonly observation?: ComputerObservationView;\n}\n\nexport interface ComputerFailureView {\n readonly reason: string;\n /** Actions that finished before the run stopped, so the agent does not replay them. */\n readonly completedActions?: number;\n readonly outcomeUncertain: boolean;\n}\n\n/** What a computer tool result says, parsed and validated; `text` only when it is not JSON the card knows. */\nexport type ComputerResultView =\n | {\n readonly kind: 'observation';\n readonly observation: ComputerObservationView;\n }\n | { readonly kind: 'run'; readonly run: ComputerRunView }\n | { readonly kind: 'applied' }\n | {\n readonly kind: 'launched';\n readonly applicationName: string;\n readonly bundleId: string;\n }\n | { readonly kind: 'failure'; readonly failure: ComputerFailureView }\n | { readonly kind: 'text'; readonly lines: readonly string[] };\n\nfunction record(value: unknown): Record<string, unknown> | undefined {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\nconst text = (value: unknown): string => (typeof value === 'string' ? value : '');\nconst count = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : undefined;\n\n/** The result's text blocks joined; images (the screenshot) are dropped, as the web cards drop them. */\nexport function computerResultText(content: readonly unknown[]): string {\n return content\n .flatMap((block) => {\n const entry = record(block);\n return entry?.type === 'text' && typeof entry.text === 'string' ? [entry.text] : [];\n })\n .join('\\n');\n}\n\n/** `AXTextField` as `text field`; a role without the AX prefix is kept as it came. */\nexport function computerRoleWords(role: string): string {\n if (!role.startsWith('AX')) return role;\n return role\n .slice(2)\n .replace(/([a-z])([A-Z])/gu, '$1 $2')\n .toLowerCase();\n}\n\nfunction element(value: unknown): ComputerElementView[] {\n const entry = record(value);\n if (entry === undefined || typeof entry.ref !== 'string') return [];\n return [\n {\n ref: entry.ref,\n role: computerRoleWords(text(entry.role)),\n label: text(entry.label) || text(entry.value),\n enabled: entry.enabled !== false,\n secure: entry.secure === true,\n },\n ];\n}\n\n/** An observation when the value is one: an application name and an element list. */\nexport function computerObservationView(value: unknown): ComputerObservationView | undefined {\n const entry = record(value);\n if (entry === undefined || typeof entry.applicationName !== 'string' || !Array.isArray(entry.elements))\n return undefined;\n const nextOffset = count(entry.nextOffset);\n const artifact = text(entry.screenshotArtifact);\n return {\n applicationName: entry.applicationName,\n windowTitle: text(entry.windowTitle),\n elements: entry.elements.flatMap(element),\n truncated: entry.truncated === true || nextOffset !== undefined,\n ...(nextOffset === undefined ? {} : { nextOffset }),\n ...(artifact.length > 0 ? { screenshotArtifact: artifact } : {}),\n };\n}\n\n/** One value of a script result as a short phrase: scalars as they read, collections by their size. */\nfunction phrase(value: unknown): string {\n if (value === null || value === undefined) return 'none';\n if (typeof value === 'string') return value;\n if (typeof value === 'number' || typeof value === 'boolean') return String(value);\n if (Array.isArray(value)) return `${String(value.length)} item${value.length === 1 ? '' : 's'}`;\n const size = Object.keys(value as object).length;\n return `${String(size)} field${size === 1 ? '' : 's'}`;\n}\n\n/** A script's return value as fields: an object's own keys, or one `result` field for anything else. */\nexport function computerResultFields(value: unknown): ComputerFieldView[] {\n if (value === undefined) return [];\n const entry = record(value);\n if (entry === undefined) return [{ key: 'result', value: phrase(value) }];\n return Object.entries(entry).map(([key, field]) => ({\n key,\n value: phrase(field),\n }));\n}\n\nfunction run(entry: Record<string, unknown>): ComputerRunView | undefined {\n if (!Array.isArray(entry.logs)) return undefined;\n const observation = computerObservationView(entry.observation);\n const metrics = record(entry.metrics);\n const actions = count(metrics?.actions);\n const observations = count(metrics?.observations);\n const durationMs = count(metrics?.durationMs);\n return {\n fields: computerResultFields(entry.result),\n logs: entry.logs.filter((line): line is string => typeof line === 'string'),\n ...(actions === undefined ? {} : { actions }),\n ...(observations === undefined ? {} : { observations }),\n ...(durationMs === undefined ? {} : { duration: `${(durationMs / MS_PER_SECOND).toFixed(1)}s` }),\n ...(observation === undefined ? {} : { observation }),\n };\n}\n\nfunction failure(entry: Record<string, unknown>): ComputerFailureView | undefined {\n if (typeof entry.error !== 'string') return undefined;\n const completedActions = count(entry.completedActions);\n return {\n reason: entry.error,\n ...(completedActions === undefined ? {} : { completedActions }),\n outcomeUncertain: entry.outcomeUncertain === true,\n };\n}\n\n/** The text as lines a card can count: CRLF folded, tabs widened, trailing blank lines dropped. */\nfunction lines(value: string): string[] {\n if (value.length === 0) return [];\n const split = value.replaceAll('\\r\\n', '\\n').replaceAll('\\t', ' ').split('\\n');\n while (split.length > 0 && split.at(-1)?.trim() === '') split.pop();\n return split;\n}\n\n/**\n * A computer tool result as the card lays it out. The tools answer in JSON (an\n * observation, an action's outcome, a script run, a script failure) or in a\n * plain sentence when they fail early; anything that does not parse as a shape\n * the card knows falls back to its text lines.\n */\nexport function computerResultView(content: readonly unknown[]): ComputerResultView {\n const raw = computerResultText(content);\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n return { kind: 'text', lines: lines(raw) };\n }\n const entry = record(parsed);\n const observation = computerObservationView(parsed);\n if (observation !== undefined) return { kind: 'observation', observation };\n const ran = entry === undefined ? undefined : run(entry);\n if (ran !== undefined) return { kind: 'run', run: ran };\n const failed = entry === undefined ? undefined : failure(entry);\n if (failed !== undefined) return { kind: 'failure', failure: failed };\n if (entry?.launched === true && typeof entry.applicationName === 'string')\n return {\n kind: 'launched',\n applicationName: entry.applicationName,\n bundleId: text(entry.bundleId),\n };\n if (entry?.applied === true) return { kind: 'applied' };\n return { kind: 'text', lines: lines(raw) };\n}\n\n/** How many rows the view holds back while collapsed, so the card offers expand only when it reveals something. */\nexport function computerResultHidden(view: ComputerResultView): number {\n switch (view.kind) {\n case 'observation':\n return Math.max(0, view.observation.elements.length - COMPUTER_ELEMENTS_PREVIEW);\n case 'run':\n return Math.max(0, view.run.logs.length - COMPUTER_LOGS_PREVIEW);\n case 'text':\n return Math.max(0, view.lines.length - COMPUTER_TOOL_COLLAPSED_LINES);\n default:\n return 0;\n }\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport { Badge, MessageItemBody, MessageItemStatus } from '@agimon-ai/po-web-components';\n\nimport {\n COMPUTER_ELEMENTS_PREVIEW,\n COMPUTER_LOGS_PREVIEW,\n COMPUTER_TOOL_COLLAPSED_LINES,\n type ComputerElementView,\n type ComputerFailureView,\n type ComputerObservationView,\n type ComputerResultView,\n type ComputerRunView,\n computerResultHidden,\n computerResultView,\n} from '../_lib/computerToolView';\n\n/** The parsed result, or none before the tool answers. */\nexport function computerResult(props: ToolMessageRenderProps): ComputerResultView | undefined {\n return props.result === null ? undefined : computerResultView(props.result.content);\n}\n\n/** Whether the card has rows to reveal: the header offers expand only then, and never on a failure. */\nexport function computerResultExpandable(props: ToolMessageRenderProps): boolean {\n const view = computerResult(props);\n return !props.isError && view !== undefined && computerResultHidden(view) > 0;\n}\n\nconst plural = (count: number, noun: string): string => `${String(count)} ${noun}${count === 1 ? '' : 's'}`;\n\n/**\n * The body the three computer tool cards share on web, laid out from the same\n * parsed view as the native body (ComputerResultBody.native.tsx): the window and\n * its elements, a script's figures, fields and logs, an action's outcome. A\n * preview shows while collapsed. A failure shows only its reason in red, with a\n * quiet note of any actions that already ran; the header already says it failed.\n */\nexport function ComputerResultBody({ props, expanded }: { props: ToolMessageRenderProps; expanded: boolean }) {\n const { toolName, output, running, isError } = props;\n const view = computerResult(props);\n const testID = `tool-result-${toolName}`;\n if (isError) {\n const failure: ComputerFailureView =\n view?.kind === 'failure'\n ? view.failure\n : {\n reason: view?.kind === 'text' ? view.lines.join('\\n') : output.trim(),\n outcomeUncertain: false,\n };\n return failure.reason.length === 0 ? null : (\n <MessageItemBody data-testid={testID}>\n <FailureBlock failure={failure} />\n </MessageItemBody>\n );\n }\n if (view === undefined) {\n return running ? (\n <MessageItemBody data-testid={testID}>\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null;\n }\n if (view.kind === 'text' && view.lines.length === 0) return null;\n return (\n <MessageItemBody data-testid={testID} className=\"flex flex-col gap-2\">\n {view.kind === 'observation' ? <ObservationBlock observation={view.observation} expanded={expanded} /> : null}\n {view.kind === 'run' ? <RunBlock run={view.run} expanded={expanded} /> : null}\n {view.kind === 'applied' ? <span className=\"text-po-text\">Applied to the element.</span> : null}\n {view.kind === 'launched' ? (\n <div className=\"flex min-w-0 items-baseline gap-2\">\n <span className=\"max-w-[60%] shrink-0 truncate font-semibold text-po-text\">\n Opened {view.applicationName}\n </span>\n <span className=\"min-w-0 truncate font-mono text-sm text-po-faint\">{view.bundleId}</span>\n </div>\n ) : null}\n {view.kind === 'text' ? <TextLines lines={view.lines} expanded={expanded} /> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n </MessageItemBody>\n );\n}\n\nfunction FailureBlock({ failure }: { failure: ComputerFailureView }) {\n const done = failure.completedActions;\n const note = [\n done === undefined ? '' : `${plural(done, 'action')} already ran`,\n failure.outcomeUncertain ? 'the last outcome is uncertain' : '',\n ].filter(Boolean);\n return (\n <div className=\"flex flex-col gap-1\">\n <span className=\"whitespace-pre-wrap break-words text-po-red\">{failure.reason}</span>\n {note.length > 0 ? <span className=\"text-sm text-po-faint\">{note.join(', ')}.</span> : null}\n </div>\n );\n}\n\nfunction WindowLine({ observation, lead }: { observation: ComputerObservationView; lead?: string }) {\n return (\n <div className=\"flex min-w-0 items-baseline gap-2\">\n <span className=\"max-w-[60%] shrink-0 truncate font-semibold text-po-text\">\n {lead === undefined ? '' : `${lead} `}\n {observation.applicationName}\n </span>\n {observation.windowTitle.length > 0 ? (\n <span className=\"min-w-0 truncate text-po-dim\">{observation.windowTitle}</span>\n ) : null}\n </div>\n );\n}\n\nfunction ElementRow({ element }: { element: ComputerElementView }) {\n // A secure field's role already says so (`secure text field`); the flag is named only when it does not.\n const secure = element.secure && !element.role.includes('secure');\n const traits = [element.role, element.enabled ? '' : 'disabled', secure ? 'secure' : ''].filter(Boolean);\n return (\n <li className=\"contents\">\n <span className={`min-w-0 truncate ${element.enabled ? 'text-po-text' : 'text-po-faint'}`}>\n {element.label.length > 0 ? element.label : element.role}\n </span>\n <span className=\"truncate text-sm text-po-faint\">{traits.join(' · ')}</span>\n <span className=\"text-right font-mono text-sm text-po-faint\">{element.ref}</span>\n </li>\n );\n}\n\nfunction ObservationBlock({ observation, expanded }: { observation: ComputerObservationView; expanded: boolean }) {\n const { elements } = observation;\n const shown = expanded ? elements : elements.slice(0, COMPUTER_ELEMENTS_PREVIEW);\n const hidden = elements.length - shown.length;\n return (\n <>\n <div className=\"flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5\">\n <WindowLine observation={observation} />\n <div className=\"flex flex-wrap gap-1.5\">\n <Badge size=\"xs\">{plural(elements.length, 'element')}</Badge>\n {observation.truncated ? (\n <Badge size=\"xs\" tone=\"yellow\">\n {observation.nextOffset === undefined\n ? 'more not shown'\n : `more from offset ${String(observation.nextOffset)}`}\n </Badge>\n ) : null}\n </div>\n </div>\n {shown.length > 0 ? (\n <ul\n aria-label=\"Elements\"\n className=\"grid grid-cols-[minmax(0,1fr)_minmax(0,auto)_auto] items-baseline gap-x-4 gap-y-1\"\n >\n {shown.map((element) => (\n <ElementRow key={element.ref} element={element} />\n ))}\n </ul>\n ) : null}\n {hidden > 0 ? <MessageItemStatus expands>{plural(hidden, 'more element')}</MessageItemStatus> : null}\n {observation.screenshotArtifact === undefined ? null : (\n <span className=\"break-all text-sm text-po-faint\">Screenshot saved to {observation.screenshotArtifact}</span>\n )}\n </>\n );\n}\n\nfunction RunBlock({ run, expanded }: { run: ComputerRunView; expanded: boolean }) {\n const figures = [\n run.actions === undefined ? '' : plural(run.actions, 'action'),\n run.observations === undefined ? '' : plural(run.observations, 'observation'),\n run.duration ?? '',\n ].filter(Boolean);\n const logs = expanded ? run.logs : run.logs.slice(0, COMPUTER_LOGS_PREVIEW);\n const hidden = run.logs.length - logs.length;\n return (\n <>\n {figures.length > 0 ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {figures.map((figure) => (\n <Badge key={figure} size=\"xs\">\n {figure}\n </Badge>\n ))}\n </div>\n ) : null}\n {run.fields.length > 0 ? (\n <dl\n aria-label=\"Result\"\n className=\"grid grid-cols-[minmax(0,auto)_minmax(0,1fr)] items-baseline gap-x-4 gap-y-1\"\n >\n {run.fields.map((field) => (\n <div key={field.key} className=\"contents\">\n <dt className=\"max-w-48 truncate text-sm text-po-faint\">{field.key}</dt>\n <dd className=\"min-w-0 truncate text-po-text\">{field.value}</dd>\n </div>\n ))}\n </dl>\n ) : null}\n {logs.length > 0 ? (\n <ul aria-label=\"Logs\" className=\"flex flex-col gap-0.5\">\n {logs.map((line, index) => (\n <li key={`${String(index)}-${line}`} className=\"min-w-0 truncate font-mono text-sm text-po-dim\">\n {line}\n </li>\n ))}\n </ul>\n ) : null}\n {hidden > 0 ? <MessageItemStatus expands>{plural(hidden, 'more log line')}</MessageItemStatus> : null}\n {run.observation === undefined ? null : <WindowLine observation={run.observation} lead=\"Ended on\" />}\n </>\n );\n}\n\nfunction TextLines({ lines, expanded }: { lines: readonly string[]; expanded: boolean }) {\n const shown = expanded ? lines : lines.slice(0, COMPUTER_TOOL_COLLAPSED_LINES);\n const hidden = lines.length - shown.length;\n return (\n <>\n <div className=\"flex flex-col gap-0.5\">\n {shown.map((line, index) => (\n <span key={`${String(index)}-${line}`} className=\"whitespace-pre-wrap break-words text-po-dim\">\n {line}\n </span>\n ))}\n </div>\n {hidden > 0 ? <MessageItemStatus expands>{plural(hidden, 'more line')}</MessageItemStatus> : null}\n </>\n );\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport { MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-web-components';\n\nimport { computerActionCallParts } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody';\n\n/**\n * The computer_action tool's timeline item: the action and the element it\n * targets in the header, the outcome as one line beneath. The action is what\n * Po did, so it stays whole; the element ref truncates first.\n */\nexport function ComputerActionToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n const [kind, ...target] = computerActionCallParts(args);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"flex min-w-0 flex-1 items-baseline gap-2\">\n {kind === undefined ? null : <span className=\"max-w-[45%] shrink-0 truncate text-po-text\">{kind}</span>}\n {target.length > 0 ? <span className=\"min-w-0 truncate text-po-dim\">{target.join(' ')}</span> : null}\n </span>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport { MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-web-components';\n\nimport { computerExecCallSummary, computerExecPathParts } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody';\n\n/**\n * The computer_exec tool's timeline item: the script path in the header, the\n * run laid out beneath it (figures, return value, first logs, final window).\n * A long path loses its folder first, so the script name stays readable.\n */\nexport function ComputerExecToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n const path = computerExecPathParts(computerExecCallSummary(args));\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"flex min-w-0 flex-1 items-baseline\">\n {path.folder.length > 0 ? <span className=\"min-w-0 truncate text-po-dim\">{path.folder}</span> : null}\n <span className=\"max-w-full shrink-0 truncate text-po-text\">{path.name}</span>\n </span>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport { MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-web-components';\n\nimport { computerStateCallSummary } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody';\n\n/**\n * The computer_state tool's timeline item: the observed window in the header,\n * the observation laid out beneath it (window, element count, element list).\n * The shell owns the frame, the outcome tone, the status badge, and the toggle.\n */\nexport function ComputerStateToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"min-w-0 flex-1 truncate text-po-text\">\n {computerStateCallSummary(args)}\n </span>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n","import { COMPUTER_TOOL_COLLAPSED_LINES, computerActionCallParts } from './computerToolView';\n\nexport const computerActionToolName = 'computer_action' as const;\nexport const computerActionCollapsedLines = COMPUTER_TOOL_COLLAPSED_LINES;\n\nexport function computerActionCallSummary(args: Readonly<Record<string, unknown>>): string {\n return computerActionCallParts(args).join(' ');\n}\n","import { COMPUTER_TOOL_COLLAPSED_LINES, computerExecCallSummary as execSummary } from './computerToolView';\n\nexport const computerExecToolName = 'computer_exec' as const;\nexport const computerExecCollapsedLines = COMPUTER_TOOL_COLLAPSED_LINES;\n\nexport function computerExecCallSummary(args: Readonly<Record<string, unknown>>): string {\n return execSummary(args);\n}\n","import { COMPUTER_TOOL_COLLAPSED_LINES, computerStateCallSummary as stateSummary } from './computerToolView';\n\nexport const computerStateToolName = 'computer_state' as const;\nexport const computerStateCollapsedLines = COMPUTER_TOOL_COLLAPSED_LINES;\n\nexport function computerStateCallSummary(args: Readonly<Record<string, unknown>>): string {\n return stateSummary(args);\n}\n","import type { WebPluginDefinition } from '@agimon-ai/po-core/web';\nimport { MonitorIcon } from '@agimon-ai/po-web-components';\n\nimport {\n COMPUTER_USE_MODE_ID,\n COMPUTER_USE_MODE_STATUS_KEY,\n COMPUTER_USE_STATUS_KEY,\n} from '../../../../../types/computerUseApi';\nimport { computerUseChannel } from '../_lib/computerUseStore';\nimport { ComputerUsePanel } from '../fill/_components/ComputerUsePanel';\nimport { ComputerActionToolCard } from '../tool/_components/ComputerActionToolCard';\nimport { ComputerExecToolCard } from '../tool/_components/ComputerExecToolCard';\nimport { ComputerStateToolCard } from '../tool/_components/ComputerStateToolCard';\nimport { computerActionToolName } from '../tool/_lib/computerActionToolRender';\nimport { computerExecToolName } from '../tool/_lib/computerExecToolRender';\nimport { computerStateToolName } from '../tool/_lib/computerStateToolRender';\n\nexport default {\n modes: [\n {\n name: 'computer use',\n modeId: COMPUTER_USE_MODE_ID,\n keys: 'c e',\n icon: MonitorIcon,\n statusKey: COMPUTER_USE_MODE_STATUS_KEY,\n hideWhenMissing: true,\n order: 70,\n },\n ],\n activityGroups: [\n {\n name: 'computer-use',\n keys: 'c e',\n order: 70,\n statusKey: COMPUTER_USE_STATUS_KEY,\n hideWhenEmpty: true,\n marksBackgroundWork: false,\n },\n ],\n activitySections: [{ id: 'computer-use', component: ComputerUsePanel }],\n channels: [computerUseChannel],\n toolRenderers: [\n { tools: [computerStateToolName], message: ComputerStateToolCard },\n { tools: [computerActionToolName], message: ComputerActionToolCard },\n { tools: [computerExecToolName], message: ComputerExecToolCard },\n ],\n} satisfies NonNullable<WebPluginDefinition['session']>;\n","import { defineActivityGroup } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineActivityGroup(legacy.activityGroups![0]!);\n","import { defineChannelFile } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineChannelFile(legacy.channels![0]!);\n","import { defineFill } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineFill({\n slot: 'activity.computer-use',\n ...legacy.activitySections![0]!,\n});\n","import { defineModeFile } from '@agimon-ai/po-core/web';\n\nimport legacy from '../../_legacy';\n\nexport default defineModeFile(legacy.modes![0]!);\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineToolRenderer(legacy.toolRenderers![1]!);\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineToolRenderer(legacy.toolRenderers![2]!);\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineToolRenderer(legacy.toolRenderers![0]!);\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport settingComputerUse from '../src/extensions/(frontend)/setting/computer-use.web';\nimport settingDesktopEnvironment from '../src/extensions/(frontend)/setting/desktop-environment.web';\nimport settingDesktopPermissions from '../src/extensions/(frontend)/setting/desktop-permissions.panel.web';\nimport settingComputerUse2 from '../src/extensions/workspaces/(frontend)/setting/computer-use.web';\nimport activityGroupComputerUse from '../src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.web';\nimport channelComputerUse from '../src/extensions/workspaces/sessions/(frontend)/channel/computer-use.web';\nimport fillComputerUse from '../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.web';\nimport modeComputerUse from '../src/extensions/workspaces/sessions/(frontend)/mode/computer-use/mode.web';\nimport toolComputerAction from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-action.web';\nimport toolComputerExec from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.web';\nimport toolComputerState from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-state.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: 'computer-use',\n packageName: '@agimon-ai/po-computer-use',\n host: {\n get settingsPanels(): WebPluginContributions['settingsPanels'] { return [via({ id: 'desktop-permissions' }, settingDesktopPermissions)]; },\n get settingsSections(): WebPluginContributions['settingsSections'] { return [via({ id: 'computer-use' }, settingComputerUse), via({ id: 'desktop-environment' }, settingDesktopEnvironment)]; },\n },\n workspace: {\n get settingsSections(): WebPluginContributions['settingsSections'] { return [via({ id: 'computer-use' }, settingComputerUse2)]; },\n },\n session: {\n get activityGroups(): WebPluginContributions['activityGroups'] { return [via({ name: 'computer-use' }, activityGroupComputerUse)]; },\n get channels(): WebPluginContributions['channels'] { return [via({ channel: 'computer_use' }, channelComputerUse)]; },\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'activity.computer-use', id: 'computer-use' }, fillComputerUse)]; },\n get modes(): WebPluginContributions['modes'] { return [via({ name: 'computer-use' }, modeComputerUse)]; },\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['computer_action'] }, toolComputerAction), via({ tools: ['computer_exec'] }, toolComputerExec), via({ tools: ['computer_state'] }, toolComputerState)]; },\n },\n});\n"],"mappings":";;;;;;;AAEA,MAAa,6BAA0D;CACrE,IAAI;CACJ,aAAa;CACb,OAAO;CACP,QAAQ;CACR,OAAO;C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cAAe,EAAG;;;ACW3D,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,YAAY,gBAAgB;CACvC,IAAI;CACJ,aAAa;CACb,MAAM;EACJ,IAAI,iBAA2D;GAAE,OAAO,CAAC,IAAI,EAAE,IAAI,sBAAsB,GAAGC,qCAAyB,CAAC;EAAG;EACzI,IAAI,mBAA+D;GAAE,OAAO,CAAC,IAAI,EAAE,IAAI,eAAe,GAAGC,0BAAkB,GAAG,IAAI,EAAE,IAAI,sBAAsB,GAAGC,+BAAyB,CAAC;EAAG;CAChM;CACA,WAAW,EACT,IAAI,mBAA+D;EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,eAAe,GAAGC,0BAAmB,CAAC;CAAG,EAClI;CACA,SAAS;EACP,IAAI,iBAA2D;GAAE,OAAO,CAAC,IAAI,EAAE,MAAM,eAAe,GAAGC,0BAAwB,CAAC;EAAG;EACnI,IAAI,WAA+C;GAAE,OAAO,CAAC,IAAI,EAAE,SAAS,eAAe,GAAGC,wBAAkB,CAAC;EAAG;EACpH,IAAI,QAAyC;GAAE,OAAO,CAAC,IAAI;IAAE,MAAM;IAAyB,IAAI;GAAe,GAAGC,6CAAe,CAAC;EAAG;EACrI,IAAI,QAAyC;GAAE,OAAO,CAAC,IAAI,EAAE,MAAM,eAAe,GAAGC,gBAAe,CAAC;EAAG;EACxG,IAAI,gBAAyD;GAAE,OAAO;IAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,EAAE,GAAGC,2BAAkB;IAAG,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE,GAAGC,yBAAgB;IAAG,IAAI,EAAE,OAAO,CAAC,gBAAgB,EAAE,GAAGC,0BAAiB;GAAC;EAAG;CAC/O;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"web.mjs","names":["legacy","computerUse","api","legacy","text","legacy","legacy","legacy","legacy","legacy","legacy","legacy","settingDesktopPermissions","settingComputerUse","settingDesktopEnvironment","settingComputerUse2","activityGroupComputerUse","channelComputerUse","fillComputerUse","modeComputerUse","toolComputerAction","toolComputerExec","toolComputerState"],"sources":["../../src/extensions/(frontend)/_lib/computerUseSettings.ts","../../src/extensions/(frontend)/_legacy/index.ts","../../src/extensions/(frontend)/setting/computer-use.web.ts","../../src/extensions/(frontend)/_lib/desktopEnvironmentSettings.ts","../../src/extensions/(frontend)/setting/desktop-environment.web.ts","../../src/types/computerUseApi.ts","../../src/types/desktopPermissions.ts","../../src/types/apiRoutes.ts","../../generated/client.ts","../../src/extensions/(frontend)/setting/_components/DesktopPermissionsView.tsx","../../src/extensions/(frontend)/setting/_components/DesktopPermissionsPanel.tsx","../../src/extensions/(frontend)/setting/desktop-permissions.panel.web.tsx","../../src/extensions/workspaces/(frontend)/_legacy/index.ts","../../src/extensions/workspaces/(frontend)/setting/computer-use.web.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/computerUseStore.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerResultBody.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerActionToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerExecToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerStateToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/_legacy/index.ts","../../src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.web.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/computer-use.web.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/mode/computer-use/mode.web.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-action.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/computer-state.web.tsx","../../generated/web.ts"],"sourcesContent":["import type { SettingsSectionContribution } from '@agimon-ai/po-core/web';\n\nexport const computerUseSettingsSection: SettingsSectionContribution = {\n id: 'computer-use',\n desktopOnly: true,\n label: 'computer use',\n detail: 'control whether Po Desktop may expose session-scoped computer control',\n order: 45,\n fields: [\n {\n id: 'enabled',\n label: 'enable computer use',\n kind: 'toggle',\n keyPath: ['computerUse', 'enabled'],\n detail: 'Makes the computer-use mode available. Each control session still requires native confirmation.',\n },\n ],\n};\n","import type { WebPluginDefinition } from '@agimon-ai/po-core/web';\n\nimport { computerUseSettingsSection } from '../_lib/computerUseSettings';\n\nexport default {\n settingsSections: [computerUseSettingsSection],\n} satisfies NonNullable<WebPluginDefinition['host']>;\n","import { defineSettingsSection } from '@agimon-ai/po-core/web';\nimport { MonitorIcon } from '@agimon-ai/po-web-components';\n\nimport legacy from '../_legacy';\n\nexport default defineSettingsSection({\n ...legacy.settingsSections![0]!,\n icon: MonitorIcon,\n});\n","import type { SettingsSectionContribution } from '@agimon-ai/po-core/web';\n\n/**\n * What Po Desktop passes from your login shell to the server and agents. Settings\n * fields write single values, so the lists are shown here and edited in the file.\n */\nexport const desktopEnvironmentSettingsSection: SettingsSectionContribution = {\n id: 'desktop-environment',\n desktopOnly: true,\n label: 'desktop environment',\n detail: 'choose which login-shell variables Po Desktop passes to agents',\n order: 46,\n groups: [\n {\n id: 'shell',\n label: 'login shell',\n detail:\n 'Po Desktop reads your login shell once at start. Changes apply the next time Po Desktop starts. Core variables and PO_ settings always pass.',\n },\n ],\n fields: [\n {\n id: 'inherit',\n label: 'variables to pass',\n kind: 'select',\n keyPath: ['desktopEnvironment', 'inherit'],\n group: 'shell',\n presentation: 'cards',\n defaultValue: 'all',\n options: [\n {\n value: 'all',\n label: 'everything',\n detail: 'Every exported variable, including API keys, minus exclusions.',\n },\n {\n value: 'core',\n label: 'core only',\n detail: 'HOME, PATH, USER and similar. Add others under desktopEnvironment.set in ~/.po/config.yaml.',\n },\n ],\n },\n {\n id: 'exclude',\n label: 'excluded',\n kind: 'info',\n keyPath: ['desktopEnvironment', 'exclude'],\n group: 'shell',\n detail: 'Name patterns kept out, such as *_TOKEN. Edit desktopEnvironment.exclude in ~/.po/config.yaml.',\n },\n {\n id: 'include-only',\n label: 'only these',\n kind: 'info',\n keyPath: ['desktopEnvironment', 'includeOnly'],\n group: 'shell',\n detail: 'When set, only matching names pass. Edit desktopEnvironment.includeOnly in ~/.po/config.yaml.',\n },\n ],\n};\n","import { defineSettingsSection } from '@agimon-ai/po-core/web';\nimport { ShieldIcon } from '@agimon-ai/po-web-components';\n\nimport { desktopEnvironmentSettingsSection } from '../_lib/desktopEnvironmentSettings';\n\nexport default defineSettingsSection({\n ...desktopEnvironmentSettingsSection,\n icon: ShieldIcon,\n});\n","export const API_BASE_PATH = 'computer-use';\nexport const computerUseChannelType = 'computer_use_state';\nexport const COMPUTER_USE_MODE_ID = 'computer-use';\nexport const COMPUTER_USE_STATUS_KEY = 'po-computer-use';\nexport const COMPUTER_USE_MODE_STATUS_KEY = 'po-computer-use-mode';\nexport const COMPUTER_USE_MAX_DURATION_MS = 1_800 * 1_000;\nexport const COMPUTER_USE_DEFAULT_DURATION_MS = 300 * 1_000;\n/** The session lengths a person can pick when granting control, up to the maximum. */\nexport const COMPUTER_USE_DURATION_CHOICES_MS = [\n COMPUTER_USE_DEFAULT_DURATION_MS,\n 900_000,\n COMPUTER_USE_MAX_DURATION_MS,\n] as const;\nexport const COMPUTER_USE_CONFIRMATION_WINDOW_MS = 2 * 60 * 1_000;\n\n/**\n * Every path this API answers on, below its mount.\n *\n * The typed route table in `./apiRoutes` is built from this, the dispatcher\n * reads that table, and the hub channel addresses the broker with these same\n * strings, so a route cannot move on one side alone.\n */\nexport const COMPUTER_USE_ROUTES = {\n artifact: '/artifact',\n agentState: '/agent/state',\n agentObserve: '/agent/observe',\n agentAction: '/agent/action',\n agentStop: '/agent/stop',\n hubState: '/hub/state',\n hubActivation: '/hub/activation',\n hubAuthorization: '/hub/authorization',\n hubNext: '/hub/next',\n hubComplete: '/hub/complete',\n hubStop: '/hub/stop',\n hubRequestStop: '/hub/request-stop',\n} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\n\n/** A consented trace extra, read through the same grant-bound host store as the recording. */\nexport interface ComputerUseTraceFileView {\n readonly artifactId: string;\n readonly sizeBytes: number;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseArtifactView {\n readonly artifactId: string;\n readonly status: 'ready' | 'failed';\n readonly sizeBytes?: number;\n readonly downloadUrl?: string;\n readonly previewUrl?: string;\n readonly actionCount?: number;\n readonly completedAt?: string;\n readonly trace?: ComputerUseTraceFileView;\n readonly windows?: readonly ComputerUseTraceFileView[];\n readonly failure?: { readonly code: string; readonly message: string };\n}\n\nexport interface ComputerUseSessionView {\n readonly sessionId: string;\n readonly revision: number;\n readonly wake: number;\n readonly phase: 'inactive' | 'awaiting_confirmation' | 'activating' | 'active' | 'stopping' | 'failed';\n readonly requestId?: string;\n readonly target?: Record<string, unknown>;\n readonly durationMs?: number;\n readonly expiresAt?: number;\n readonly failure?: { readonly code: string; readonly message: string };\n readonly artifact?: ComputerUseArtifactView;\n}\n\nexport interface ComputerUseActivationRequest {\n readonly requestId: string;\n readonly target?: Record<string, unknown>;\n readonly durationSeconds: number;\n readonly createdAt: number;\n readonly confirmationExpiresAt: number;\n /** Set by the session broker only after the person approves the saved request. */\n readonly confirmedAt?: number;\n /** True only when the person approved keeping a redacted trace and window images for this one window. */\n readonly traceConsent: boolean;\n readonly caller: { readonly locality: 'approval'; readonly approvalId: string };\n}\n\nexport interface ComputerUseBrokerRequest {\n readonly id: string;\n readonly operation: 'observe' | 'act';\n readonly payload?: unknown;\n readonly grantId: string;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseChannelPayload {\n readonly state: ComputerUseSessionView;\n readonly targets: readonly Record<string, unknown>[];\n readonly busy?: true;\n}\n\nexport type ComputerUseBrowserCommand = {\n readonly action: 'status' | 'stop';\n};\n","/** The mount's only path: GET reads the permission states, POST asks macOS for one. */\nexport const DESKTOP_PERMISSIONS_PATH = '/';\n\n/** The macOS privacy permissions Desktop reports, in the order the settings page shows them. */\nexport const DESKTOP_PERMISSIONS = [\n 'accessibility',\n 'screen-recording',\n 'microphone',\n 'automation',\n 'full-disk-access',\n] as const;\nexport type DesktopPermission = (typeof DESKTOP_PERMISSIONS)[number];\n\n/** `per-app` is Automation: macOS asks once for each app Po controls and reports no overall state. */\nexport type DesktopPermissionState = 'granted' | 'denied' | 'not-determined' | 'per-app';\nexport type DesktopPermissionStates = Record<DesktopPermission, DesktopPermissionState>;\n\nexport interface DesktopPermissionRequest {\n readonly permission: DesktopPermission;\n}\n\nexport function isDesktopPermission(value: unknown): value is DesktopPermission {\n return typeof value === 'string' && (DESKTOP_PERMISSIONS as readonly string[]).includes(value);\n}\n","import type { ApiResponseOf, ApiRoutes } from '@agimon-ai/po-core/web';\n\nimport {\n COMPUTER_USE_ROUTES,\n type ComputerUseActivationRequest,\n type ComputerUseBrokerRequest,\n type ComputerUseSessionView,\n} from './computerUseApi';\nimport { DESKTOP_PERMISSIONS_PATH, type DesktopPermissionStates } from './desktopPermissions';\n\n/**\n * This package's routes, as data.\n *\n * No scope and no base path: the build reads both off\n * `src/extensions/workspaces/sessions/(backend)/api/computer-use/`, so the\n * mount is stated once, by the folder that creates it.\n *\n * The paths come from `COMPUTER_USE_ROUTES` rather than being written out\n * again. That table already addressed the broker from the hub channel and from\n * the broker's own dispatcher, and a second copy here is exactly the\n * disagreement this file exists to prevent. The dispatcher now reads this\n * table, so the page, the broker and the hub all resolve one set of strings.\n *\n * Recording reads can be reached from a browser with recording authorization. The `/agent/` and `/hub/` routes\n * each demand a host-issued bearer token and answer 404 without one; they are\n * declared here because they are this API's surface, not because a page calls\n * them.\n */\nexport const routes = {\n artifact: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.artifact,\n query: ['artifactId', 'offset'],\n raw: true,\n },\n agentState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.agentState,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Answers whatever the admitted Desktop provider returned, which is runtime-defined JSON. */\n agentObserve: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentObserve,\n response: undefined as unknown as ApiResponseOf<unknown>,\n },\n agentAction: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentAction,\n response: undefined as unknown as ApiResponseOf<unknown>,\n },\n agentStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.agentStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubState,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Null until a reader has confirmed one; reading it moves the session to `activating`. */\n hubActivation: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubActivation,\n response: undefined as unknown as ApiResponseOf<ComputerUseActivationRequest | null>,\n },\n hubAuthorization: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubAuthorization,\n response: undefined as unknown as ApiResponseOf<{\n readonly grantId: string;\n readonly expiresAt?: number;\n } | null>,\n },\n hubNext: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.hubNext,\n response: undefined as unknown as ApiResponseOf<ComputerUseBrokerRequest | null>,\n },\n hubComplete: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubComplete,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubRequestStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubRequestStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n hubStop: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.hubStop,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n /** Desktop's macOS permission states, served by the hub's `desktop-permissions` mount. */\n desktopPermissions: {\n method: 'GET',\n path: DESKTOP_PERMISSIONS_PATH,\n response: undefined as unknown as ApiResponseOf<DesktopPermissionStates>,\n },\n /** Asks macOS for the body's permission on the Mac running Desktop; answers the states after. */\n requestDesktopPermission: {\n method: 'POST',\n path: DESKTOP_PERMISSIONS_PATH,\n response: undefined as unknown as ApiResponseOf<DesktopPermissionStates>,\n },\n} as const satisfies ApiRoutes;\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { createApiClient, sessionApiAddress } from '@agimon-ai/po-core/web';\nimport { browserTransport } from '@agimon-ai/po-web-security/browser';\n\nimport { routes } from '../src/types/apiRoutes';\n\n/** Scopes the tree mounts 'computer-use' at for the computer-use mount. */\nexport const computerUseScopes = ['session'] as const;\n\nexport const computerUse = createApiClient(routes, {\n scopes: computerUseScopes,\n basePath: 'computer-use',\n transport: (input, init) => browserTransport.fetch(input, init),\n sessionAddress: sessionApiAddress,\n});\n\n/** Scopes the tree mounts 'desktop-permissions' at for the desktop-permissions mount. */\nexport const desktopPermissionsScopes = ['host', 'workspace', 'session'] as const;\n\nexport const desktopPermissions = createApiClient(routes, {\n scopes: desktopPermissionsScopes,\n basePath: 'desktop-permissions',\n transport: (input, init) => browserTransport.fetch(input, init),\n sessionAddress: sessionApiAddress,\n});\n","import {\n Badge,\n Button,\n SettingsActions,\n SettingsCard,\n SettingsRow,\n SettingsRowDescription,\n SettingsRowText,\n SettingsRowTitle,\n SettingsSection,\n SettingsSectionDescription,\n SettingsSectionHeader,\n SettingsSectionTitle,\n} from '@agimon-ai/po-web-components';\n\nimport {\n DESKTOP_PERMISSIONS,\n type DesktopPermission,\n type DesktopPermissionState,\n type DesktopPermissionStates,\n} from '../../../../types/desktopPermissions';\n\nexport type DesktopPermissionsViewState =\n | { status: 'loading' }\n | {\n status: 'ready';\n states: DesktopPermissionStates;\n asking?: DesktopPermission;\n }\n | { status: 'unavailable' }\n | { status: 'error'; error: string };\n\nexport interface DesktopPermissionsViewProps {\n state: DesktopPermissionsViewState;\n /** Read from a paired device rather than the Desktop window, so prompts appear on another screen. */\n remote: boolean;\n onAsk: (permission: DesktopPermission) => void;\n onRefresh: () => void;\n}\n\nconst COPY: Record<DesktopPermission, { title: string; detail: string }> = {\n accessibility: {\n title: 'Accessibility',\n detail: 'Lets Po press buttons, fill fields and scroll in the app window you approve for computer use.',\n },\n 'screen-recording': {\n title: 'Screen and system audio recording',\n detail:\n 'Lets Po see and record the window you approve, with its sound. macOS asks you to reopen Po after you allow it.',\n },\n microphone: {\n title: 'Microphone',\n detail: 'Lets you talk to Po, and adds your voice to computer-use recordings.',\n },\n automation: {\n title: 'Automation',\n detail:\n 'Lets Po and its agents control other apps, such as Finder or Mail. macOS asks once for each app; your answers are listed in System Settings.',\n },\n 'full-disk-access': {\n title: 'Full Disk Access',\n detail:\n 'Optional. Lets agents and their tools read Documents, Downloads and Mail without a prompt for each folder.',\n },\n};\n\nconst BADGE: Record<DesktopPermissionState, { label: string; tone: 'green' | 'neutral' }> = {\n granted: { label: 'Allowed', tone: 'green' },\n denied: { label: 'Not allowed', tone: 'neutral' },\n 'not-determined': { label: 'Not asked yet', tone: 'neutral' },\n 'per-app': { label: 'Asked per app', tone: 'neutral' },\n};\n\nfunction PermissionRow({\n permission,\n state,\n asking,\n waiting,\n onAsk,\n}: {\n permission: DesktopPermission;\n state: DesktopPermissionState;\n asking: boolean;\n waiting: boolean;\n onAsk: (permission: DesktopPermission) => void;\n}) {\n const badge = BADGE[state];\n return (\n <SettingsRow asChild className=\"items-start\" data-testid={`desktop-permission-${permission}`}>\n <li>\n <SettingsRowText className=\"gap-1\">\n <SettingsRowTitle className=\"flex min-h-6 items-center gap-2\">\n {COPY[permission].title}\n <Badge tone={badge.tone}>{badge.label}</Badge>\n </SettingsRowTitle>\n <SettingsRowDescription>{COPY[permission].detail}</SettingsRowDescription>\n </SettingsRowText>\n {state === 'granted' ? null : (\n <Button variant=\"outline\" size=\"sm\" disabled={waiting} onClick={() => onAsk(permission)}>\n {asking ? 'Waiting for macOS' : state === 'not-determined' ? 'Allow' : 'Open System Settings'}\n </Button>\n )}\n </li>\n </SettingsRow>\n );\n}\n\nfunction Message({\n title,\n detail,\n alert,\n action,\n}: {\n title: string;\n detail: string;\n alert?: boolean;\n action?: () => void;\n}) {\n return (\n <SettingsRow asChild role={alert ? 'alert' : 'status'}>\n <li>\n <SettingsRowText>\n <SettingsRowTitle>{title}</SettingsRowTitle>\n <SettingsRowDescription>{detail}</SettingsRowDescription>\n </SettingsRowText>\n {action === undefined ? null : (\n <Button variant=\"outline\" size=\"sm\" onClick={action}>\n Try again\n </Button>\n )}\n </li>\n </SettingsRow>\n );\n}\n\n/** The macOS permissions Po needs on the Mac running Desktop, each with the one step that changes it. */\nexport function DesktopPermissionsView({ state, remote, onAsk, onRefresh }: DesktopPermissionsViewProps) {\n return (\n <SettingsSection data-testid=\"desktop-permissions\">\n <SettingsSectionHeader>\n <SettingsSectionTitle>On this Mac</SettingsSectionTitle>\n <SettingsSectionDescription>\n {remote\n ? 'These belong to the Mac running Po Desktop. When you ask from here, macOS shows its prompt on that Mac.'\n : 'Po asks macOS for each one when you are ready. You can change them any time in System Settings, Privacy and Security.'}\n </SettingsSectionDescription>\n {state.status === 'ready' ? (\n <SettingsActions>\n <Button variant=\"ghost\" size=\"sm\" onClick={onRefresh}>\n Check again\n </Button>\n </SettingsActions>\n ) : null}\n </SettingsSectionHeader>\n <SettingsCard asChild>\n <ul>\n {state.status === 'loading' ? (\n <Message title=\"Checking with macOS\" detail=\"This takes a moment.\" />\n ) : state.status === 'unavailable' ? (\n <Message\n title=\"Po Desktop is not running here\"\n detail=\"Permissions belong to the Mac running Po Desktop. Open Po Desktop there to see and change them.\"\n />\n ) : state.status === 'error' ? (\n <Message title=\"Po couldn't read the permissions just now\" detail={state.error} alert action={onRefresh} />\n ) : (\n DESKTOP_PERMISSIONS.map((permission) => (\n <PermissionRow\n key={permission}\n permission={permission}\n state={state.states[permission]}\n asking={state.asking === permission}\n waiting={state.asking !== undefined}\n onAsk={onAsk}\n />\n ))\n )}\n </ul>\n </SettingsCard>\n </SettingsSection>\n );\n}\n","import type { SettingsPanelProps } from '@agimon-ai/po-core/web';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { desktopPermissions as api } from '../../../../../generated/client';\nimport type { DesktopPermission, DesktopPermissionStates } from '../../../../types/desktopPermissions';\nimport { DesktopPermissionsView, type DesktopPermissionsViewState } from './DesktopPermissionsView';\n\n/** UI discovery only: picks the copy. The server checks Electron's injected proof, not this marker. */\nfunction inDesktopWindow(): boolean {\n return (window as Window & { poDesktop?: { platform?: string } }).poDesktop?.platform === 'desktop';\n}\n\nasync function viewStateOf(pending: Promise<Response>): Promise<DesktopPermissionsViewState> {\n try {\n const response = await pending;\n if (response.status === 404) return { status: 'unavailable' };\n const body = (await response.json().catch(() => undefined)) as Record<string, unknown> | undefined;\n if (response.ok && body !== undefined && !('error' in body))\n return { status: 'ready', states: body as DesktopPermissionStates };\n const error = typeof body?.error === 'string' ? body.error : undefined;\n return { status: 'error', error: error ?? 'Po Desktop did not answer.' };\n } catch (error) {\n return {\n status: 'error',\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\n/** Reads Desktop's macOS permissions through the host's transport, and asks for one with step-up. */\nexport function DesktopPermissionsPanel({ request, requestWithStepUp }: SettingsPanelProps) {\n const [state, setState] = useState<DesktopPermissionsViewState>({\n status: 'loading',\n });\n\n const load = useCallback(async () => {\n setState(await viewStateOf(request(api.host.desktopPermissions.url())));\n }, [request]);\n\n useEffect(() => {\n // Reading macOS is the external sync; the state it sets arrives after the request.\n // oxlint-disable-next-line react/set-state-in-effect\n void load();\n // A change made in System Settings shows up when the person comes back to Po.\n const onFocus = (): void => void load();\n window.addEventListener('focus', onFocus);\n return () => window.removeEventListener('focus', onFocus);\n }, [load]);\n\n const ask = async (permission: DesktopPermission): Promise<void> => {\n setState((current) => (current.status === 'ready' ? { ...current, asking: permission } : current));\n const route = api.host.requestDesktopPermission;\n setState(\n await viewStateOf(\n requestWithStepUp(route.url(), {\n method: route.spec.method,\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ permission }),\n }),\n ),\n );\n };\n\n return (\n <DesktopPermissionsView\n state={state}\n remote={!inDesktopWindow()}\n onAsk={(permission) => void ask(permission)}\n onRefresh={() => void load()}\n />\n );\n}\n","import { defineSettingsPanel } from '@agimon-ai/po-core/web';\nimport { ShieldIcon } from '@agimon-ai/po-web-components';\n\nimport { DesktopPermissionsPanel } from './_components/DesktopPermissionsPanel';\n\nexport default defineSettingsPanel({\n label: 'permissions',\n detail: 'what Po may do on this Mac',\n order: 46,\n icon: ShieldIcon,\n component: DesktopPermissionsPanel,\n});\n","import type { WebPluginDefinition } from '@agimon-ai/po-core/web';\n\nimport { computerUseSettingsSection } from '../../../(frontend)/_lib/computerUseSettings';\n\nexport default {\n settingsSections: [computerUseSettingsSection],\n} satisfies NonNullable<WebPluginDefinition['workspace']>;\n","import { defineSettingsSection } from '@agimon-ai/po-core/web';\nimport { MonitorIcon } from '@agimon-ai/po-web-components';\n\nimport legacy from '../_legacy';\n\nexport default defineSettingsSection({\n ...legacy.settingsSections![0]!,\n icon: MonitorIcon,\n});\n","import { defineSessionStore } from '@agimon-ai/po-core/web';\n\nimport { computerUseChannelType } from '../../../../../types/computerUseApi';\nimport type { ComputerUseChannelPayload } from '../../../../../types/computerUseApi';\n\nexport interface ComputerUseSession extends ComputerUseChannelPayload {}\n\nconst initialState: ComputerUseSession = {\n state: { sessionId: '', revision: 0, wake: 0, phase: 'inactive' },\n targets: [],\n};\n\nexport const computerUse = defineSessionStore<ComputerUseSession>(initialState);\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport const computerUseChannel = computerUse.channel<ComputerUseChannelPayload>({\n channel: computerUseChannelType,\n parse(input) {\n if (!isRecord(input) || !isRecord(input.state) || !Array.isArray(input.targets)) return null;\n if (typeof input.state.phase !== 'string' || typeof input.state.revision !== 'number') return null;\n return input as unknown as ComputerUseChannelPayload;\n },\n reduce: (_current, payload) => payload,\n});\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { Button, CheckIcon, MonitorIcon } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect, useState } from 'react';\n\nimport { COMPUTER_USE_DEFAULT_DURATION_MS, computerUseChannelType } from '../../../../../../types/computerUseApi';\nimport { computerUse } from '../../_lib/computerUseStore';\n\nfunction text(value: unknown, fallback: string): string {\n return typeof value === 'string' || typeof value === 'number' ? String(value) : fallback;\n}\n\nfunction remaining(ms: number): string {\n const seconds = Math.max(0, Math.ceil(ms / 1000));\n return `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, '0')} left`;\n}\n\nexport function ComputerUsePanel(props: WebPluginSlotProps) {\n return <SessionPanel key={props.sessionId ?? 'none'} {...props} />;\n}\n\nfunction SessionPanel({ sessionId, sendSessionFrame }: WebPluginSlotProps) {\n const session = useStore(computerUse.store, (state) => computerUse.select(state, sessionId));\n const [now, setNow] = useState(Date.now);\n const expiresAt = session.state.phase === 'active' ? session.state.expiresAt : undefined;\n const send = (payload: Record<string, unknown>) => {\n if (sessionId !== null) sendSessionFrame(sessionId, { type: computerUseChannelType, payload });\n };\n\n useEffect(() => {\n if (sessionId === null) return;\n sendSessionFrame(sessionId, {\n type: computerUseChannelType,\n payload: { action: 'status' },\n });\n }, [sendSessionFrame, sessionId]);\n\n useEffect(() => {\n if (expiresAt === undefined) return;\n const timer = setInterval(() => setNow(Date.now()), 1000);\n return () => clearInterval(timer);\n }, [expiresAt]);\n\n if (sessionId === null) return <p className=\"px-1 text-sm text-po-dim\">Select a session.</p>;\n const state = session.state;\n const artifact = state.artifact;\n // A monitor, not a setup form: an inactive session shows nothing, and a finished recording reaches the person by notification.\n if (state.phase === 'inactive') return null;\n const controlled =\n state.target?.scope === 'desktop' ? 'your whole desktop' : text(state.target?.applicationName, 'the chosen window');\n const left = expiresAt === undefined ? undefined : expiresAt - now;\n const total = state.durationMs ?? COMPUTER_USE_DEFAULT_DURATION_MS;\n return (\n <div data-testid=\"computer-use-panel\" className=\"flex flex-col gap-3 text-base text-po-text\">\n <header className=\"flex items-center gap-2 border-b border-po-border-soft pb-2\">\n <MonitorIcon aria-hidden className=\"size-4 text-po-dim\" />\n <strong className=\"flex-1 text-po-hi\">Computer use</strong>\n </header>\n {state.failure ? <p className=\"text-po-red\">{state.failure.message}</p> : null}\n {artifact?.status === 'ready' ? (\n <p data-testid=\"computer-use-artifact\" className=\"flex items-center gap-2\">\n <span aria-hidden className=\"flex size-5 items-center justify-center rounded-full bg-po-green text-po-rail\">\n <CheckIcon className=\"size-3\" />\n </span>\n Recording finished.\n </p>\n ) : null}\n {artifact?.failure ? <p className=\"text-po-red\">{artifact.failure.message}</p> : null}\n\n {state.phase === 'awaiting_confirmation' || state.phase === 'activating' ? (\n <div>\n <p>Desktop activation is pending.</p>\n <Button size=\"sm\" type=\"button\" onClick={() => send({ action: 'stop' })}>\n Cancel activation\n </Button>\n </div>\n ) : null}\n {state.phase === 'active' || state.phase === 'stopping' ? (\n <div className=\"flex flex-col gap-2\">\n <p className=\"flex items-center gap-2 text-po-green\">\n <span aria-hidden className=\"size-2 rounded-full bg-po-green\" />\n {state.phase === 'stopping' ? 'Po is handing control back' : `Po is controlling ${controlled}`}\n </p>\n {left === undefined ? null : (\n <div className=\"flex items-center gap-2\">\n <div\n role=\"progressbar\"\n aria-label=\"Time left\"\n aria-valuemin={0}\n aria-valuemax={total}\n aria-valuenow={Math.max(0, left)}\n className=\"h-1.5 flex-1 overflow-hidden rounded-full bg-po-border-soft\"\n >\n <div\n className=\"h-full rounded-full bg-po-green\"\n style={{\n width: `${Math.min(100, Math.max(0, (left / total) * 100))}%`,\n }}\n />\n </div>\n <span className=\"text-sm text-po-dim tabular-nums\">{remaining(left)}</span>\n </div>\n )}\n <Button\n size=\"sm\"\n type=\"button\"\n disabled={state.phase === 'stopping'}\n className=\"min-h-7 rounded border border-po-border bg-po-panel px-2 py-1\"\n onClick={() => send({ action: 'stop' })}\n >\n Stop computer use\n </Button>\n </div>\n ) : null}\n </div>\n );\n}\n","// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web contract.\n\n/** Lines a computer tool card shows before it expands, on web and native alike. */\nexport const COMPUTER_TOOL_COLLAPSED_LINES = 8;\n/** Elements of an observation the native card lists before it expands. */\nexport const COMPUTER_ELEMENTS_PREVIEW = 5;\n/** Script log lines the native card lists before it expands. */\nexport const COMPUTER_LOGS_PREVIEW = 3;\n\nconst MS_PER_SECOND = 1000;\n\n/** The computer_state call's summary: it always observes the one authorized window. */\nexport function computerStateCallSummary(_args: Readonly<Record<string, unknown>>): string {\n return 'authorized window';\n}\n\n/**\n * The computer_action call as its two pieces: the action kind first, the element\n * it targets second. Either may be missing; the empty ones are dropped.\n */\nexport function computerActionCallParts(args: Readonly<Record<string, unknown>>): readonly string[] {\n const kind = typeof args.kind === 'string' ? args.kind : '';\n const ref = typeof args.elementRef === 'string' ? args.elementRef : '';\n return [kind, ref].filter(Boolean);\n}\n\n/** The computer_exec call's summary: the script it ran. */\nexport function computerExecCallSummary(args: Readonly<Record<string, unknown>>): string {\n return typeof args.scriptPath === 'string' ? args.scriptPath : '';\n}\n\n/**\n * The script path as its folder and its file name, so a phone header can let the\n * folder truncate while the script name stays whole.\n */\nexport function computerExecPathParts(path: string): {\n readonly folder: string;\n readonly name: string;\n} {\n const cut = path.lastIndexOf('/');\n return cut < 0 ? { folder: '', name: path } : { folder: path.slice(0, cut + 1), name: path.slice(cut + 1) };\n}\n\nexport interface ComputerElementView {\n readonly ref: string;\n /** The accessibility role in words: `AXTextField` reads `text field`. */\n readonly role: string;\n /** The label, else the value, else empty. */\n readonly label: string;\n readonly enabled: boolean;\n readonly secure: boolean;\n}\n\nexport interface ComputerObservationView {\n readonly applicationName: string;\n readonly windowTitle: string;\n readonly elements: readonly ComputerElementView[];\n /** The next page's offset when more elements exist than this page holds. */\n readonly nextOffset?: number;\n readonly truncated: boolean;\n readonly screenshotArtifact?: string;\n}\n\nexport interface ComputerFieldView {\n readonly key: string;\n readonly value: string;\n}\n\nexport interface ComputerRunView {\n /** The script's return value as short key and value pairs, never raw JSON. */\n readonly fields: readonly ComputerFieldView[];\n readonly logs: readonly string[];\n readonly actions?: number;\n readonly observations?: number;\n /** `3.4s`, from the run's metrics. */\n readonly duration?: string;\n readonly observation?: ComputerObservationView;\n}\n\nexport interface ComputerFailureView {\n readonly reason: string;\n /** Actions that finished before the run stopped, so the agent does not replay them. */\n readonly completedActions?: number;\n readonly outcomeUncertain: boolean;\n}\n\n/** What a computer tool result says, parsed and validated; `text` only when it is not JSON the card knows. */\nexport type ComputerResultView =\n | {\n readonly kind: 'observation';\n readonly observation: ComputerObservationView;\n }\n | { readonly kind: 'run'; readonly run: ComputerRunView }\n | { readonly kind: 'applied' }\n | {\n readonly kind: 'launched';\n readonly applicationName: string;\n readonly bundleId: string;\n }\n | { readonly kind: 'failure'; readonly failure: ComputerFailureView }\n | { readonly kind: 'text'; readonly lines: readonly string[] };\n\nfunction record(value: unknown): Record<string, unknown> | undefined {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\nconst text = (value: unknown): string => (typeof value === 'string' ? value : '');\nconst count = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : undefined;\n\n/** The result's text blocks joined; images (the screenshot) are dropped, as the web cards drop them. */\nexport function computerResultText(content: readonly unknown[]): string {\n return content\n .flatMap((block) => {\n const entry = record(block);\n return entry?.type === 'text' && typeof entry.text === 'string' ? [entry.text] : [];\n })\n .join('\\n');\n}\n\n/** `AXTextField` as `text field`; a role without the AX prefix is kept as it came. */\nexport function computerRoleWords(role: string): string {\n if (!role.startsWith('AX')) return role;\n return role\n .slice(2)\n .replace(/([a-z])([A-Z])/gu, '$1 $2')\n .toLowerCase();\n}\n\nfunction element(value: unknown): ComputerElementView[] {\n const entry = record(value);\n if (entry === undefined || typeof entry.ref !== 'string') return [];\n return [\n {\n ref: entry.ref,\n role: computerRoleWords(text(entry.role)),\n label: text(entry.label) || text(entry.value),\n enabled: entry.enabled !== false,\n secure: entry.secure === true,\n },\n ];\n}\n\n/** An observation when the value is one: an application name and an element list. */\nexport function computerObservationView(value: unknown): ComputerObservationView | undefined {\n const entry = record(value);\n if (entry === undefined || typeof entry.applicationName !== 'string' || !Array.isArray(entry.elements))\n return undefined;\n const nextOffset = count(entry.nextOffset);\n const artifact = text(entry.screenshotArtifact);\n return {\n applicationName: entry.applicationName,\n windowTitle: text(entry.windowTitle),\n elements: entry.elements.flatMap(element),\n truncated: entry.truncated === true || nextOffset !== undefined,\n ...(nextOffset === undefined ? {} : { nextOffset }),\n ...(artifact.length > 0 ? { screenshotArtifact: artifact } : {}),\n };\n}\n\n/** One value of a script result as a short phrase: scalars as they read, collections by their size. */\nfunction phrase(value: unknown): string {\n if (value === null || value === undefined) return 'none';\n if (typeof value === 'string') return value;\n if (typeof value === 'number' || typeof value === 'boolean') return String(value);\n if (Array.isArray(value)) return `${String(value.length)} item${value.length === 1 ? '' : 's'}`;\n const size = Object.keys(value as object).length;\n return `${String(size)} field${size === 1 ? '' : 's'}`;\n}\n\n/** A script's return value as fields: an object's own keys, or one `result` field for anything else. */\nexport function computerResultFields(value: unknown): ComputerFieldView[] {\n if (value === undefined) return [];\n const entry = record(value);\n if (entry === undefined) return [{ key: 'result', value: phrase(value) }];\n return Object.entries(entry).map(([key, field]) => ({\n key,\n value: phrase(field),\n }));\n}\n\nfunction run(entry: Record<string, unknown>): ComputerRunView | undefined {\n if (!Array.isArray(entry.logs)) return undefined;\n const observation = computerObservationView(entry.observation);\n const metrics = record(entry.metrics);\n const actions = count(metrics?.actions);\n const observations = count(metrics?.observations);\n const durationMs = count(metrics?.durationMs);\n return {\n fields: computerResultFields(entry.result),\n logs: entry.logs.filter((line): line is string => typeof line === 'string'),\n ...(actions === undefined ? {} : { actions }),\n ...(observations === undefined ? {} : { observations }),\n ...(durationMs === undefined ? {} : { duration: `${(durationMs / MS_PER_SECOND).toFixed(1)}s` }),\n ...(observation === undefined ? {} : { observation }),\n };\n}\n\nfunction failure(entry: Record<string, unknown>): ComputerFailureView | undefined {\n if (typeof entry.error !== 'string') return undefined;\n const completedActions = count(entry.completedActions);\n return {\n reason: entry.error,\n ...(completedActions === undefined ? {} : { completedActions }),\n outcomeUncertain: entry.outcomeUncertain === true,\n };\n}\n\n/** The text as lines a card can count: CRLF folded, tabs widened, trailing blank lines dropped. */\nfunction lines(value: string): string[] {\n if (value.length === 0) return [];\n const split = value.replaceAll('\\r\\n', '\\n').replaceAll('\\t', ' ').split('\\n');\n while (split.length > 0 && split.at(-1)?.trim() === '') split.pop();\n return split;\n}\n\n/**\n * A computer tool result as the card lays it out. The tools answer in JSON (an\n * observation, an action's outcome, a script run, a script failure) or in a\n * plain sentence when they fail early; anything that does not parse as a shape\n * the card knows falls back to its text lines.\n */\nexport function computerResultView(content: readonly unknown[]): ComputerResultView {\n const raw = computerResultText(content);\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n return { kind: 'text', lines: lines(raw) };\n }\n const entry = record(parsed);\n const observation = computerObservationView(parsed);\n if (observation !== undefined) return { kind: 'observation', observation };\n const ran = entry === undefined ? undefined : run(entry);\n if (ran !== undefined) return { kind: 'run', run: ran };\n const failed = entry === undefined ? undefined : failure(entry);\n if (failed !== undefined) return { kind: 'failure', failure: failed };\n if (entry?.launched === true && typeof entry.applicationName === 'string')\n return {\n kind: 'launched',\n applicationName: entry.applicationName,\n bundleId: text(entry.bundleId),\n };\n if (entry?.applied === true) return { kind: 'applied' };\n return { kind: 'text', lines: lines(raw) };\n}\n\n/** How many rows the view holds back while collapsed, so the card offers expand only when it reveals something. */\nexport function computerResultHidden(view: ComputerResultView): number {\n switch (view.kind) {\n case 'observation':\n return Math.max(0, view.observation.elements.length - COMPUTER_ELEMENTS_PREVIEW);\n case 'run':\n return Math.max(0, view.run.logs.length - COMPUTER_LOGS_PREVIEW);\n case 'text':\n return Math.max(0, view.lines.length - COMPUTER_TOOL_COLLAPSED_LINES);\n default:\n return 0;\n }\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport { Badge, MessageItemBody, MessageItemStatus } from '@agimon-ai/po-web-components';\n\nimport {\n COMPUTER_ELEMENTS_PREVIEW,\n COMPUTER_LOGS_PREVIEW,\n COMPUTER_TOOL_COLLAPSED_LINES,\n type ComputerElementView,\n type ComputerFailureView,\n type ComputerObservationView,\n type ComputerResultView,\n type ComputerRunView,\n computerResultHidden,\n computerResultView,\n} from '../_lib/computerToolView';\n\n/** The parsed result, or none before the tool answers. */\nexport function computerResult(props: ToolMessageRenderProps): ComputerResultView | undefined {\n return props.result === null ? undefined : computerResultView(props.result.content);\n}\n\n/** Whether the card has rows to reveal: the header offers expand only then, and never on a failure. */\nexport function computerResultExpandable(props: ToolMessageRenderProps): boolean {\n const view = computerResult(props);\n return !props.isError && view !== undefined && computerResultHidden(view) > 0;\n}\n\nconst plural = (count: number, noun: string): string => `${String(count)} ${noun}${count === 1 ? '' : 's'}`;\n\n/**\n * The body the three computer tool cards share on web, laid out from the same\n * parsed view as the native body (ComputerResultBody.native.tsx): the window and\n * its elements, a script's figures, fields and logs, an action's outcome. A\n * preview shows while collapsed. A failure shows only its reason in red, with a\n * quiet note of any actions that already ran; the header already says it failed.\n */\nexport function ComputerResultBody({ props, expanded }: { props: ToolMessageRenderProps; expanded: boolean }) {\n const { toolName, output, running, isError } = props;\n const view = computerResult(props);\n const testID = `tool-result-${toolName}`;\n if (isError) {\n const failure: ComputerFailureView =\n view?.kind === 'failure'\n ? view.failure\n : {\n reason: view?.kind === 'text' ? view.lines.join('\\n') : output.trim(),\n outcomeUncertain: false,\n };\n return failure.reason.length === 0 ? null : (\n <MessageItemBody data-testid={testID}>\n <FailureBlock failure={failure} />\n </MessageItemBody>\n );\n }\n if (view === undefined) {\n return running ? (\n <MessageItemBody data-testid={testID}>\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null;\n }\n if (view.kind === 'text' && view.lines.length === 0) return null;\n return (\n <MessageItemBody data-testid={testID} className=\"flex flex-col gap-2\">\n {view.kind === 'observation' ? <ObservationBlock observation={view.observation} expanded={expanded} /> : null}\n {view.kind === 'run' ? <RunBlock run={view.run} expanded={expanded} /> : null}\n {view.kind === 'applied' ? <span className=\"text-po-text\">Applied to the element.</span> : null}\n {view.kind === 'launched' ? (\n <div className=\"flex min-w-0 items-baseline gap-2\">\n <span className=\"max-w-[60%] shrink-0 truncate font-semibold text-po-text\">\n Opened {view.applicationName}\n </span>\n <span className=\"min-w-0 truncate font-mono text-sm text-po-faint\">{view.bundleId}</span>\n </div>\n ) : null}\n {view.kind === 'text' ? <TextLines lines={view.lines} expanded={expanded} /> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n </MessageItemBody>\n );\n}\n\nfunction FailureBlock({ failure }: { failure: ComputerFailureView }) {\n const done = failure.completedActions;\n const note = [\n done === undefined ? '' : `${plural(done, 'action')} already ran`,\n failure.outcomeUncertain ? 'the last outcome is uncertain' : '',\n ].filter(Boolean);\n return (\n <div className=\"flex flex-col gap-1\">\n <span className=\"whitespace-pre-wrap break-words text-po-red\">{failure.reason}</span>\n {note.length > 0 ? <span className=\"text-sm text-po-faint\">{note.join(', ')}.</span> : null}\n </div>\n );\n}\n\nfunction WindowLine({ observation, lead }: { observation: ComputerObservationView; lead?: string }) {\n return (\n <div className=\"flex min-w-0 items-baseline gap-2\">\n <span className=\"max-w-[60%] shrink-0 truncate font-semibold text-po-text\">\n {lead === undefined ? '' : `${lead} `}\n {observation.applicationName}\n </span>\n {observation.windowTitle.length > 0 ? (\n <span className=\"min-w-0 truncate text-po-dim\">{observation.windowTitle}</span>\n ) : null}\n </div>\n );\n}\n\nfunction ElementRow({ element }: { element: ComputerElementView }) {\n // A secure field's role already says so (`secure text field`); the flag is named only when it does not.\n const secure = element.secure && !element.role.includes('secure');\n const traits = [element.role, element.enabled ? '' : 'disabled', secure ? 'secure' : ''].filter(Boolean);\n return (\n <li className=\"contents\">\n <span className={`min-w-0 truncate ${element.enabled ? 'text-po-text' : 'text-po-faint'}`}>\n {element.label.length > 0 ? element.label : element.role}\n </span>\n <span className=\"truncate text-sm text-po-faint\">{traits.join(' · ')}</span>\n <span className=\"text-right font-mono text-sm text-po-faint\">{element.ref}</span>\n </li>\n );\n}\n\nfunction ObservationBlock({ observation, expanded }: { observation: ComputerObservationView; expanded: boolean }) {\n const { elements } = observation;\n const shown = expanded ? elements : elements.slice(0, COMPUTER_ELEMENTS_PREVIEW);\n const hidden = elements.length - shown.length;\n return (\n <>\n <div className=\"flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5\">\n <WindowLine observation={observation} />\n <div className=\"flex flex-wrap gap-1.5\">\n <Badge size=\"xs\">{plural(elements.length, 'element')}</Badge>\n {observation.truncated ? (\n <Badge size=\"xs\" tone=\"yellow\">\n {observation.nextOffset === undefined\n ? 'more not shown'\n : `more from offset ${String(observation.nextOffset)}`}\n </Badge>\n ) : null}\n </div>\n </div>\n {shown.length > 0 ? (\n <ul\n aria-label=\"Elements\"\n className=\"grid grid-cols-[minmax(0,1fr)_minmax(0,auto)_auto] items-baseline gap-x-4 gap-y-1\"\n >\n {shown.map((element) => (\n <ElementRow key={element.ref} element={element} />\n ))}\n </ul>\n ) : null}\n {hidden > 0 ? <MessageItemStatus expands>{plural(hidden, 'more element')}</MessageItemStatus> : null}\n {observation.screenshotArtifact === undefined ? null : (\n <span className=\"break-all text-sm text-po-faint\">Screenshot saved to {observation.screenshotArtifact}</span>\n )}\n </>\n );\n}\n\nfunction RunBlock({ run, expanded }: { run: ComputerRunView; expanded: boolean }) {\n const figures = [\n run.actions === undefined ? '' : plural(run.actions, 'action'),\n run.observations === undefined ? '' : plural(run.observations, 'observation'),\n run.duration ?? '',\n ].filter(Boolean);\n const logs = expanded ? run.logs : run.logs.slice(0, COMPUTER_LOGS_PREVIEW);\n const hidden = run.logs.length - logs.length;\n return (\n <>\n {figures.length > 0 ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {figures.map((figure) => (\n <Badge key={figure} size=\"xs\">\n {figure}\n </Badge>\n ))}\n </div>\n ) : null}\n {run.fields.length > 0 ? (\n <dl\n aria-label=\"Result\"\n className=\"grid grid-cols-[minmax(0,auto)_minmax(0,1fr)] items-baseline gap-x-4 gap-y-1\"\n >\n {run.fields.map((field) => (\n <div key={field.key} className=\"contents\">\n <dt className=\"max-w-48 truncate text-sm text-po-faint\">{field.key}</dt>\n <dd className=\"min-w-0 truncate text-po-text\">{field.value}</dd>\n </div>\n ))}\n </dl>\n ) : null}\n {logs.length > 0 ? (\n <ul aria-label=\"Logs\" className=\"flex flex-col gap-0.5\">\n {logs.map((line, index) => (\n <li key={`${String(index)}-${line}`} className=\"min-w-0 truncate font-mono text-sm text-po-dim\">\n {line}\n </li>\n ))}\n </ul>\n ) : null}\n {hidden > 0 ? <MessageItemStatus expands>{plural(hidden, 'more log line')}</MessageItemStatus> : null}\n {run.observation === undefined ? null : <WindowLine observation={run.observation} lead=\"Ended on\" />}\n </>\n );\n}\n\nfunction TextLines({ lines, expanded }: { lines: readonly string[]; expanded: boolean }) {\n const shown = expanded ? lines : lines.slice(0, COMPUTER_TOOL_COLLAPSED_LINES);\n const hidden = lines.length - shown.length;\n return (\n <>\n <div className=\"flex flex-col gap-0.5\">\n {shown.map((line, index) => (\n <span key={`${String(index)}-${line}`} className=\"whitespace-pre-wrap break-words text-po-dim\">\n {line}\n </span>\n ))}\n </div>\n {hidden > 0 ? <MessageItemStatus expands>{plural(hidden, 'more line')}</MessageItemStatus> : null}\n </>\n );\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport { MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-web-components';\n\nimport { computerActionCallParts } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody';\n\n/**\n * The computer_action tool's timeline item: the action and the element it\n * targets in the header, the outcome as one line beneath. The action is what\n * Po did, so it stays whole; the element ref truncates first.\n */\nexport function ComputerActionToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n const [kind, ...target] = computerActionCallParts(args);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"flex min-w-0 flex-1 items-baseline gap-2\">\n {kind === undefined ? null : <span className=\"max-w-[45%] shrink-0 truncate text-po-text\">{kind}</span>}\n {target.length > 0 ? <span className=\"min-w-0 truncate text-po-dim\">{target.join(' ')}</span> : null}\n </span>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport { MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-web-components';\n\nimport { computerExecCallSummary, computerExecPathParts } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody';\n\n/**\n * The computer_exec tool's timeline item: the script path in the header, the\n * run laid out beneath it (figures, return value, first logs, final window).\n * A long path loses its folder first, so the script name stays readable.\n */\nexport function ComputerExecToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n const path = computerExecPathParts(computerExecCallSummary(args));\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"flex min-w-0 flex-1 items-baseline\">\n {path.folder.length > 0 ? <span className=\"min-w-0 truncate text-po-dim\">{path.folder}</span> : null}\n <span className=\"max-w-full shrink-0 truncate text-po-text\">{path.name}</span>\n </span>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport { MessageItem, MessageItemHeader, toolTone } from '@agimon-ai/po-web-components';\n\nimport { computerStateCallSummary } from '../_lib/computerToolView';\nimport { ComputerResultBody, computerResultExpandable } from './ComputerResultBody';\n\n/**\n * The computer_state tool's timeline item: the observed window in the header,\n * the observation laid out beneath it (window, element count, element list).\n * The shell owns the frame, the outcome tone, the status badge, and the toggle.\n */\nexport function ComputerStateToolCard(props: ToolMessageRenderProps) {\n const { toolName, args, running, isError } = props;\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={computerResultExpandable(props)}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"min-w-0 flex-1 truncate text-po-text\">\n {computerStateCallSummary(args)}\n </span>\n </MessageItemHeader>\n <ComputerResultBody props={props} expanded={expanded} />\n </>\n )}\n </MessageItem>\n );\n}\n","import { COMPUTER_TOOL_COLLAPSED_LINES, computerActionCallParts } from './computerToolView';\n\nexport const computerActionToolName = 'computer_action' as const;\nexport const computerActionCollapsedLines = COMPUTER_TOOL_COLLAPSED_LINES;\n\nexport function computerActionCallSummary(args: Readonly<Record<string, unknown>>): string {\n return computerActionCallParts(args).join(' ');\n}\n","import { COMPUTER_TOOL_COLLAPSED_LINES, computerExecCallSummary as execSummary } from './computerToolView';\n\nexport const computerExecToolName = 'computer_exec' as const;\nexport const computerExecCollapsedLines = COMPUTER_TOOL_COLLAPSED_LINES;\n\nexport function computerExecCallSummary(args: Readonly<Record<string, unknown>>): string {\n return execSummary(args);\n}\n","import { COMPUTER_TOOL_COLLAPSED_LINES, computerStateCallSummary as stateSummary } from './computerToolView';\n\nexport const computerStateToolName = 'computer_state' as const;\nexport const computerStateCollapsedLines = COMPUTER_TOOL_COLLAPSED_LINES;\n\nexport function computerStateCallSummary(args: Readonly<Record<string, unknown>>): string {\n return stateSummary(args);\n}\n","import type { WebPluginDefinition } from '@agimon-ai/po-core/web';\nimport { MonitorIcon } from '@agimon-ai/po-web-components';\n\nimport {\n COMPUTER_USE_MODE_ID,\n COMPUTER_USE_MODE_STATUS_KEY,\n COMPUTER_USE_STATUS_KEY,\n} from '../../../../../types/computerUseApi';\nimport { computerUseChannel } from '../_lib/computerUseStore';\nimport { ComputerUsePanel } from '../fill/_components/ComputerUsePanel';\nimport { ComputerActionToolCard } from '../tool/_components/ComputerActionToolCard';\nimport { ComputerExecToolCard } from '../tool/_components/ComputerExecToolCard';\nimport { ComputerStateToolCard } from '../tool/_components/ComputerStateToolCard';\nimport { computerActionToolName } from '../tool/_lib/computerActionToolRender';\nimport { computerExecToolName } from '../tool/_lib/computerExecToolRender';\nimport { computerStateToolName } from '../tool/_lib/computerStateToolRender';\n\nexport default {\n modes: [\n {\n name: 'computer use',\n modeId: COMPUTER_USE_MODE_ID,\n keys: 'c e',\n icon: MonitorIcon,\n statusKey: COMPUTER_USE_MODE_STATUS_KEY,\n hideWhenMissing: true,\n order: 70,\n },\n ],\n activityGroups: [\n {\n name: 'computer-use',\n keys: 'c e',\n statusKey: COMPUTER_USE_STATUS_KEY,\n hideWhenEmpty: true,\n marksBackgroundWork: false,\n },\n ],\n activitySections: [{ id: 'computer-use', component: ComputerUsePanel }],\n channels: [computerUseChannel],\n toolRenderers: [\n { tools: [computerStateToolName], message: ComputerStateToolCard },\n { tools: [computerActionToolName], message: ComputerActionToolCard },\n { tools: [computerExecToolName], message: ComputerExecToolCard },\n ],\n} satisfies NonNullable<WebPluginDefinition['session']>;\n","import { defineActivityGroup } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineActivityGroup(legacy.activityGroups![0]!);\n","import { defineChannelFile } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineChannelFile(legacy.channels![0]!);\n","import { defineFill } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineFill({\n slot: 'activity.computer-use',\n ...legacy.activitySections![0]!,\n});\n","import { defineModeFile } from '@agimon-ai/po-core/web';\n\nimport legacy from '../../_legacy';\n\nexport default defineModeFile(legacy.modes![0]!);\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineToolRenderer(legacy.toolRenderers![1]!);\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineToolRenderer(legacy.toolRenderers![2]!);\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport legacy from '../_legacy';\n\nexport default defineToolRenderer(legacy.toolRenderers![0]!);\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport settingComputerUse from '../src/extensions/(frontend)/setting/computer-use.web';\nimport settingDesktopEnvironment from '../src/extensions/(frontend)/setting/desktop-environment.web';\nimport settingDesktopPermissions from '../src/extensions/(frontend)/setting/desktop-permissions.panel.web';\nimport settingComputerUse2 from '../src/extensions/workspaces/(frontend)/setting/computer-use.web';\nimport activityGroupComputerUse from '../src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.web';\nimport channelComputerUse from '../src/extensions/workspaces/sessions/(frontend)/channel/computer-use.web';\nimport fillComputerUse from '../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.web';\nimport modeComputerUse from '../src/extensions/workspaces/sessions/(frontend)/mode/computer-use/mode.web';\nimport toolComputerAction from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-action.web';\nimport toolComputerExec from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.web';\nimport toolComputerState from '../src/extensions/workspaces/sessions/(frontend)/tool/computer-state.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: 'computer-use',\n packageName: '@agimon-ai/po-computer-use',\n host: {\n get settingsPanels(): WebPluginContributions['settingsPanels'] { return [via({ id: 'desktop-permissions' }, settingDesktopPermissions)]; },\n get settingsSections(): WebPluginContributions['settingsSections'] { return [via({ id: 'computer-use' }, settingComputerUse), via({ id: 'desktop-environment' }, settingDesktopEnvironment)]; },\n },\n workspace: {\n get settingsSections(): WebPluginContributions['settingsSections'] { return [via({ id: 'computer-use' }, settingComputerUse2)]; },\n },\n session: {\n get activityGroups(): WebPluginContributions['activityGroups'] { return [via({ name: 'computer-use' }, activityGroupComputerUse)]; },\n get channels(): WebPluginContributions['channels'] { return [via({ channel: 'computer_use' }, channelComputerUse)]; },\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'activity.computer-use', id: 'computer-use' }, fillComputerUse)]; },\n get modes(): WebPluginContributions['modes'] { return [via({ name: 'computer-use' }, modeComputerUse)]; },\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['computer_action'] }, toolComputerAction), via({ tools: ['computer_exec'] }, toolComputerExec), via({ tools: ['computer_state'] }, toolComputerState)]; },\n },\n});\n"],"mappings":";;;;;;;AAEA,MAAa,6BAA0D;CACrE,IAAI;CACJ,aAAa;CACb,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ,CACN;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,SAAS,CAAC,eAAe,SAAS;EAClC,QAAQ;CACV,CACF;AACF;;;AEZA,IAAA,6BAAe,sBAAsB;CACnC,GAAGA,EDDH,kBAAkB,CAAC,0BAA0B,ECC1CA,EAAO,iBAAkB;CAC5B,MAAM;AACR,CAAC;;;AEHD,IAAA,kCAAe,sBAAsB;CDEnC,IAAI;CACJ,aAAa;CACb,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ,CACN;EACE,IAAI;EACJ,OAAO;EACP,QACE;CACJ,C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+BAAyB,CAAC;EAAG;CAChM;CACA,WAAW,EACT,IAAI,mBAA+D;EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,eAAe,GAAGC,0BAAmB,CAAC;CAAG,EAClI;CACA,SAAS;EACP,IAAI,iBAA2D;GAAE,OAAO,CAAC,IAAI,EAAE,MAAM,eAAe,GAAGC,0BAAwB,CAAC;EAAG;EACnI,IAAI,WAA+C;GAAE,OAAO,CAAC,IAAI,EAAE,SAAS,eAAe,GAAGC,wBAAkB,CAAC;EAAG;EACpH,IAAI,QAAyC;GAAE,OAAO,CAAC,IAAI;IAAE,MAAM;IAAyB,IAAI;GAAe,GAAGC,6CAAe,CAAC;EAAG;EACrI,IAAI,QAAyC;GAAE,OAAO,CAAC,IAAI,EAAE,MAAM,eAAe,GAAGC,gBAAe,CAAC;EAAG;EACxG,IAAI,gBAAyD;GAAE,OAAO;IAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,EAAE,GAAGC,2BAAkB;IAAG,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE,GAAGC,yBAAgB;IAAG,IAAI,EAAE,OAAO,CAAC,gBAAgB,EAAE,GAAGC,0BAAiB;GAAC;EAAG;CAC/O;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"platformRequirements":{},"sourceFiles":["LICENSE","README.md","docs/computer-scripts.md","docs/remote-computer-use.md","generated/client.native.ts","generated/client.ts","generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","llms.txt","package.json","src/constants/computerUse.ts","src/exports/apiContracts.ts","src/exports/index.ts","src/extensions/(backend)/_legacy/index.server.ts","src/extensions/(backend)/api/desktop-permissions/route.server.ts","src/extensions/(backend)/channel/computer-use.server.ts","src/extensions/(frontend)/_legacy/index.ts","src/extensions/(frontend)/_lib/computerUseSettings.ts","src/extensions/(frontend)/_lib/desktopEnvironmentSettings.ts","src/extensions/(frontend)/setting/_components/DesktopPermissionsPanel.native.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsPanel.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsView.native.stories.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsView.native.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsView.stories.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsView.tsx","src/extensions/(frontend)/setting/_lib/desktopPermissions.native.ts","src/extensions/(frontend)/setting/computer-use.web.ts","src/extensions/(frontend)/setting/desktop-environment.web.ts","src/extensions/(frontend)/setting/desktop-permissions.panel.native.tsx","src/extensions/(frontend)/setting/desktop-permissions.panel.web.tsx","src/extensions/workspaces/(frontend)/_legacy/index.ts","src/extensions/workspaces/(frontend)/setting/computer-use.web.ts","src/extensions/workspaces/sessions/(backend)/_runtime/index.server.ts","src/extensions/workspaces/sessions/(backend)/api/computer-use/route.server.ts","src/extensions/workspaces/sessions/(backend)/command/computer-use.server.ts","src/extensions/workspaces/sessions/(backend)/hook/before-agent-start.server.ts","src/extensions/workspaces/sessions/(backend)/hook/session-shutdown.server.ts","src/extensions/workspaces/sessions/(backend)/resource/codemode-how-to-computer-use.server.ts","src/extensions/workspaces/sessions/(backend)/root.server.ts","src/extensions/workspaces/sessions/(backend)/tool-restriction/computer-use.server.ts","src/extensions/workspaces/sessions/(backend)/tool/00-computer-state.server.ts","src/extensions/workspaces/sessions/(backend)/tool/10-computer-action.server.ts","src/extensions/workspaces/sessions/(backend)/tool/20-computer-exec.server.ts","src/extensions/workspaces/sessions/(backend)/tool/30-computer-targets.server.ts","src/extensions/workspaces/sessions/(backend)/tool/40-computer-request.server.ts","src/extensions/workspaces/sessions/(backend)/tool/computer_action.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/computer_exec.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/computer_state.mcp.ts","src/extensions/workspaces/sessions/(frontend)/_legacy/index.ts","src/extensions/workspaces/sessions/(frontend)/_lib/computerUseStore.native.ts","src/extensions/workspaces/sessions/(frontend)/_lib/computerUseStore.ts","src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.native.ts","src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.web.ts","src/extensions/workspaces/sessions/(frontend)/channel/computer-use.native.ts","src/extensions/workspaces/sessions/(frontend)/channel/computer-use.web.ts","src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.native.tsx","src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.web.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.native.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.stories.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.tsx","src/extensions/workspaces/sessions/(frontend)/mode/computer-use/mode.web.ts","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerResultBody.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerResultBody.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerActionToolRender.ts","src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerExecToolRender.ts","src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerStateToolRender.ts","src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerToolView.ts","src/extensions/workspaces/sessions/(frontend)/tool/computer-action.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-action.web.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.web.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-state.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-state.web.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer_action.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer_exec.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer_state.mcp.tsx","src/models/computerUseMode.ts","src/models/computerUseState.ts","src/prompts/codemode-how-to-computer-use/SKILL.md","src/schemas/apiContracts.ts","src/services/computerNamespace/index.ts","src/services/computerNamespace/type.ts","src/services/computerScriptRunner/index.ts","src/services/computerScriptWorker/index.ts","src/services/computerToolOutput/index.ts","src/services/computerUseApi/index.ts","src/services/computerUseArtifacts/index.ts","src/services/computerUseArtifacts/type.ts","src/services/computerUseCommand/index.ts","src/services/computerUseServer/index.ts","src/services/dependencies/index.ts","src/services/desktopPermissionsApi/index.ts","src/services/extensionService/index.ts","src/services/mcpTools/index.ts","src/services/sessionApiClient/index.ts","src/services/traceRedaction/index.ts","src/services/webComputerUseAvailability/index.ts","src/services/webComputerUseChannel/index.ts","src/types/apiRoutes.ts","src/types/computerScript.ts","src/types/computerUse.ts","src/types/computerUseApi.ts","src/types/desktopPermissions.ts","src/types/extension.ts","src/types/webComputerUse.ts","tsdown.config.ts"],"sourceRevision":"
|
|
1
|
+
{"version":1,"platformRequirements":{},"sourceFiles":["LICENSE","README.md","docs/computer-scripts.md","docs/remote-computer-use.md","generated/client.native.ts","generated/client.ts","generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","llms.txt","package.json","src/constants/computerUse.ts","src/exports/apiContracts.ts","src/exports/index.ts","src/extensions/(backend)/_legacy/index.server.ts","src/extensions/(backend)/api/desktop-permissions/route.server.ts","src/extensions/(backend)/channel/computer-use.server.ts","src/extensions/(frontend)/_legacy/index.ts","src/extensions/(frontend)/_lib/computerUseSettings.ts","src/extensions/(frontend)/_lib/desktopEnvironmentSettings.ts","src/extensions/(frontend)/setting/_components/DesktopPermissionsPanel.native.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsPanel.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsView.native.stories.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsView.native.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsView.stories.tsx","src/extensions/(frontend)/setting/_components/DesktopPermissionsView.tsx","src/extensions/(frontend)/setting/_lib/desktopPermissions.native.ts","src/extensions/(frontend)/setting/computer-use.web.ts","src/extensions/(frontend)/setting/desktop-environment.web.ts","src/extensions/(frontend)/setting/desktop-permissions.panel.native.tsx","src/extensions/(frontend)/setting/desktop-permissions.panel.web.tsx","src/extensions/workspaces/(frontend)/_legacy/index.ts","src/extensions/workspaces/(frontend)/setting/computer-use.web.ts","src/extensions/workspaces/sessions/(backend)/_runtime/index.server.ts","src/extensions/workspaces/sessions/(backend)/api/computer-use/route.server.ts","src/extensions/workspaces/sessions/(backend)/command/computer-use.server.ts","src/extensions/workspaces/sessions/(backend)/hook/before-agent-start.server.ts","src/extensions/workspaces/sessions/(backend)/hook/session-shutdown.server.ts","src/extensions/workspaces/sessions/(backend)/resource/codemode-how-to-computer-use.server.ts","src/extensions/workspaces/sessions/(backend)/root.server.ts","src/extensions/workspaces/sessions/(backend)/tool-restriction/computer-use.server.ts","src/extensions/workspaces/sessions/(backend)/tool/00-computer-state.server.ts","src/extensions/workspaces/sessions/(backend)/tool/10-computer-action.server.ts","src/extensions/workspaces/sessions/(backend)/tool/20-computer-exec.server.ts","src/extensions/workspaces/sessions/(backend)/tool/30-computer-targets.server.ts","src/extensions/workspaces/sessions/(backend)/tool/40-computer-request.server.ts","src/extensions/workspaces/sessions/(backend)/tool/computer_action.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/computer_exec.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/computer_state.mcp.ts","src/extensions/workspaces/sessions/(frontend)/_legacy/index.ts","src/extensions/workspaces/sessions/(frontend)/_lib/computerUseStore.native.ts","src/extensions/workspaces/sessions/(frontend)/_lib/computerUseStore.ts","src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.native.ts","src/extensions/workspaces/sessions/(frontend)/activity-group/computer-use.web.ts","src/extensions/workspaces/sessions/(frontend)/channel/computer-use.native.ts","src/extensions/workspaces/sessions/(frontend)/channel/computer-use.web.ts","src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.native.tsx","src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.web.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.native.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.stories.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.tsx","src/extensions/workspaces/sessions/(frontend)/mode/computer-use/mode.web.ts","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerResultBody.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerResultBody.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerActionToolRender.ts","src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerExecToolRender.ts","src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerStateToolRender.ts","src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerToolView.ts","src/extensions/workspaces/sessions/(frontend)/tool/computer-action.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-action.web.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-exec.web.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-state.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer-state.web.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer_action.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer_exec.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/computer_state.mcp.tsx","src/models/computerUseMode.ts","src/models/computerUseState.ts","src/prompts/codemode-how-to-computer-use/SKILL.md","src/schemas/apiContracts.ts","src/services/computerNamespace/index.ts","src/services/computerNamespace/type.ts","src/services/computerScriptRunner/index.ts","src/services/computerScriptWorker/index.ts","src/services/computerToolOutput/index.ts","src/services/computerUseApi/index.ts","src/services/computerUseArtifacts/index.ts","src/services/computerUseArtifacts/type.ts","src/services/computerUseCommand/index.ts","src/services/computerUseServer/index.ts","src/services/dependencies/index.ts","src/services/desktopPermissionsApi/index.ts","src/services/extensionService/index.ts","src/services/mcpTools/index.ts","src/services/sessionApiClient/index.ts","src/services/traceRedaction/index.ts","src/services/webComputerUseAvailability/index.ts","src/services/webComputerUseChannel/index.ts","src/types/apiRoutes.ts","src/types/computerScript.ts","src/types/computerUse.ts","src/types/computerUseApi.ts","src/types/desktopPermissions.ts","src/types/extension.ts","src/types/webComputerUse.ts","tsdown.config.ts"],"sourceRevision":"1120153e49466855200c52f9a6ed9209","manifestRevision":"20363824201510ecc8ec380d7ee9c8f7","outputFiles":["LICENSE","README.md","dist/apiContracts.cjs","dist/apiContracts.mjs","dist/extensionService-BKBTsnkI.cjs","dist/extensionService-DqtoB79s.mjs","dist/extensions/mcp-ui.mjs","dist/extensions/mcp.cjs","dist/extensions/mcp.mjs","dist/extensions/native.mjs","dist/extensions/server.cjs","dist/extensions/server.mjs","dist/extensions/web.mjs","dist/index.cjs","dist/index.mjs","docs/computer-scripts.md","docs/remote-computer-use.md","llms.txt","src/prompts/codemode-how-to-computer-use/SKILL.md","src/types/computerUse.ts","src/types/computerUseApi.ts"],"outputRevision":"100e5f4a1bd62bc37a83a2a2c74a687b"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-computer-use",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.194",
|
|
4
4
|
"description": "Session scoped semantic computer control through the Po Desktop capability.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -63,21 +63,21 @@
|
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@agimon-ai/po-config": "0.0.0-alpha.
|
|
67
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
68
|
-
"@agimon-ai/po-mode": "0.0.0-alpha.
|
|
69
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
70
|
-
"@agimon-ai/po-web-security": "0.0.0-alpha.
|
|
66
|
+
"@agimon-ai/po-config": "0.0.0-alpha.194",
|
|
67
|
+
"@agimon-ai/po-core": "0.0.0-alpha.194",
|
|
68
|
+
"@agimon-ai/po-mode": "0.0.0-alpha.194",
|
|
69
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.194",
|
|
70
|
+
"@agimon-ai/po-web-security": "0.0.0-alpha.194",
|
|
71
71
|
"@deepseek-ai/cordis": "4.0.5",
|
|
72
72
|
"quickjs-emscripten": "0.32.0",
|
|
73
73
|
"typebox": "1.4.2"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
77
|
-
"@agimon-ai/po-native-components": "0.0.0-alpha.
|
|
78
|
-
"@agimon-ai/po-profile": "0.0.0-alpha.
|
|
79
|
-
"@agimon-ai/po-vault": "0.0.0-alpha.
|
|
80
|
-
"@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.
|
|
76
|
+
"@agimon-ai/po-build": "0.0.0-alpha.194",
|
|
77
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.194",
|
|
78
|
+
"@agimon-ai/po-profile": "0.0.0-alpha.194",
|
|
79
|
+
"@agimon-ai/po-vault": "0.0.0-alpha.194",
|
|
80
|
+
"@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.194",
|
|
81
81
|
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
82
82
|
"@tanstack/react-store": "0.11.2",
|
|
83
83
|
"@tanstack/store": "0.11.2",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"vitest": "5.0.4"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
|
-
"@agimon-ai/po-native-components": "0.0.0-alpha.
|
|
96
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.194",
|
|
97
97
|
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
98
98
|
"react-native": "0.88.1",
|
|
99
99
|
"react-native-unistyles": "^3.5.3"
|