@agimon-ai/po-computer-use 0.0.0-alpha.51 → 0.0.0-alpha.52

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.
@@ -1,7 +1,7 @@
1
1
  import { createApiClient, defineActivityGroup, defineChannelFile, defineFill, defineNativePlugin, defineSessionStore, nativeApiTransport, sessionApiAddress } from "@agimon-ai/po-core/native";
2
2
  import { View } from "react-native-unistyles/components/native/View";
3
3
  import { Text } from "react-native-unistyles/components/native/Text";
4
- import { Button, fontOf } from "@agimon-ai/po-native-components";
4
+ import { Button, CheckIcon, fontOf } from "@agimon-ai/po-native-components";
5
5
  import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from "react";
6
6
  import { StyleSheet } from "react-native-unistyles";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -197,17 +197,31 @@ createApiClient(routes, {
197
197
  });
198
198
  //#endregion
199
199
  //#region src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.native.tsx
200
+ function remaining(ms) {
201
+ const seconds = Math.max(0, Math.ceil(ms / 1e3));
202
+ return `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")} left`;
203
+ }
200
204
  function ComputerUseView({ state, busy = false, error, submitting = false, onActivate, onCancel, onStop }) {
201
205
  const pending = state.phase === "awaiting_confirmation" || state.phase === "activating";
202
206
  const active = state.phase === "active" || state.phase === "stopping";
203
207
  const failure = error ?? state.failure?.message;
208
+ const expiresAt = state.phase === "active" ? state.expiresAt : void 0;
209
+ const [now, setNow] = useState(Date.now);
210
+ useEffect(() => {
211
+ if (expiresAt === void 0) return;
212
+ const timer = setInterval(() => setNow(Date.now()), 1e3);
213
+ return () => clearInterval(timer);
214
+ }, [expiresAt]);
215
+ const left = expiresAt === void 0 ? void 0 : expiresAt - now;
216
+ const total = state.durationMs ?? 3e5;
217
+ const controlled = state.target?.scope === "desktop" ? "your whole desktop" : typeof state.target?.applicationName === "string" ? state.target.applicationName : "the chosen window";
204
218
  return /* @__PURE__ */ jsxs(View, {
205
219
  style: styles.panel,
206
220
  children: [
207
221
  /* @__PURE__ */ jsx(Text, {
208
- style: styles.detail,
209
- accessibilityLiveRegion: "polite",
210
- children: state.phase.replaceAll("_", " ")
222
+ style: styles.title,
223
+ accessibilityRole: "header",
224
+ children: "Computer use"
211
225
  }),
212
226
  busy ? /* @__PURE__ */ jsx(Text, {
213
227
  style: styles.detail,
@@ -218,14 +232,31 @@ function ComputerUseView({ state, busy = false, error, submitting = false, onAct
218
232
  accessibilityRole: "alert",
219
233
  children: failure
220
234
  }) : null,
235
+ state.artifact?.status === "ready" ? /* @__PURE__ */ jsxs(View, {
236
+ style: styles.row,
237
+ children: [/* @__PURE__ */ jsx(View, {
238
+ style: styles.check,
239
+ children: /* @__PURE__ */ jsx(CheckIcon, {
240
+ size: 12,
241
+ color: "rail"
242
+ })
243
+ }), /* @__PURE__ */ jsx(Text, {
244
+ style: styles.text,
245
+ children: "Recording saved to session artifacts."
246
+ })]
247
+ }) : null,
248
+ state.artifact?.failure ? /* @__PURE__ */ jsx(Text, {
249
+ style: styles.error,
250
+ children: state.artifact.failure.message
251
+ }) : null,
221
252
  pending ? /* @__PURE__ */ jsxs(Fragment, { children: [
222
253
  /* @__PURE__ */ jsx(Text, {
223
254
  style: styles.text,
224
- children: "Desktop activation is pending."
255
+ children: "Waiting for you on your Mac."
225
256
  }),
226
257
  /* @__PURE__ */ jsx(Text, {
227
258
  style: styles.detail,
228
- children: "Choose the whole desktop or one window on your Mac, then confirm."
259
+ children: "Choose the whole desktop or one window, then confirm."
229
260
  }),
230
261
  /* @__PURE__ */ jsx(Button, {
231
262
  variant: "outline",
@@ -233,17 +264,41 @@ function ComputerUseView({ state, busy = false, error, submitting = false, onAct
233
264
  onPress: onCancel,
234
265
  children: "Cancel activation"
235
266
  })
236
- ] }) : active ? /* @__PURE__ */ jsxs(Fragment, { children: [state.target ? /* @__PURE__ */ jsx(Text, {
237
- style: styles.text,
238
- children: state.target.scope === "desktop" ? "Whole desktop" : `${typeof state.target.applicationName === "string" ? state.target.applicationName : "Application"}: ${typeof state.target.windowTitle === "string" ? state.target.windowTitle : "Window"}`
239
- }) : null, /* @__PURE__ */ jsx(Button, {
240
- variant: "outline",
241
- disabled: submitting || state.phase === "stopping",
242
- onPress: onStop,
243
- children: "Stop computer use"
244
- })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Text, {
267
+ ] }) : active ? /* @__PURE__ */ jsxs(Fragment, { children: [
268
+ /* @__PURE__ */ jsxs(View, {
269
+ style: styles.row,
270
+ accessibilityLiveRegion: "polite",
271
+ children: [/* @__PURE__ */ jsx(View, { style: styles.dot }), /* @__PURE__ */ jsx(Text, {
272
+ style: styles.live,
273
+ children: state.phase === "stopping" ? "Po is handing control back" : `Po is controlling ${controlled}`
274
+ })]
275
+ }),
276
+ left === void 0 ? null : /* @__PURE__ */ jsxs(View, {
277
+ style: styles.row,
278
+ children: [/* @__PURE__ */ jsx(View, {
279
+ style: styles.track,
280
+ accessibilityRole: "progressbar",
281
+ accessibilityLabel: "Time left",
282
+ accessibilityValue: {
283
+ min: 0,
284
+ max: total,
285
+ now: Math.max(0, left)
286
+ },
287
+ children: /* @__PURE__ */ jsx(View, { style: [styles.fill, { width: `${Math.min(100, Math.max(0, left / total * 100))}%` }] })
288
+ }), /* @__PURE__ */ jsx(Text, {
289
+ style: styles.detail,
290
+ children: remaining(left)
291
+ })]
292
+ }),
293
+ /* @__PURE__ */ jsx(Button, {
294
+ variant: "outline",
295
+ disabled: submitting || state.phase === "stopping",
296
+ onPress: onStop,
297
+ children: "Stop computer use"
298
+ })
299
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Text, {
245
300
  style: styles.detail,
246
- children: "Request 5 minutes of control. Your Mac asks you to choose the whole desktop or one window, and confirm."
301
+ children: "Po asks before it takes control. Choose the whole desktop or one window on your Mac. You can stop at any time."
247
302
  }), /* @__PURE__ */ jsx(Button, {
248
303
  variant: "primary",
249
304
  disabled: busy || submitting,
@@ -339,6 +394,59 @@ const styles = StyleSheet.create((theme) => ({
339
394
  gap: theme.spacing(3),
340
395
  uni__dependencies: [0]
341
396
  },
397
+ title: {
398
+ fontFamily: fontOf(theme.fontFamily.sans),
399
+ fontSize: theme.fontSize.base,
400
+ fontWeight: "600",
401
+ color: theme.colors.hi,
402
+ paddingBottom: theme.spacing(2),
403
+ borderBottomWidth: 1,
404
+ borderBottomColor: theme.colors["border-soft"],
405
+ uni__dependencies: [0]
406
+ },
407
+ row: {
408
+ flexDirection: "row",
409
+ alignItems: "center",
410
+ gap: theme.spacing(2),
411
+ uni__dependencies: [0]
412
+ },
413
+ dot: {
414
+ width: 8,
415
+ height: 8,
416
+ borderRadius: 4,
417
+ backgroundColor: theme.colors.green,
418
+ uni__dependencies: [0]
419
+ },
420
+ live: {
421
+ fontFamily: fontOf(theme.fontFamily.sans),
422
+ fontSize: theme.fontSize.base,
423
+ lineHeight: theme.lineHeightRelaxed.base,
424
+ color: theme.colors.green,
425
+ uni__dependencies: [0]
426
+ },
427
+ track: {
428
+ flex: 1,
429
+ height: 6,
430
+ borderRadius: 3,
431
+ overflow: "hidden",
432
+ backgroundColor: theme.colors["border-soft"],
433
+ uni__dependencies: [0]
434
+ },
435
+ fill: {
436
+ height: "100%",
437
+ borderRadius: 3,
438
+ backgroundColor: theme.colors.green,
439
+ uni__dependencies: [0]
440
+ },
441
+ check: {
442
+ width: 20,
443
+ height: 20,
444
+ borderRadius: 10,
445
+ alignItems: "center",
446
+ justifyContent: "center",
447
+ backgroundColor: theme.colors.green,
448
+ uni__dependencies: [0]
449
+ },
342
450
  text: {
343
451
  fontFamily: fontOf(theme.fontFamily.sans),
344
452
  fontSize: theme.fontSize.base,
@@ -1 +1 @@
1
- {"version":3,"file":"native.mjs","names":["computerUse","WebPluginSlotProps","Button","fontOf","PoNativeTheme","useCallback","useEffect","useRef","useState","useSyncExternalStore","StyleSheet","computerUse","api","COMPUTER_USE_DEFAULT_DURATION_MS","computerUseChannelType","ComputerUseSessionView","updateComputerUseState","ComputerUseView","state","busy","error","submitting","onActivate","onCancel","onStop","pending","phase","active","failure","message","styles","panel","detail","replaceAll","text","target","scope","applicationName","windowTitle","SessionPanel","sessionId","sendSessionFrame","subscribe","listener","subscription","store","unsubscribe","session","select","setError","setSubmitting","requests","AbortController","controller","current","timer","ReturnType","setTimeout","type","payload","action","poll","result","activationState","signal","ok","aborted","data","abort","clearTimeout","submit","undefined","client","activate","body","durationMs","cancelActivation","status","ComputerUsePanel","props","create","theme","gap","spacing","uni__dependencies","fontFamily","sans","fontSize","base","lineHeight","lineHeightRelaxed","color","colors","sm","dim","red","computerUse","api","activityGroupComputerUse","channelComputerUse","fillComputerUse"],"sources":["../../src/types/computerUseApi.ts","../../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/types/apiRoutes.ts","../../generated/client.native.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.native.tsx","../../generated/native.ts"],"sourcesContent":["import type { PoApiCaller } from '@agimon-ai/po-core/packageApi';\n\nexport 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;\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 activate: '/activate',\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} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\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 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 readonly caller: PoApiCaller;\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 = { readonly action: 'status' | 'targets' | 'stop' | 'artifacts' };\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 { 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 * Activation, status, cancellation and recording reads are reachable from a browser. 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 */\nconst routes = {\n artifact: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.artifact,\n query: ['artifactId', 'offset'],\n raw: true,\n },\n activationState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n cancelActivation: {\n method: 'DELETE',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n activate: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\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<{ readonly grantId: string; readonly expiresAt?: number } | 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 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\nexport default routes;\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { createApiClient, nativeApiTransport, sessionApiAddress } from '@agimon-ai/po-core/native';\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: nativeApiTransport,\n sessionAddress: sessionApiAddress,\n});\n\n/** Scopes the tree mounts 'desktop-permissions' at for the desktop-permissions mount. */\nexport const desktopPermissionsScopes = ['global', 'workspace', 'session'] as const;\n\nexport const desktopPermissions = createApiClient(routes, {\n scopes: desktopPermissionsScopes,\n basePath: 'desktop-permissions',\n transport: nativeApiTransport,\n sessionAddress: sessionApiAddress,\n});\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport { Button, fontOf } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { computerUse as api } from '../../../../../../../generated/client.native';\nimport { COMPUTER_USE_DEFAULT_DURATION_MS, computerUseChannelType } from '../../../../../../types/computerUseApi';\nimport type { ComputerUseSessionView } from '../../../../../../types/computerUseApi';\nimport { computerUse, updateComputerUseState } from '../../_lib/computerUseStore.native';\n\nexport function ComputerUseView({\n state,\n busy = false,\n error,\n submitting = false,\n onActivate,\n onCancel,\n onStop,\n}: {\n state: ComputerUseSessionView;\n busy?: boolean;\n error?: string;\n submitting?: boolean;\n onActivate: () => void;\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 return (\n <View style={styles.panel}>\n <Text style={styles.detail} accessibilityLiveRegion=\"polite\">\n {state.phase.replaceAll('_', ' ')}\n </Text>\n {busy ? <Text style={styles.detail}>Computer use is busy in another session.</Text> : null}\n {failure ? (\n <Text style={styles.error} accessibilityRole=\"alert\">\n {failure}\n </Text>\n ) : null}\n {pending ? (\n <>\n <Text style={styles.text}>Desktop activation is pending.</Text>\n <Text style={styles.detail}>Choose the whole desktop or one window on your Mac, then confirm.</Text>\n <Button variant=\"outline\" disabled={submitting} onPress={onCancel}>\n Cancel activation\n </Button>\n </>\n ) : active ? (\n <>\n {state.target ? (\n <Text style={styles.text}>\n {state.target.scope === 'desktop'\n ? 'Whole desktop'\n : `${typeof state.target.applicationName === 'string' ? state.target.applicationName : 'Application'}: ${typeof state.target.windowTitle === 'string' ? state.target.windowTitle : 'Window'}`}\n </Text>\n ) : null}\n <Button variant=\"outline\" disabled={submitting || state.phase === 'stopping'} onPress={onStop}>\n Stop computer use\n </Button>\n </>\n ) : (\n <>\n <Text style={styles.detail}>\n Request 5 minutes of control. Your Mac asks you to choose the whole desktop or one window, and confirm.\n </Text>\n <Button variant=\"primary\" disabled={busy || submitting} onPress={onActivate}>\n Choose on Mac\n </Button>\n </>\n )}\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 const [submitting, setSubmitting] = useState(false);\n const requests = useRef<AbortController | null>(null);\n\n useEffect(() => {\n const controller = new AbortController();\n requests.current = controller;\n let timer: ReturnType<typeof setTimeout> | undefined;\n sendSessionFrame(sessionId, { type: computerUseChannelType, payload: { action: 'status' } });\n const poll = async () => {\n try {\n const result = await api.session(sessionId).activationState({ signal: controller.signal });\n if (result.ok && !controller.signal.aborted) updateComputerUseState(sessionId, result.data);\n } catch {\n if (!controller.signal.aborted) setError('The session is unreachable.');\n }\n if (!controller.signal.aborted) timer = setTimeout(() => void poll(), 2000);\n };\n void poll();\n return () => {\n controller.abort();\n clearTimeout(timer);\n };\n }, [sessionId, sendSessionFrame]);\n\n const submit = async (action: 'activate' | 'cancel') => {\n const signal = requests.current?.signal;\n if (!signal || signal.aborted || submitting) return;\n setError(undefined);\n setSubmitting(true);\n try {\n const client = api.session(sessionId);\n const result =\n action === 'activate'\n ? await client.activate({ body: { durationMs: COMPUTER_USE_DEFAULT_DURATION_MS }, signal })\n : await client.cancelActivation({ signal });\n if (signal.aborted) return;\n if (result.ok) updateComputerUseState(sessionId, result.data);\n else\n setError(\n result.status === 0 ? 'The session is unreachable.' : result.error || 'The activation request failed.',\n );\n } catch {\n if (!signal.aborted) setError('The activation request is unavailable.');\n } finally {\n if (!signal.aborted) setSubmitting(false);\n }\n };\n\n return (\n <ComputerUseView\n state={session.state}\n busy={session.busy}\n error={error}\n submitting={submitting}\n onActivate={() => void submit('activate')}\n onCancel={() => void submit('cancel')}\n onStop={() => {\n setError(undefined);\n try {\n sendSessionFrame(sessionId, { type: computerUseChannelType, payload: { action: 'stop' } });\n } catch {\n setError('The stop request is unavailable.');\n }\n }}\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 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({ id: 'computer-use', slot: 'activity.computer-use', component: ComputerUsePanel });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\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';\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 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 },\n});\n"],"mappings":";;;;;;;;AAGA,MAAa,yBAAyB;AAEtC,MAAa,0BAA0B;AAGvC,MAAa,mCAAmC;;;;;;;;AAUhD,MAAa,sBAAsB;CACjC,UAAU;CACV,UAAU;CACV,YAAY;CACZ,cAAc;CACd,aAAa;CACb,WAAW;CACX,UAAU;CACV,eAAe;CACf,kBAAkB;CAClB,SAAS;CACT,aAAa;CACb,SAAS;AACX;;;;AC1BA,IAAA,gCAAe,oBAAoB;CACjC,MAAM;CACN,MAAM;CACN,OAAO;CACP,WAAW;CACX,eAAe;CACf,qBAAqB;AACvB,CAAC;ACAD,MAAaA,gBAAc,mBAAuC;CAJhE,OAAO;EAAE,WAAW;EAAI,UAAU;EAAG,MAAM;EAAG,OAAO;CAAW;CAChE,SAAS,CAAC;AAGsD,CAAY;;AAG9E,SAAgB,uBAAuB,WAAmB,OAA+B;CACvF,cAAY,OAAO,YAAY,YAC7B,QAAQ,MAAM,cAAc,MAAM,MAAM,WAAW,QAAQ,MAAM,WAAW;EAAE,GAAG;EAAS;CAAM,IAAI,OACtG;AACF;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,MAAa,qBAAqBA,cAAY,QAAmC;CAC/E,SAAS;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E;;;AClLF,IAAA,mDAAe,WAAW;CAAE,IAAI;CAAgB,MAAM;CAAyB,WAAW;AAAiB,CAAC;;;ACG5G,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,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;CACvI;AACF,CAAC"}
1
+ {"version":3,"file":"native.mjs","names":["computerUse","WebPluginSlotProps","Button","CheckIcon","fontOf","PoNativeTheme","useCallback","useEffect","useRef","useState","useSyncExternalStore","StyleSheet","computerUse","api","COMPUTER_USE_DEFAULT_DURATION_MS","computerUseChannelType","ComputerUseSessionView","updateComputerUseState","remaining","ms","seconds","Math","max","ceil","floor","String","padStart","ComputerUseView","state","busy","error","submitting","onActivate","onCancel","onStop","pending","phase","active","failure","message","expiresAt","undefined","now","setNow","Date","timer","setInterval","clearInterval","left","total","durationMs","controlled","target","scope","applicationName","styles","panel","title","detail","artifact","status","row","check","text","dot","live","track","min","fill","width","SessionPanel","sessionId","sendSessionFrame","subscribe","listener","subscription","store","unsubscribe","session","select","setError","setSubmitting","requests","AbortController","controller","current","ReturnType","setTimeout","type","payload","action","poll","result","activationState","signal","ok","aborted","data","abort","clearTimeout","submit","client","activate","body","cancelActivation","ComputerUsePanel","props","create","theme","gap","spacing","uni__dependencies","fontFamily","sans","fontSize","base","fontWeight","color","colors","hi","paddingBottom","borderBottomWidth","borderBottomColor","flexDirection","alignItems","height","borderRadius","backgroundColor","green","lineHeight","lineHeightRelaxed","flex","overflow","justifyContent","sm","dim","red","computerUse","api","activityGroupComputerUse","channelComputerUse","fillComputerUse"],"sources":["../../src/types/computerUseApi.ts","../../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/types/apiRoutes.ts","../../generated/client.native.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/ComputerUsePanel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/ComputerUse.activity.computer-use.native.tsx","../../generated/native.ts"],"sourcesContent":["import type { PoApiCaller } from '@agimon-ai/po-core/packageApi';\n\nexport 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;\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 activate: '/activate',\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} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\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 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 readonly caller: PoApiCaller;\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 = { readonly action: 'status' | 'targets' | 'stop' | 'artifacts' };\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 { 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 * Activation, status, cancellation and recording reads are reachable from a browser. 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 */\nconst routes = {\n artifact: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.artifact,\n query: ['artifactId', 'offset'],\n raw: true,\n },\n activationState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n cancelActivation: {\n method: 'DELETE',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n activate: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\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<{ readonly grantId: string; readonly expiresAt?: number } | 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 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\nexport default routes;\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { createApiClient, nativeApiTransport, sessionApiAddress } from '@agimon-ai/po-core/native';\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: nativeApiTransport,\n sessionAddress: sessionApiAddress,\n});\n\n/** Scopes the tree mounts 'desktop-permissions' at for the desktop-permissions mount. */\nexport const desktopPermissionsScopes = ['global', 'workspace', 'session'] as const;\n\nexport const desktopPermissions = createApiClient(routes, {\n scopes: desktopPermissionsScopes,\n basePath: 'desktop-permissions',\n transport: nativeApiTransport,\n sessionAddress: sessionApiAddress,\n});\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, useRef, useState, useSyncExternalStore } from 'react';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { computerUse as api } from '../../../../../../../generated/client.native';\nimport { COMPUTER_USE_DEFAULT_DURATION_MS, computerUseChannelType } from '../../../../../../types/computerUseApi';\nimport type { ComputerUseSessionView } from '../../../../../../types/computerUseApi';\nimport { computerUse, updateComputerUseState } 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}\nexport function ComputerUseView({\n state,\n busy = false,\n error,\n submitting = false,\n onActivate,\n onCancel,\n onStop,\n}: {\n state: ComputerUseSessionView;\n busy?: boolean;\n error?: string;\n submitting?: boolean;\n onActivate: () => void;\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 return (\n <View style={styles.panel}>\n <Text style={styles.title} accessibilityRole=\"header\">\n Computer use\n </Text>\n {busy ? <Text style={styles.detail}>Computer use is busy in another session.</Text> : null}\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 saved to session artifacts.</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}>Waiting for you on your Mac.</Text>\n <Text style={styles.detail}>Choose the whole desktop or one window, then confirm.</Text>\n <Button variant=\"outline\" disabled={submitting} 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={{ min: 0, max: total, now: Math.max(0, left) }}\n >\n <View style={[styles.fill, { width: `${Math.min(100, Math.max(0, (left / total) * 100))}%` }]} />\n </View>\n <Text style={styles.detail}>{remaining(left)}</Text>\n </View>\n )}\n <Button variant=\"outline\" disabled={submitting || state.phase === 'stopping'} onPress={onStop}>\n Stop computer use\n </Button>\n </>\n ) : (\n <>\n <Text style={styles.detail}>\n Po asks before it takes control. Choose the whole desktop or one window on your Mac. You can stop at any\n time.\n </Text>\n <Button variant=\"primary\" disabled={busy || submitting} onPress={onActivate}>\n Choose on Mac\n </Button>\n </>\n )}\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 const [submitting, setSubmitting] = useState(false);\n const requests = useRef<AbortController | null>(null);\n\n useEffect(() => {\n const controller = new AbortController();\n requests.current = controller;\n let timer: ReturnType<typeof setTimeout> | undefined;\n sendSessionFrame(sessionId, { type: computerUseChannelType, payload: { action: 'status' } });\n const poll = async () => {\n try {\n const result = await api.session(sessionId).activationState({ signal: controller.signal });\n if (result.ok && !controller.signal.aborted) updateComputerUseState(sessionId, result.data);\n } catch {\n if (!controller.signal.aborted) setError('The session is unreachable.');\n }\n if (!controller.signal.aborted) timer = setTimeout(() => void poll(), 2000);\n };\n void poll();\n return () => {\n controller.abort();\n clearTimeout(timer);\n };\n }, [sessionId, sendSessionFrame]);\n\n const submit = async (action: 'activate' | 'cancel') => {\n const signal = requests.current?.signal;\n if (!signal || signal.aborted || submitting) return;\n setError(undefined);\n setSubmitting(true);\n try {\n const client = api.session(sessionId);\n const result =\n action === 'activate'\n ? await client.activate({ body: { durationMs: COMPUTER_USE_DEFAULT_DURATION_MS }, signal })\n : await client.cancelActivation({ signal });\n if (signal.aborted) return;\n if (result.ok) updateComputerUseState(sessionId, result.data);\n else\n setError(\n result.status === 0 ? 'The session is unreachable.' : result.error || 'The activation request failed.',\n );\n } catch {\n if (!signal.aborted) setError('The activation request is unavailable.');\n } finally {\n if (!signal.aborted) setSubmitting(false);\n }\n };\n\n return (\n <ComputerUseView\n state={session.state}\n busy={session.busy}\n error={error}\n submitting={submitting}\n onActivate={() => void submit('activate')}\n onCancel={() => void submit('cancel')}\n onStop={() => {\n setError(undefined);\n try {\n sendSessionFrame(sessionId, { type: computerUseChannelType, payload: { action: 'stop' } });\n } catch {\n setError('The stop request is unavailable.');\n }\n }}\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 title: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n fontWeight: '600',\n color: theme.colors.hi,\n paddingBottom: theme.spacing(2),\n borderBottomWidth: 1,\n borderBottomColor: theme.colors['border-soft'],\n },\n row: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2) },\n dot: { width: 8, height: 8, borderRadius: 4, backgroundColor: theme.colors.green },\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: { flex: 1, height: 6, borderRadius: 3, overflow: 'hidden', backgroundColor: theme.colors['border-soft'] },\n fill: { height: '100%', borderRadius: 3, backgroundColor: theme.colors.green },\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({ id: 'computer-use', slot: 'activity.computer-use', component: ComputerUsePanel });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\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';\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 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 },\n});\n"],"mappings":";;;;;;;;AAGA,MAAa,yBAAyB;AAEtC,MAAa,0BAA0B;AAGvC,MAAa,mCAAmC;;;;;;;;AAUhD,MAAa,sBAAsB;CACjC,UAAU;CACV,UAAU;CACV,YAAY;CACZ,cAAc;CACd,aAAa;CACb,WAAW;CACX,UAAU;CACV,eAAe;CACf,kBAAkB;CAClB,SAAS;CACT,aAAa;CACb,SAAS;AACX;;;;AC1BA,IAAA,gCAAe,oBAAoB;CACjC,MAAM;CACN,MAAM;CACN,OAAO;CACP,WAAW;CACX,eAAe;CACf,qBAAqB;AACvB,CAAC;ACAD,MAAaA,gBAAc,mBAAuC;CAJhE,OAAO;EAAE,WAAW;EAAI,UAAU;EAAG,MAAM;EAAG,OAAO;CAAW;CAChE,SAAS,CAAC;AAGsD,CAAY;;AAG9E,SAAgB,uBAAuB,WAAmB,OAA+B;CACvF,cAAY,OAAO,YAAY,YAC7B,QAAQ,MAAM,cAAc,MAAM,MAAM,WAAW,QAAQ,MAAM,WAAW;EAAE,GAAG;EAAS;CAAM,IAAI,OACtG;AACF;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,MAAa,qBAAqBA,cAAY,QAAmC;CAC/E,SAAS;CACT,MAAM,OAAO;EACX,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,MAAM,KAAK,KAAK,CAAC,MAAM,QAAQ,MAAM,OAAO,GAAG,OAAO;EACxF,IAAI,OAAO,MAAM,MAAM,UAAU,YAAY,OAAO,MAAM,MAAM,aAAa,UAAU,OAAO;EAC9F,OAAO;CACT;CACA,SAAS,UAAU,YAAY;AACjC,CAAC;;;AC7BD,IAAA,8BAAe,kBAAkB,k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;;ACG5G,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,SAAS;EACP,IAAI,iBAA2D;GAAE,OAAO,CAAC,IAAI,EAAE,MAAM,eAAe,GAAG4B,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;CACvI;AACF,CAAC"}
@@ -26,6 +26,57 @@ var computer_use_web_default$3 = defineSettingsSection({
26
26
  icon: MonitorIcon
27
27
  });
28
28
  //#endregion
29
+ //#region src/extensions/(frontend)/setting/desktop-environment.web.ts
30
+ var desktop_environment_web_default = defineSettingsSection({
31
+ id: "desktop-environment",
32
+ desktopOnly: true,
33
+ label: "desktop environment",
34
+ detail: "choose which login-shell variables Po Desktop passes to agents",
35
+ order: 46,
36
+ groups: [{
37
+ id: "shell",
38
+ label: "login shell",
39
+ detail: "Po Desktop reads your login shell once at start. Changes apply the next time Po Desktop starts. Core variables and PO_ settings always pass."
40
+ }],
41
+ fields: [
42
+ {
43
+ id: "inherit",
44
+ label: "variables to pass",
45
+ kind: "select",
46
+ keyPath: ["desktopEnvironment", "inherit"],
47
+ group: "shell",
48
+ presentation: "cards",
49
+ defaultValue: "all",
50
+ options: [{
51
+ value: "all",
52
+ label: "everything",
53
+ detail: "Every exported variable, including API keys, minus exclusions."
54
+ }, {
55
+ value: "core",
56
+ label: "core only",
57
+ detail: "HOME, PATH, USER and similar. Add others under desktopEnvironment.set in ~/.po/config.yaml."
58
+ }]
59
+ },
60
+ {
61
+ id: "exclude",
62
+ label: "excluded",
63
+ kind: "info",
64
+ keyPath: ["desktopEnvironment", "exclude"],
65
+ group: "shell",
66
+ detail: "Name patterns kept out, such as *_TOKEN. Edit desktopEnvironment.exclude in ~/.po/config.yaml."
67
+ },
68
+ {
69
+ id: "include-only",
70
+ label: "only these",
71
+ kind: "info",
72
+ keyPath: ["desktopEnvironment", "includeOnly"],
73
+ group: "shell",
74
+ detail: "When set, only matching names pass. Edit desktopEnvironment.includeOnly in ~/.po/config.yaml."
75
+ }
76
+ ],
77
+ icon: ShieldIcon
78
+ });
79
+ //#endregion
29
80
  //#region src/types/computerUseApi.ts
30
81
  const computerUseChannelType = "computer_use_state";
31
82
  const COMPUTER_USE_MODE_ID = "computer-use";
@@ -926,7 +977,7 @@ const webPlugin = defineWebPlugin({
926
977
  return [via({ id: "desktop-permissions" }, desktop_permissions_panel_web_default)];
927
978
  },
928
979
  get settingsSections() {
929
- return [via({ id: "computer-use" }, computer_use_web_default$3)];
980
+ return [via({ id: "computer-use" }, computer_use_web_default$3), via({ id: "desktop-environment" }, desktop_environment_web_default)];
930
981
  }
931
982
  },
932
983
  workspace: { get settingsSections() {
@@ -1 +1 @@
1
- {"version":3,"file":"web.mjs","names":["legacy","computerUse","api","legacy","api","legacy","legacy","legacy","legacy","legacy","legacy","legacy","settingDesktopPermissions","settingComputerUse","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/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/computerActionToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerExecToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerStateToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.tsx","../../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 minor 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['global']>;\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({ ...legacy.settingsSections![0]!, icon: MonitorIcon });\n","import type { PoApiCaller } from '@agimon-ai/po-core/packageApi';\n\nexport 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;\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 activate: '/activate',\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} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\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 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 readonly caller: PoApiCaller;\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 = { readonly action: 'status' | 'targets' | 'stop' | 'artifacts' };\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 * Activation, status, cancellation and recording reads are reachable from a browser. 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 */\nconst routes = {\n artifact: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.artifact,\n query: ['artifactId', 'offset'],\n raw: true,\n },\n activationState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n cancelActivation: {\n method: 'DELETE',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n activate: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\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<{ readonly grantId: string; readonly expiresAt?: number } | 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 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\nexport default routes;\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 = ['global', '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 | { status: 'ready'; states: DesktopPermissionStates; asking?: DesktopPermission }\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 { status: 'error', error: error instanceof Error ? error.message : String(error) };\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>({ status: 'loading' });\n\n const load = useCallback(async () => {\n setState(await viewStateOf(request(api.global.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.global.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({ ...legacy.settingsSections![0]!, icon: MonitorIcon });\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 { computerUse as api } from '../../../../../../../generated/client';\nimport { COMPUTER_USE_DEFAULT_DURATION_MS, computerUseChannelType } from '../../../../../../types/computerUseApi';\nimport { computerUse } from '../../_lib/computerUseStore';\n\nconst DESKTOP_TARGET: Record<string, unknown> = Object.freeze({ scope: 'desktop' });\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({ sessionId, sendSessionFrame }: WebPluginSlotProps) {\n const session = useStore(computerUse.store, (state) => computerUse.select(state, sessionId));\n const [selected, setSelected] = useState(0);\n const [confirmationTarget, setConfirmationTarget] = useState<Record<string, unknown>>();\n const [error, setError] = useState<string>();\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, { type: computerUseChannelType, payload: { action: 'status' } });\n sendSessionFrame(sessionId, { type: computerUseChannelType, payload: { action: 'targets' } });\n }, [sendSessionFrame, sessionId]);\n\n useEffect(() => {\n if (sessionId === null) return;\n const controller = new AbortController();\n let timer: ReturnType<typeof setTimeout> | undefined;\n const poll = async () => {\n // A closed session or standalone story may have no API address (thrown synchronously by `session`):\n // keep the last state and retry next poll.\n const result = await Promise.resolve()\n .then(() => api.session(sessionId).activationState({ signal: controller.signal }))\n .catch(() => null);\n if (controller.signal.aborted) return;\n if (result?.ok) {\n computerUse.update(sessionId, (current) =>\n result.data.revision >= current.state.revision ? { ...current, state: result.data } : current,\n );\n }\n if (!controller.signal.aborted) timer = setTimeout(() => void poll(), 2000);\n };\n void poll();\n return () => {\n controller.abort();\n clearTimeout(timer);\n };\n }, [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 // The whole desktop comes first; without a window list the Mac itself offers the choice.\n const choices: { label: string; target?: Record<string, unknown> }[] = [\n { label: 'Whole desktop', target: DESKTOP_TARGET },\n ...(session.targets.length === 0\n ? [{ label: 'Choose window on Mac' }]\n : session.targets.map((item) => ({\n label: text(item.applicationName, text(item.windowTitle, text(item.windowId, 'Window'))),\n target: item,\n }))),\n ];\n const target = (choices[selected] ?? choices[0]!).target;\n const desktopConfirmation = confirmationTarget?.scope === 'desktop';\n const artifact = state.artifact;\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 const confirm = async (chosenTarget = confirmationTarget) => {\n setError(undefined);\n try {\n // Through the generated client, which carries the sealed transport: this\n // request names an application window a reader just agreed to hand over,\n // and the global fetch it used to call handed that to a remote session's\n // relay in the clear.\n const result = await api.session(sessionId).activate({\n body: {\n ...(chosenTarget === undefined ? {} : { target: chosenTarget }),\n durationMs: COMPUTER_USE_DEFAULT_DURATION_MS,\n },\n });\n if (!result.ok) {\n // `status: 0` is the one case nothing answered at all, which the old\n // bare fetch reported by rejecting into nobody's handler.\n if (result.status === 0) setError('The session is unreachable.');\n else setError(result.error === '' ? `Activation failed with HTTP ${result.status}.` : result.error);\n return;\n }\n setConfirmationTarget(undefined);\n computerUse.update(sessionId, (current) => ({ ...current, state: result.data }));\n send({ action: 'status' });\n } catch {\n setError('The activation request is unavailable.');\n }\n };\n\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 {state.phase === 'inactive' || state.phase === 'failed' ? (\n <Button size=\"sm\" type=\"button\" variant=\"ghost\" onClick={() => send({ action: 'targets' })}>\n Refresh targets\n </Button>\n ) : null}\n </header>\n {session.busy ? (\n <p className=\"rounded border border-po-yellow px-2 py-1\">Computer use is busy in another session</p>\n ) : null}\n {state.failure ? <p className=\"text-po-red\">{state.failure.message}</p> : null}\n {error ? <p className=\"text-po-red\">{error}</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 saved to session artifacts.\n </p>\n ) : null}\n {artifact?.failure ? <p className=\"text-po-red\">{artifact.failure.message}</p> : null}\n\n {(state.phase === 'inactive' || state.phase === 'failed') && confirmationTarget === undefined ? (\n <div className=\"flex flex-col gap-2\">\n <label htmlFor=\"computer-use-target\" className=\"text-po-dim\">\n What Po may control\n </label>\n <select\n id=\"computer-use-target\"\n value={selected}\n onChange={(event) => setSelected(Number(event.target.value))}\n className=\"min-h-7 rounded border border-po-border bg-po-panel px-2 py-1\"\n >\n {choices.map((choice, index) => (\n <option key={`${index}:${choice.label}`} value={index}>\n {choice.label}\n </option>\n ))}\n </select>\n <p className=\"text-sm text-po-dim\">Po asks before it takes control. You can stop at any time.</p>\n <Button\n size=\"sm\"\n type=\"button\"\n disabled={Boolean(session.busy)}\n variant=\"primary\"\n onClick={() => {\n if (target === undefined) void confirm();\n else setConfirmationTarget(Object.freeze({ ...target }));\n }}\n >\n {target === undefined ? 'Choose window on Mac' : 'Request activation'}\n </Button>\n </div>\n ) : null}\n\n {confirmationTarget !== undefined ? (\n <div className=\"rounded border border-po-blue p-3\">\n <strong>Confirm computer control</strong>\n <p className=\"my-2 text-po-text\">\n {desktopConfirmation\n ? 'Your whole desktop'\n : `${text(confirmationTarget.applicationName, 'Application')}: ${text(confirmationTarget.windowTitle, text(confirmationTarget.windowId, 'Window'))}`}\n </p>\n <p className=\"my-2 text-po-dim\">\n {desktopConfirmation\n ? \"Confirm a 5 minute session for every app on your main display. Po's own windows stay out of reach.\"\n : 'Confirm a 5 minute session for this exact application window.'}\n </p>\n <div className=\"flex gap-2\">\n <Button size=\"sm\" type=\"button\" variant=\"primary\" onClick={() => void confirm()}>\n Confirm\n </Button>\n <Button\n size=\"sm\"\n type=\"button\"\n className=\"min-h-7 rounded border border-po-border bg-po-panel px-2 py-1\"\n onClick={() => setConfirmationTarget(undefined)}\n >\n Cancel\n </Button>\n </div>\n </div>\n ) : null}\n\n {state.phase === 'awaiting_confirmation' || state.phase === 'activating' ? (\n <div>\n <p>Desktop activation is pending.</p>\n <Button\n size=\"sm\"\n type=\"button\"\n onClick={() => {\n void (async () => {\n try {\n const result = await api.session(sessionId).cancelActivation();\n if (!result.ok) setError('The activation could not be cancelled.');\n else computerUse.update(sessionId, (current) => ({ ...current, state: result.data }));\n } catch {\n setError('The activation could not be cancelled.');\n }\n })();\n }}\n >\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={{ width: `${Math.min(100, Math.max(0, (left / total) * 100))}%` }}\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","import { type ToolResultView, toolResultTextLines } from '@agimon-ai/po-core/web';\nimport type { MessageLine } from '@agimon-ai/po-web-components';\n\nexport const computerActionToolName = 'computer_action' as const;\nexport const computerActionCollapsedLines = 8;\n\nexport function computerActionCallSummary(args: Readonly<Record<string, unknown>>): 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).join(' ');\n}\n\n/**\n * The body as toned lines: what the result's details say, or its text. Pure,\n * so a unit test can pin it without a DOM; the item decides how many to show.\n */\nexport function computerActionResultLines(result: ToolResultView | null): MessageLine[] {\n if (result === null) return [];\n return toolResultTextLines(result.content).map((text) => ({ text, tone: 'dim' }));\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\n// @scaffold-generated\nimport {\n collapseLines,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n MessageLines,\n toolTone,\n} from '@agimon-ai/po-web-components';\n\nimport {\n computerActionCallSummary,\n computerActionCollapsedLines,\n computerActionResultLines,\n} from '../_lib/computerActionToolRender';\n\n/**\n * The computer_action tool's timeline item: Perform one constrained semantic action in the authorized application window. The shell owns\n * the frame, the outcome tone, the status badge, and the expand toggle; this\n * card supplies the header summary and the body lines, and says whether it\n * hides any so the toggle appears only when it reveals something.\n */\nexport function ComputerActionToolCard({ toolName, args, result, running, isError }: ToolMessageRenderProps) {\n const lines = computerActionResultLines(result);\n const collapsed = collapseLines(lines, computerActionCollapsedLines, false);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={collapsed.hidden > 0}>\n {({ expanded }) => {\n const view = expanded ? collapseLines(lines, computerActionCollapsedLines, true) : collapsed;\n return (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"min-w-0 flex-1 truncate text-po-text\">\n {computerActionCallSummary(args)}\n </span>\n </MessageItemHeader>\n {view.shown.length > 0 || running || isError ? (\n <MessageItemBody data-testid={`tool-result-${toolName}`} className=\"flex flex-col gap-1\">\n {view.shown.length > 0 ? <MessageLines lines={view.shown} /> : null}\n {view.hidden > 0 ? <MessageItemStatus expands>{view.hidden} more line(s)</MessageItemStatus> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n {isError ? <MessageItemStatus tone=\"error\">failed</MessageItemStatus> : null}\n </MessageItemBody>\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { type ToolResultView, toolResultTextLines } from '@agimon-ai/po-core/web';\nimport type { MessageLine } from '@agimon-ai/po-web-components';\n\nexport const computerExecToolName = 'computer_exec' as const;\nexport const computerExecCollapsedLines = 8;\n\nexport function computerExecCallSummary(args: Readonly<Record<string, unknown>>): string {\n return typeof args.scriptPath === 'string' ? args.scriptPath : '';\n}\n\nexport function computerExecResultLines(result: ToolResultView | null): MessageLine[] {\n if (result === null) return [];\n return toolResultTextLines(result.content).map((text) => ({ text, tone: 'dim' }));\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n collapseLines,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n MessageLines,\n toolTone,\n} from '@agimon-ai/po-web-components';\n\nimport {\n computerExecCallSummary,\n computerExecCollapsedLines,\n computerExecResultLines,\n} from '../_lib/computerExecToolRender';\n\nexport function ComputerExecToolCard({ toolName, args, result, running, isError }: ToolMessageRenderProps) {\n const lines = computerExecResultLines(result);\n const collapsed = collapseLines(lines, computerExecCollapsedLines, false);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={collapsed.hidden > 0}>\n {({ expanded }) => {\n const view = expanded ? collapseLines(lines, computerExecCollapsedLines, true) : collapsed;\n return (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"min-w-0 flex-1 truncate text-po-text\">\n {computerExecCallSummary(args)}\n </span>\n </MessageItemHeader>\n {view.shown.length > 0 || running || isError ? (\n <MessageItemBody data-testid={`tool-result-${toolName}`} className=\"flex flex-col gap-1\">\n {view.shown.length > 0 ? <MessageLines lines={view.shown} /> : null}\n {view.hidden > 0 ? <MessageItemStatus expands>{view.hidden} more line(s)</MessageItemStatus> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n {isError ? <MessageItemStatus tone=\"error\">failed</MessageItemStatus> : null}\n </MessageItemBody>\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { type ToolResultView, toolResultTextLines } from '@agimon-ai/po-core/web';\nimport type { MessageLine } from '@agimon-ai/po-web-components';\n\nexport const computerStateToolName = 'computer_state' as const;\nexport const computerStateCollapsedLines = 8;\n\nexport function computerStateCallSummary(_args: Readonly<Record<string, unknown>>): string {\n return 'authorized window';\n}\n\n/**\n * The body as toned lines: what the result's details say, or its text. Pure,\n * so a unit test can pin it without a DOM; the item decides how many to show.\n */\nexport function computerStateResultLines(result: ToolResultView | null): MessageLine[] {\n if (result === null) return [];\n return toolResultTextLines(result.content).map((text) => ({ text, tone: 'dim' }));\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\n// @scaffold-generated\nimport {\n collapseLines,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n MessageLines,\n toolTone,\n} from '@agimon-ai/po-web-components';\n\nimport {\n computerStateCallSummary,\n computerStateCollapsedLines,\n computerStateResultLines,\n} from '../_lib/computerStateToolRender';\n\n/**\n * The computer_state tool's timeline item: Observe the authorized application window and semantic accessibility state. The shell owns\n * the frame, the outcome tone, the status badge, and the expand toggle; this\n * card supplies the header summary and the body lines, and says whether it\n * hides any so the toggle appears only when it reveals something.\n */\nexport function ComputerStateToolCard({ toolName, args, result, running, isError }: ToolMessageRenderProps) {\n const lines = computerStateResultLines(result);\n const collapsed = collapseLines(lines, computerStateCollapsedLines, false);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={collapsed.hidden > 0}>\n {({ expanded }) => {\n const view = expanded ? collapseLines(lines, computerStateCollapsedLines, true) : collapsed;\n return (\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 {view.shown.length > 0 || running || isError ? (\n <MessageItemBody data-testid={`tool-result-${toolName}`} className=\"flex flex-col gap-1\">\n {view.shown.length > 0 ? <MessageLines lines={view.shown} /> : null}\n {view.hidden > 0 ? <MessageItemStatus expands>{view.hidden} more line(s)</MessageItemStatus> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n {isError ? <MessageItemStatus tone=\"error\">failed</MessageItemStatus> : null}\n </MessageItemBody>\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import type { WebPluginDefinition } from '@agimon-ai/po-core/web';\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 minorModes: [\n {\n name: 'computer use',\n modeId: COMPUTER_USE_MODE_ID,\n keys: 'c e',\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({ slot: 'activity.computer-use', ...legacy.activitySections![0]! });\n","import { defineMinorModeFile } from '@agimon-ai/po-core/web';\n\nimport legacy from '../../_legacy';\n\nexport default defineMinorModeFile(legacy.minorModes![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 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 global: {\n get settingsPanels(): WebPluginContributions['settingsPanels'] { return [via({ id: 'desktop-permissions' }, settingDesktopPermissions)]; },\n get settingsSections(): WebPluginContributions['settingsSections'] { return [via({ id: 'computer-use' }, settingComputerUse)]; },\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 minorModes(): WebPluginContributions['minorModes'] { 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;CAAE,GAAGA,EDAxC,kBAAkB,CAAC,0BAA0B,ECALA,EAAO,iBAAkB;CAAK,MAAM;AAAY,CAAC;;;ACF3F,MAAa,yBAAyB;AACtC,MAAa,uBAAuB;AACpC,MAAa,0BAA0B;AACvC,MAAa,+BAA+B;AAE5C,MAAa,mCAAmC;;;;;;;;AAUhD,MAAa,sBAAsB;CACjC,UAAU;CACV,UAAU;CACV,YAAY;CACZ,cAAc;CACd,aAA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O;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","api","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/computerActionToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerActionToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerExecToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerExecToolCard.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/computerStateToolRender.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ComputerStateToolCard.tsx","../../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 minor 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['global']>;\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({ ...legacy.settingsSections![0]!, icon: MonitorIcon });\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 { value: 'all', label: 'everything', detail: 'Every exported variable, including API keys, minus exclusions.' },\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({ ...desktopEnvironmentSettingsSection, icon: ShieldIcon });\n","import type { PoApiCaller } from '@agimon-ai/po-core/packageApi';\n\nexport 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;\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 activate: '/activate',\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} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\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 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 readonly caller: PoApiCaller;\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 = { readonly action: 'status' | 'targets' | 'stop' | 'artifacts' };\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 * Activation, status, cancellation and recording reads are reachable from a browser. 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 */\nconst routes = {\n artifact: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.artifact,\n query: ['artifactId', 'offset'],\n raw: true,\n },\n activationState: {\n method: 'GET',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n cancelActivation: {\n method: 'DELETE',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\n },\n activate: {\n method: 'POST',\n path: COMPUTER_USE_ROUTES.activate,\n response: undefined as unknown as ApiResponseOf<ComputerUseSessionView>,\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<{ readonly grantId: string; readonly expiresAt?: number } | 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 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\nexport default routes;\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 = ['global', '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 | { status: 'ready'; states: DesktopPermissionStates; asking?: DesktopPermission }\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 { status: 'error', error: error instanceof Error ? error.message : String(error) };\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>({ status: 'loading' });\n\n const load = useCallback(async () => {\n setState(await viewStateOf(request(api.global.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.global.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({ ...legacy.settingsSections![0]!, icon: MonitorIcon });\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 { computerUse as api } from '../../../../../../../generated/client';\nimport { COMPUTER_USE_DEFAULT_DURATION_MS, computerUseChannelType } from '../../../../../../types/computerUseApi';\nimport { computerUse } from '../../_lib/computerUseStore';\n\nconst DESKTOP_TARGET: Record<string, unknown> = Object.freeze({ scope: 'desktop' });\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({ sessionId, sendSessionFrame }: WebPluginSlotProps) {\n const session = useStore(computerUse.store, (state) => computerUse.select(state, sessionId));\n const [selected, setSelected] = useState(0);\n const [confirmationTarget, setConfirmationTarget] = useState<Record<string, unknown>>();\n const [error, setError] = useState<string>();\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, { type: computerUseChannelType, payload: { action: 'status' } });\n sendSessionFrame(sessionId, { type: computerUseChannelType, payload: { action: 'targets' } });\n }, [sendSessionFrame, sessionId]);\n\n useEffect(() => {\n if (sessionId === null) return;\n const controller = new AbortController();\n let timer: ReturnType<typeof setTimeout> | undefined;\n const poll = async () => {\n // A closed session or standalone story may have no API address (thrown synchronously by `session`):\n // keep the last state and retry next poll.\n const result = await Promise.resolve()\n .then(() => api.session(sessionId).activationState({ signal: controller.signal }))\n .catch(() => null);\n if (controller.signal.aborted) return;\n if (result?.ok) {\n computerUse.update(sessionId, (current) =>\n result.data.revision >= current.state.revision ? { ...current, state: result.data } : current,\n );\n }\n if (!controller.signal.aborted) timer = setTimeout(() => void poll(), 2000);\n };\n void poll();\n return () => {\n controller.abort();\n clearTimeout(timer);\n };\n }, [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 // The whole desktop comes first; without a window list the Mac itself offers the choice.\n const choices: { label: string; target?: Record<string, unknown> }[] = [\n { label: 'Whole desktop', target: DESKTOP_TARGET },\n ...(session.targets.length === 0\n ? [{ label: 'Choose window on Mac' }]\n : session.targets.map((item) => ({\n label: text(item.applicationName, text(item.windowTitle, text(item.windowId, 'Window'))),\n target: item,\n }))),\n ];\n const target = (choices[selected] ?? choices[0]!).target;\n const desktopConfirmation = confirmationTarget?.scope === 'desktop';\n const artifact = state.artifact;\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 const confirm = async (chosenTarget = confirmationTarget) => {\n setError(undefined);\n try {\n // Through the generated client, which carries the sealed transport: this\n // request names an application window a reader just agreed to hand over,\n // and the global fetch it used to call handed that to a remote session's\n // relay in the clear.\n const result = await api.session(sessionId).activate({\n body: {\n ...(chosenTarget === undefined ? {} : { target: chosenTarget }),\n durationMs: COMPUTER_USE_DEFAULT_DURATION_MS,\n },\n });\n if (!result.ok) {\n // `status: 0` is the one case nothing answered at all, which the old\n // bare fetch reported by rejecting into nobody's handler.\n if (result.status === 0) setError('The session is unreachable.');\n else setError(result.error === '' ? `Activation failed with HTTP ${result.status}.` : result.error);\n return;\n }\n setConfirmationTarget(undefined);\n computerUse.update(sessionId, (current) => ({ ...current, state: result.data }));\n send({ action: 'status' });\n } catch {\n setError('The activation request is unavailable.');\n }\n };\n\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 {state.phase === 'inactive' || state.phase === 'failed' ? (\n <Button size=\"sm\" type=\"button\" variant=\"ghost\" onClick={() => send({ action: 'targets' })}>\n Refresh targets\n </Button>\n ) : null}\n </header>\n {session.busy ? (\n <p className=\"rounded border border-po-yellow px-2 py-1\">Computer use is busy in another session</p>\n ) : null}\n {state.failure ? <p className=\"text-po-red\">{state.failure.message}</p> : null}\n {error ? <p className=\"text-po-red\">{error}</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 saved to session artifacts.\n </p>\n ) : null}\n {artifact?.failure ? <p className=\"text-po-red\">{artifact.failure.message}</p> : null}\n\n {(state.phase === 'inactive' || state.phase === 'failed') && confirmationTarget === undefined ? (\n <div className=\"flex flex-col gap-2\">\n <label htmlFor=\"computer-use-target\" className=\"text-po-dim\">\n What Po may control\n </label>\n <select\n id=\"computer-use-target\"\n value={selected}\n onChange={(event) => setSelected(Number(event.target.value))}\n className=\"min-h-7 rounded border border-po-border bg-po-panel px-2 py-1\"\n >\n {choices.map((choice, index) => (\n <option key={`${index}:${choice.label}`} value={index}>\n {choice.label}\n </option>\n ))}\n </select>\n <p className=\"text-sm text-po-dim\">Po asks before it takes control. You can stop at any time.</p>\n <Button\n size=\"sm\"\n type=\"button\"\n disabled={Boolean(session.busy)}\n variant=\"primary\"\n onClick={() => {\n if (target === undefined) void confirm();\n else setConfirmationTarget(Object.freeze({ ...target }));\n }}\n >\n {target === undefined ? 'Choose window on Mac' : 'Request activation'}\n </Button>\n </div>\n ) : null}\n\n {confirmationTarget !== undefined ? (\n <div className=\"rounded border border-po-blue p-3\">\n <strong>Confirm computer control</strong>\n <p className=\"my-2 text-po-text\">\n {desktopConfirmation\n ? 'Your whole desktop'\n : `${text(confirmationTarget.applicationName, 'Application')}: ${text(confirmationTarget.windowTitle, text(confirmationTarget.windowId, 'Window'))}`}\n </p>\n <p className=\"my-2 text-po-dim\">\n {desktopConfirmation\n ? \"Confirm a 5 minute session for every app on your main display. Po's own windows stay out of reach.\"\n : 'Confirm a 5 minute session for this exact application window.'}\n </p>\n <div className=\"flex gap-2\">\n <Button size=\"sm\" type=\"button\" variant=\"primary\" onClick={() => void confirm()}>\n Confirm\n </Button>\n <Button\n size=\"sm\"\n type=\"button\"\n className=\"min-h-7 rounded border border-po-border bg-po-panel px-2 py-1\"\n onClick={() => setConfirmationTarget(undefined)}\n >\n Cancel\n </Button>\n </div>\n </div>\n ) : null}\n\n {state.phase === 'awaiting_confirmation' || state.phase === 'activating' ? (\n <div>\n <p>Desktop activation is pending.</p>\n <Button\n size=\"sm\"\n type=\"button\"\n onClick={() => {\n void (async () => {\n try {\n const result = await api.session(sessionId).cancelActivation();\n if (!result.ok) setError('The activation could not be cancelled.');\n else computerUse.update(sessionId, (current) => ({ ...current, state: result.data }));\n } catch {\n setError('The activation could not be cancelled.');\n }\n })();\n }}\n >\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={{ width: `${Math.min(100, Math.max(0, (left / total) * 100))}%` }}\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","import { type ToolResultView, toolResultTextLines } from '@agimon-ai/po-core/web';\nimport type { MessageLine } from '@agimon-ai/po-web-components';\n\nexport const computerActionToolName = 'computer_action' as const;\nexport const computerActionCollapsedLines = 8;\n\nexport function computerActionCallSummary(args: Readonly<Record<string, unknown>>): 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).join(' ');\n}\n\n/**\n * The body as toned lines: what the result's details say, or its text. Pure,\n * so a unit test can pin it without a DOM; the item decides how many to show.\n */\nexport function computerActionResultLines(result: ToolResultView | null): MessageLine[] {\n if (result === null) return [];\n return toolResultTextLines(result.content).map((text) => ({ text, tone: 'dim' }));\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\n// @scaffold-generated\nimport {\n collapseLines,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n MessageLines,\n toolTone,\n} from '@agimon-ai/po-web-components';\n\nimport {\n computerActionCallSummary,\n computerActionCollapsedLines,\n computerActionResultLines,\n} from '../_lib/computerActionToolRender';\n\n/**\n * The computer_action tool's timeline item: Perform one constrained semantic action in the authorized application window. The shell owns\n * the frame, the outcome tone, the status badge, and the expand toggle; this\n * card supplies the header summary and the body lines, and says whether it\n * hides any so the toggle appears only when it reveals something.\n */\nexport function ComputerActionToolCard({ toolName, args, result, running, isError }: ToolMessageRenderProps) {\n const lines = computerActionResultLines(result);\n const collapsed = collapseLines(lines, computerActionCollapsedLines, false);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={collapsed.hidden > 0}>\n {({ expanded }) => {\n const view = expanded ? collapseLines(lines, computerActionCollapsedLines, true) : collapsed;\n return (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"min-w-0 flex-1 truncate text-po-text\">\n {computerActionCallSummary(args)}\n </span>\n </MessageItemHeader>\n {view.shown.length > 0 || running || isError ? (\n <MessageItemBody data-testid={`tool-result-${toolName}`} className=\"flex flex-col gap-1\">\n {view.shown.length > 0 ? <MessageLines lines={view.shown} /> : null}\n {view.hidden > 0 ? <MessageItemStatus expands>{view.hidden} more line(s)</MessageItemStatus> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n {isError ? <MessageItemStatus tone=\"error\">failed</MessageItemStatus> : null}\n </MessageItemBody>\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { type ToolResultView, toolResultTextLines } from '@agimon-ai/po-core/web';\nimport type { MessageLine } from '@agimon-ai/po-web-components';\n\nexport const computerExecToolName = 'computer_exec' as const;\nexport const computerExecCollapsedLines = 8;\n\nexport function computerExecCallSummary(args: Readonly<Record<string, unknown>>): string {\n return typeof args.scriptPath === 'string' ? args.scriptPath : '';\n}\n\nexport function computerExecResultLines(result: ToolResultView | null): MessageLine[] {\n if (result === null) return [];\n return toolResultTextLines(result.content).map((text) => ({ text, tone: 'dim' }));\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n collapseLines,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n MessageLines,\n toolTone,\n} from '@agimon-ai/po-web-components';\n\nimport {\n computerExecCallSummary,\n computerExecCollapsedLines,\n computerExecResultLines,\n} from '../_lib/computerExecToolRender';\n\nexport function ComputerExecToolCard({ toolName, args, result, running, isError }: ToolMessageRenderProps) {\n const lines = computerExecResultLines(result);\n const collapsed = collapseLines(lines, computerExecCollapsedLines, false);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={collapsed.hidden > 0}>\n {({ expanded }) => {\n const view = expanded ? collapseLines(lines, computerExecCollapsedLines, true) : collapsed;\n return (\n <>\n <MessageItemHeader title={toolName}>\n <span data-testid={`tool-call-${toolName}`} className=\"min-w-0 flex-1 truncate text-po-text\">\n {computerExecCallSummary(args)}\n </span>\n </MessageItemHeader>\n {view.shown.length > 0 || running || isError ? (\n <MessageItemBody data-testid={`tool-result-${toolName}`} className=\"flex flex-col gap-1\">\n {view.shown.length > 0 ? <MessageLines lines={view.shown} /> : null}\n {view.hidden > 0 ? <MessageItemStatus expands>{view.hidden} more line(s)</MessageItemStatus> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n {isError ? <MessageItemStatus tone=\"error\">failed</MessageItemStatus> : null}\n </MessageItemBody>\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { type ToolResultView, toolResultTextLines } from '@agimon-ai/po-core/web';\nimport type { MessageLine } from '@agimon-ai/po-web-components';\n\nexport const computerStateToolName = 'computer_state' as const;\nexport const computerStateCollapsedLines = 8;\n\nexport function computerStateCallSummary(_args: Readonly<Record<string, unknown>>): string {\n return 'authorized window';\n}\n\n/**\n * The body as toned lines: what the result's details say, or its text. Pure,\n * so a unit test can pin it without a DOM; the item decides how many to show.\n */\nexport function computerStateResultLines(result: ToolResultView | null): MessageLine[] {\n if (result === null) return [];\n return toolResultTextLines(result.content).map((text) => ({ text, tone: 'dim' }));\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\n// @scaffold-generated\nimport {\n collapseLines,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n MessageLines,\n toolTone,\n} from '@agimon-ai/po-web-components';\n\nimport {\n computerStateCallSummary,\n computerStateCollapsedLines,\n computerStateResultLines,\n} from '../_lib/computerStateToolRender';\n\n/**\n * The computer_state tool's timeline item: Observe the authorized application window and semantic accessibility state. The shell owns\n * the frame, the outcome tone, the status badge, and the expand toggle; this\n * card supplies the header summary and the body lines, and says whether it\n * hides any so the toggle appears only when it reveals something.\n */\nexport function ComputerStateToolCard({ toolName, args, result, running, isError }: ToolMessageRenderProps) {\n const lines = computerStateResultLines(result);\n const collapsed = collapseLines(lines, computerStateCollapsedLines, false);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={collapsed.hidden > 0}>\n {({ expanded }) => {\n const view = expanded ? collapseLines(lines, computerStateCollapsedLines, true) : collapsed;\n return (\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 {view.shown.length > 0 || running || isError ? (\n <MessageItemBody data-testid={`tool-result-${toolName}`} className=\"flex flex-col gap-1\">\n {view.shown.length > 0 ? <MessageLines lines={view.shown} /> : null}\n {view.hidden > 0 ? <MessageItemStatus expands>{view.hidden} more line(s)</MessageItemStatus> : null}\n {running ? <MessageItemStatus tone=\"running\">running</MessageItemStatus> : null}\n {isError ? <MessageItemStatus tone=\"error\">failed</MessageItemStatus> : null}\n </MessageItemBody>\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import type { WebPluginDefinition } from '@agimon-ai/po-core/web';\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 minorModes: [\n {\n name: 'computer use',\n modeId: COMPUTER_USE_MODE_ID,\n keys: 'c e',\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({ slot: 'activity.computer-use', ...legacy.activitySections![0]! });\n","import { defineMinorModeFile } from '@agimon-ai/po-core/web';\n\nimport legacy from '../../_legacy';\n\nexport default defineMinorModeFile(legacy.minorModes![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 global: {\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 minorModes(): WebPluginContributions['minorModes'] { 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;CAAE,GAAGA,EDAxC,kBAAkB,CAAC,0BAA0B,ECALA,EAAO,iBAAkB;CAAK,MAAM;AAAY,CAAC;;;AEA3F,IAAA,kCAAe,sBAAsB;CDEnC,IAAI;CACJ,aAAa;CACb,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ,CACN;EACE,IAAI;EACJ,OAAO;EACP,QACE;CACJ,CACF;CACA,QAAQ;EACN;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,SAAS,CAAC,sBAAsB,SAAS;GACzC,OAAO;GACP,cAAc;GACd,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAO,OAAO;IAAc,QAAQ;GAAiE,GAC9G;IACE,OAAO;IACP,OAAO;IACP,QAAQ;GACV,CACF;EACF;EACA;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,SAAS,CAAC,sBAAsB,SAAS;GACzC,OAAO;GACP,QAAQ;EACV;EACA;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,SAAS,CAAC,sBAAsB,aAAa;GAC7C,OAAO;GACP,QAAQ;EACV;CACF;CCjD2E,MAAM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eAAe,GAAGC,wBAAkB,CAAC;EAAG;EACpH,IAAI,QAAyC;GAAE,OAAO,CAAC,IAAI;IAAE,MAAM;IAAyB,IAAI;GAAe,GAAGC,6CAAe,CAAC;EAAG;EACrI,IAAI,aAAmD;GAAE,OAAO,CAAC,IAAI,EAAE,MAAM,eAAe,GAAGC,gBAAe,CAAC;EAAG;EAClH,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-computer-use",
3
- "version": "0.0.0-alpha.51",
3
+ "version": "0.0.0-alpha.52",
4
4
  "description": "Session scoped semantic computer control through the Po Desktop capability.",
5
5
  "keywords": [
6
6
  "ai",
@@ -63,19 +63,19 @@
63
63
  "access": "public"
64
64
  },
65
65
  "dependencies": {
66
- "@agimon-ai/po-config": "0.0.0-alpha.51",
67
- "@agimon-ai/po-core": "0.0.0-alpha.51",
68
- "@agimon-ai/po-minor-mode": "0.0.0-alpha.51",
69
- "@agimon-ai/po-web-components": "0.0.0-alpha.51",
70
- "@agimon-ai/po-web-security": "0.0.0-alpha.51",
66
+ "@agimon-ai/po-config": "0.0.0-alpha.52",
67
+ "@agimon-ai/po-core": "0.0.0-alpha.52",
68
+ "@agimon-ai/po-minor-mode": "0.0.0-alpha.52",
69
+ "@agimon-ai/po-web-components": "0.0.0-alpha.52",
70
+ "@agimon-ai/po-web-security": "0.0.0-alpha.52",
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.51",
77
- "@agimon-ai/po-native-components": "0.0.0-alpha.51",
78
- "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.51",
76
+ "@agimon-ai/po-build": "0.0.0-alpha.52",
77
+ "@agimon-ai/po-native-components": "0.0.0-alpha.52",
78
+ "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.52",
79
79
  "@earendil-works/pi-coding-agent": "1.4.0",
80
80
  "@tanstack/react-store": "0.11.2",
81
81
  "@tanstack/store": "0.11.2",
@@ -91,7 +91,7 @@
91
91
  "vitest": "5.0.4"
92
92
  },
93
93
  "peerDependencies": {
94
- "@agimon-ai/po-native-components": "0.0.0-alpha.51",
94
+ "@agimon-ai/po-native-components": "0.0.0-alpha.52",
95
95
  "@earendil-works/pi-coding-agent": "1.4.0",
96
96
  "react-native": "0.88.0",
97
97
  "react-native-unistyles": "^3.5.3"