@agimon-ai/po-runner 0.0.0-alpha.190 → 0.0.0-alpha.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensions/web.mjs +14 -10
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/po-runtime-identity.json +1 -1
- package/package.json +16 -16
package/dist/extensions/web.mjs
CHANGED
|
@@ -883,6 +883,11 @@ function RunnerLogPanel({ sessionId, runId, sendSessionFrame, onTerminal }) {
|
|
|
883
883
|
"data-testid": "runner-log-state",
|
|
884
884
|
children: badge.label
|
|
885
885
|
}),
|
|
886
|
+
run?.exit?.code !== void 0 && run.exit.code !== null ? /* @__PURE__ */ jsx("span", {
|
|
887
|
+
"data-testid": "runner-log-exit-code",
|
|
888
|
+
className: "shrink-0 text-sm text-po-dim",
|
|
889
|
+
children: `exit ${String(run.exit.code)}`
|
|
890
|
+
}) : null,
|
|
886
891
|
run ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(RunnerUptime, { run }), /* @__PURE__ */ jsx("span", {
|
|
887
892
|
className: "shrink-0 text-sm text-po-dim",
|
|
888
893
|
children: `pid ${String(run.pid)} · ${run.backend}${run.interactive ? " · tty" : ""}`
|
|
@@ -1237,9 +1242,8 @@ function runnersTab() {
|
|
|
1237
1242
|
* runner is shown in place, as its terminal when it has one and as its log
|
|
1238
1243
|
* when it does not (a command the agent backgrounded has no pane).
|
|
1239
1244
|
*
|
|
1240
|
-
*
|
|
1241
|
-
*
|
|
1242
|
-
* started it, and `po-runner list` is where history lives.
|
|
1245
|
+
* Keep the feed's recently finished runners available here too: a UI-launched
|
|
1246
|
+
* command has no originating tool message from which to reopen its log.
|
|
1243
1247
|
*/
|
|
1244
1248
|
function RunnersPanel(props) {
|
|
1245
1249
|
const { sessionId, sendSessionFrame } = props;
|
|
@@ -1254,7 +1258,7 @@ function RunnersPanel(props) {
|
|
|
1254
1258
|
/** What the pending launch ran, put back if the start fails. */
|
|
1255
1259
|
const launchedCommand = useRef("");
|
|
1256
1260
|
const launchTimeout = useRef(void 0);
|
|
1257
|
-
const selected =
|
|
1261
|
+
const selected = session.runs.find((run) => run.id === selectedId) ?? session.runs[0];
|
|
1258
1262
|
const launch = () => {
|
|
1259
1263
|
if (sessionId === null) return;
|
|
1260
1264
|
launchBaseline.current = new Set(session.runs.map((run) => run.id));
|
|
@@ -1269,7 +1273,7 @@ function RunnersPanel(props) {
|
|
|
1269
1273
|
useEffect(() => {
|
|
1270
1274
|
const baseline = launchBaseline.current;
|
|
1271
1275
|
if (baseline === null) return;
|
|
1272
|
-
const started = session.runs.find((run) =>
|
|
1276
|
+
const started = session.runs.find((run) => !baseline.has(run.id));
|
|
1273
1277
|
if (!started) return;
|
|
1274
1278
|
launchBaseline.current = null;
|
|
1275
1279
|
clearTimeout(launchTimeout.current);
|
|
@@ -1316,7 +1320,7 @@ function RunnersPanel(props) {
|
|
|
1316
1320
|
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
1317
1321
|
"data-testid": "runners-panel-picker",
|
|
1318
1322
|
className: "flex shrink-0 flex-wrap gap-1.5 px-3 pt-3 sm:px-[26px]",
|
|
1319
|
-
children:
|
|
1323
|
+
children: session.runs.map((run) => /* @__PURE__ */ jsxs(Button, {
|
|
1320
1324
|
variant: run === selected ? "subtle" : "ghost",
|
|
1321
1325
|
size: "sm",
|
|
1322
1326
|
"data-testid": `runners-panel-pick-${run.id}`,
|
|
@@ -1325,20 +1329,20 @@ function RunnersPanel(props) {
|
|
|
1325
1329
|
onClick: () => setSelectedId(run.id),
|
|
1326
1330
|
className: `gap-1.5 ${run === selected ? "text-po-hi" : ""}`,
|
|
1327
1331
|
children: [/* @__PURE__ */ jsx(Dot, {
|
|
1328
|
-
tone: "yellow",
|
|
1329
|
-
pulse:
|
|
1332
|
+
tone: run.state === "running" ? "yellow" : "muted",
|
|
1333
|
+
pulse: run.state === "running"
|
|
1330
1334
|
}), run.name]
|
|
1331
1335
|
}, run.id))
|
|
1332
1336
|
}), /* @__PURE__ */ jsx("div", {
|
|
1333
1337
|
className: "mt-3 flex min-h-0 flex-1 flex-col border-t border-po-border-soft",
|
|
1334
|
-
children: selected.interactive && searchingId !== selected.id ? /* @__PURE__ */ jsx(RunnerShellPanel, {
|
|
1338
|
+
children: selected.interactive && selected.state === "running" && searchingId !== selected.id ? /* @__PURE__ */ jsx(RunnerShellPanel, {
|
|
1335
1339
|
...props,
|
|
1336
1340
|
runId: selected.id,
|
|
1337
1341
|
onSearch: () => setSearchingId(selected.id)
|
|
1338
1342
|
}, selected.id) : /* @__PURE__ */ jsx(RunnerLogPanel, {
|
|
1339
1343
|
...props,
|
|
1340
1344
|
runId: selected.id,
|
|
1341
|
-
...selected.interactive ? { onTerminal: () => setSearchingId(void 0) } : {}
|
|
1345
|
+
...selected.interactive && selected.state === "running" ? { onTerminal: () => setSearchingId(void 0) } : {}
|
|
1342
1346
|
}, selected.id)
|
|
1343
1347
|
})] })
|
|
1344
1348
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.mjs","names":["isRecord","MAX_RETRIES","RETRY_BASE_MS","isRecord","isRecord","BYTES_PER_KB","BYTES_PER_MB","formatSize","activityGroupRunners","channelRunnerRuns","fillRunners","toolBash"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/_lib/launchLine.ts","../../src/constants/webRunners.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/runnersStore.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/format.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.tsx","../../src/constants/webRunnerLog.ts","../../src/types/webRunnerLog.ts","../../src/types/apiRoutes.ts","../../generated/client.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/screenApi.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/logApi.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/RunnerLogPanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/_components/RunnerShellPanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/activity-group/runners.web.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/runner-runs.web.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/runnerTail.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/RunnersActivitySection.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/Runners.activity.runners.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/bashToolFormat.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/bash.web.tsx","../../generated/web.ts"],"sourcesContent":["/**\n * The `/runners start` line the runners panel's command bar sends.\n *\n * WHY THE BUILDER LIVES HERE AND THE PARSER DOES NOT:\n * Cockpit code is compiled into the host bundle and may import only this\n * package's own web and type modules, so it cannot share the session's parser\n * in src/services. The two are pinned together by a test that parses what this\n * writes, which is the only guarantee that matters: the line has to survive\n * the trip.\n */\n\nexport const RUNNERS_START_LINE = '/runners start';\n/** A persistent login shell for the direct shell action in Runner Space. */\nexport const RUNNER_SHELL_COMMAND = 'exec \"${SHELL:-/bin/bash}\" -l';\n/** Ends the options and begins the command; the command may hold `=` and flags of its own. */\nexport const RUNNERS_COMMAND_SEPARATOR = '--';\n\nexport interface RunnerLaunchRequest {\n command: string;\n cwd?: string;\n name?: string;\n interactive?: boolean;\n /** A terminal when rmux or tmux is available, plain output otherwise. */\n preferInteractive?: boolean;\n}\n\n/** The no-form launch used when a reader asks for a shell rather than a command. */\nexport const RUNNER_SHELL_REQUEST: RunnerLaunchRequest = {\n command: RUNNER_SHELL_COMMAND,\n name: 'shell',\n interactive: true,\n};\n\n/**\n * What the runners panel's Run sends: the typed command on a terminal when\n * one is available, or a login shell when nothing was typed.\n */\nexport function runnerRunRequest(command: string, cwd: string): RunnerLaunchRequest {\n const where = cwd.trim() === '' ? {} : { cwd };\n return command.trim() === '' ? { ...RUNNER_SHELL_REQUEST, ...where } : { command, ...where, preferInteractive: true };\n}\n\n/** Quotes a value that carries whitespace, which is how a value survives tokenizing. */\nfunction quote(value: string): string {\n return /\\s/u.test(value) ? `\"${value}\"` : value;\n}\n\nexport function runnerLaunchLine(request: RunnerLaunchRequest): string {\n const cwd = request.cwd?.trim() ?? '';\n const name = request.name?.trim() ?? '';\n const pairs = [\n ...(name === '' ? [] : [`name=${quote(name)}`]),\n ...(cwd === '' ? [] : [`cwd=${quote(cwd)}`]),\n ...(request.interactive === true\n ? ['interactive=true']\n : request.preferInteractive === true\n ? ['interactive=prefer']\n : []),\n ];\n // The separator is always written, even with no options before it, so the\n // command is never re-read as a `key=value` pair.\n return [RUNNERS_START_LINE, ...pairs, RUNNERS_COMMAND_SEPARATOR, request.command.trim()].join(' ');\n}\n","export const RUNNER_RUNS_TYPE = 'runner_runs';\n","import { defineSessionStore, type SessionFrameSender } from '@agimon-ai/po-core/web';\n\nimport { RUNNER_RUNS_TYPE } from '../../../../../constants/webRunners';\nimport { type RunnerRunView, type RunnerStartFailureView } from '../../../../../types/webRunners';\nimport { type RunnerLaunchRequest, runnerLaunchLine } from './launchLine';\n\n/** The runtime's slash verb that stops one runner headlessly. */\nconst STOP_COMMAND = '/runners stop';\n\n/** One session's record: the hub's last report plus what this page asked for. */\nexport interface RunnersSession extends RunnerRunsPayload {\n /** Runners a stop was asked for and that have not yet reported an exit. */\n stopRequested: string[];\n}\n\nexport const runners = defineSessionStore<RunnersSession>({ runs: [], stopRequested: [] });\n\n/** Short commands stay out of the activity card, but remain in the runner feed. */\nexport function isRunnerActivityVisible(run: RunnerRunView, now = Date.now()): boolean {\n return run.state === 'running' && now - Date.parse(run.startedAt) > 3_000;\n}\n\n/** The runner channel keeps the dock's busy state aligned with its rendered run list. */\nexport const runnerActivitySource = {\n subscribe(this: void, listener: () => void) {\n let timer: ReturnType<typeof setTimeout> | undefined;\n const schedule = () => {\n clearTimeout(timer);\n const now = Date.now();\n let deadline = Infinity;\n for (const session of Object.values(runners.store.state)) {\n if (!session) continue;\n for (const run of session.runs) {\n if (run.state !== 'running') continue;\n const revealAt = Date.parse(run.startedAt) + 3_001;\n if (revealAt > now) deadline = Math.min(deadline, revealAt);\n }\n }\n if (Number.isFinite(deadline))\n timer = setTimeout(\n () => {\n listener();\n schedule();\n },\n Math.min(deadline - now, 2_147_483_647),\n );\n };\n const subscription = runners.store.subscribe(() => {\n listener();\n schedule();\n });\n schedule();\n return () => {\n subscription.unsubscribe();\n clearTimeout(timer);\n };\n },\n isActive(sessionId: string | null) {\n return runners.select(runners.store.state, sessionId).runs.some((run) => isRunnerActivityVisible(run));\n },\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * Asks the runtime to stop a runner through the same slash command the TUI's\n * Runner Space uses. The request is remembered until the runner's record\n * reports an exit; the runtime, not this click, decides when that is.\n */\nexport function requestRunnerStop(send: SessionFrameSender, sessionId: string, id: string): void {\n send(sessionId, { type: 'prompt', message: `${STOP_COMMAND} ${id}` });\n runners.update(sessionId, (current) => ({\n ...current,\n stopRequested: [...current.stopRequested.filter((known) => known !== id), id],\n }));\n}\n\n/**\n * Asks the runtime to start a runner, through the same prompt frame the stop\n * request uses and the same way agents and workflows launch their own work.\n *\n * Nothing is recorded as pending here. The runtime names the run, and it\n * arrives in the feed on its own; guessing at an id before it exists would\n * only have to be reconciled later.\n */\nexport function requestRunnerStart(send: SessionFrameSender, sessionId: string, request: RunnerLaunchRequest): void {\n send(sessionId, { type: 'prompt', message: runnerLaunchLine(request) });\n}\n\nexport interface RunnerRunsPayload {\n /** The runners the hub last reported; presented order preserved. */\n runs: RunnerRunView[];\n /** Where a runner starts when no folder is given. */\n sessionDirectory?: string;\n /** The last start that did not happen. */\n startFailure?: RunnerStartFailureView;\n}\n\n/** The plugin's session data channel: 'runner_runs' payloads into the store. */\nexport const runnerRunsChannel = runners.channel<RunnerRunsPayload>({\n channel: RUNNER_RUNS_TYPE,\n parse(input) {\n if (!isRecord(input) || !Array.isArray(input.runs)) return null;\n const failure = input.startFailure;\n return {\n runs: input.runs.filter(isRecord) as unknown as RunnerRunView[],\n ...(typeof input.sessionDirectory === 'string' ? { sessionDirectory: input.sessionDirectory } : {}),\n ...(isRecord(failure) && typeof failure.id === 'string' && typeof failure.message === 'string'\n ? { startFailure: { id: failure.id, message: failure.message } }\n : {}),\n };\n },\n reduce(current, payload) {\n // A stop request is spent once the runner reports an exit or leaves the feed.\n const stillRunning = new Set(payload.runs.filter((run) => run.state === 'running').map((run) => run.id));\n return { ...payload, stopRequested: current.stopRequested.filter((id) => stillRunning.has(id)) };\n },\n});\n","import type { RunnerRunView } from '../../../../../types/webRunners';\n\n/**\n * Local copy of the runtime's formatUptime (src/services/bashResult/index.ts):\n * the web plugin may reach only src/types, so the one helper it needs lives here.\n */\nexport function formatRunnerUptime(startedAt: string, now: number): string {\n const started = Date.parse(startedAt);\n if (Number.isNaN(started)) return 'unknown';\n const seconds = Math.max(0, Math.floor((now - started) / 1000));\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m`;\n const hours = Math.floor(minutes / 60);\n return hours < 24 ? `${hours}h` : `${Math.floor(hours / 24)}d`;\n}\n\n/** A bounded log view: what to render, and what the bound left out. */\nexport interface LogView {\n lines: string[];\n /** Lines dropped off the top to stay within the bound. */\n hidden: number;\n}\n\nexport interface LogViewOptions {\n /**\n * Drop the slice's last line because it is a fragment the follow stream will\n * deliver again, whole. Set only while following: a finished run's last line\n * may legitimately lack a newline, and dropping it would hide real output.\n */\n dropPartialTail?: boolean;\n}\n\n/**\n * The lines a log view shows: the slice's text, then whatever the follow\n * stream appended, bounded to the newest `max`.\n *\n * A log file ends with a newline, and the reader hands its text back with that\n * newline intact, so a naive split reports one blank line more than the file\n * has. Dropping exactly one trailing empty entry keeps the count the reader\n * sees equal to the count the server reported.\n */\nexport function logViewLines(\n text: string,\n appended: readonly string[],\n max: number,\n options: LogViewOptions = {},\n): LogView {\n const split = text.split('\\n');\n if (split.length > 0 && split[split.length - 1] === '') split.pop();\n if (options.dropPartialTail === true && split.length > 0) split.pop();\n const all = [...split, ...appended];\n const lines = all.slice(-max);\n return { lines, hidden: all.length - lines.length };\n}\n\n/**\n * Absolute 1-based numbers for a tail, counted back from the last line.\n *\n * A tail is contiguous, so only its end has to be known. Grep results are not\n * contiguous and carry their own numbers from the reader instead.\n */\nexport function tailLineNumbers(lastLineNumber: number, count: number): number[] {\n const first = Math.max(1, lastLineNumber - count + 1);\n return Array.from({ length: count }, (_, index) => first + index);\n}\n\n/**\n * Whether the view is actually following a growing log.\n *\n * Three things must hold: the reader asked to follow, no query is set (a\n * filtered view is a snapshot of the whole file, which a stream cannot\n * assemble a chunk at a time), and the runner is still writing. Without the\n * last one a finished run would claim to be tailing a file nothing will ever\n * append to.\n */\nexport function isFollowingLive(following: boolean, filtering: boolean, running: boolean): boolean {\n return following && !filtering && running;\n}\n\n/**\n * A folder as the command bar names it: the session directory by its last\n * segment, a folder inside it relative to it, anything else as written.\n */\nexport function runnerFolderLabel(folder: string, sessionDirectory: string | undefined): string {\n if (folder === '' || folder === sessionDirectory) {\n return sessionDirectory === undefined\n ? 'session directory'\n : (sessionDirectory.split('/').pop() ?? sessionDirectory);\n }\n if (sessionDirectory !== undefined && folder.startsWith(`${sessionDirectory}/`)) {\n return folder.slice(sessionDirectory.length + 1);\n }\n return folder;\n}\n\n/** The folders the picker offers past the session directory: those in use, then the one in effect. */\nexport function runnerFolders(\n inUse: readonly string[],\n current: string,\n sessionDirectory: string | undefined,\n): string[] {\n const folders = new Set([...inUse, current]);\n folders.delete('');\n if (sessionDirectory !== undefined) folders.delete(sessionDirectory);\n return [...folders];\n}\n\n/**\n * Undoes iOS smart punctuation, which React Native cannot switch off: a shell\n * reads ‘hi’ as literal quotes and a long dash before port as no flag at all.\n */\nexport function plainPunctuation(text: string): string {\n return text\n .replace(/[‘’]/g, \"'\")\n .replace(/[“”]/g, '\"')\n .replace(/\\u2014/g, '--');\n}\n\n/** The badge a run wears: its state while running, then how it ended. */\nexport function runnerBadge(run: RunnerRunView | undefined): {\n tone: 'neutral' | 'running' | 'ok' | 'error';\n label: string;\n} {\n if (run === undefined) return { tone: 'neutral', label: 'gone' };\n if (run.state === 'running') return { tone: 'running', label: 'running' };\n if (run.exit === undefined || run.exit.reason === 'stopped') return { tone: 'neutral', label: 'stopped' };\n const clean = run.exit.reason === 'completed' && (run.exit.code === 0 || run.exit.code === null);\n return clean ? { tone: 'ok', label: 'done' } : { tone: 'error', label: run.exit.reason.replace('_', ' ') };\n}\n","import {\n AlertIcon,\n Button,\n ChevronDownIcon,\n FolderIcon,\n Input,\n PickerContent,\n Popover,\n PopoverTrigger,\n type PickerItem,\n} from '@agimon-ai/po-web-components';\nimport { useState } from 'react';\n\nimport type { RunnerCommandBarProps } from '../../../../../types/webRunners';\nimport { runnerFolderLabel, runnerFolders } from '../_lib/format';\n\n/**\n * The one place a runner starts: a command, the folder it runs in, and Run.\n * An empty command opens a plain shell in that folder instead.\n */\nexport function RunnerCommandBar({\n command,\n onCommandChange,\n cwd,\n onCwdChange,\n sessionDirectory,\n folders,\n problem,\n onLaunch,\n defaultFolderOpen = false,\n}: RunnerCommandBarProps) {\n const [folderOpen, setFolderOpen] = useState(defaultFolderOpen);\n const [path, setPath] = useState('');\n const label = runnerFolderLabel(cwd, sessionDirectory);\n const pick = (next: string): void => {\n onCwdChange(next);\n setPath('');\n setFolderOpen(false);\n };\n const items: PickerItem[] = [\n { value: '', title: 'Session directory', subtitle: sessionDirectory ?? 'Where this session started' },\n ...runnerFolders(folders, cwd, sessionDirectory).map((folder) => ({\n value: folder,\n title: runnerFolderLabel(folder, sessionDirectory),\n subtitle: folder,\n })),\n ];\n\n return (\n <div className=\"flex shrink-0 flex-col gap-1.5 border-b border-po-border-soft px-3 py-3 sm:px-[26px]\">\n <div className=\"flex flex-wrap items-center gap-2 sm:flex-nowrap\">\n <span className=\"relative flex min-w-0 flex-1 basis-full items-center sm:basis-auto\">\n <span aria-hidden className=\"pointer-events-none absolute left-3 font-mono text-base text-po-faint\">\n $\n </span>\n <Input\n size=\"lg\"\n data-testid=\"runners-panel-command\"\n aria-label=\"Command to run\"\n value={command}\n placeholder=\"a command, like pnpm dev\"\n autoComplete=\"off\"\n spellCheck={false}\n onChange={(event) => onCommandChange(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') onLaunch();\n }}\n className=\"w-full pl-7 font-mono\"\n />\n </span>\n <Popover open={folderOpen} onOpenChange={setFolderOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"lg\"\n data-testid=\"runners-panel-cwd\"\n aria-label={`Runs in ${label}`}\n aria-invalid={problem === undefined ? undefined : true}\n title={cwd === '' ? sessionDirectory : cwd}\n className={`max-w-56 gap-1.5 px-3 font-mono ${problem === undefined ? '' : 'border-po-red'}`}\n >\n <FolderIcon className=\"h-3.5 w-3.5 shrink-0 text-po-faint\" />\n <span className=\"truncate\">{label}</span>\n <ChevronDownIcon className=\"size-3.5 shrink-0 opacity-60\" />\n </Button>\n </PopoverTrigger>\n <PickerContent\n side=\"bottom\"\n align=\"start\"\n title=\"Runs in\"\n items={items}\n value={[cwd]}\n onSelect={pick}\n footer={\n <span className=\"relative flex items-center px-3 py-2\">\n <FolderIcon className=\"pointer-events-none absolute left-5.5 h-3.5 w-3.5 text-po-faint\" />\n <Input\n data-testid=\"runners-panel-cwd-path\"\n aria-label=\"Another folder\"\n value={path}\n placeholder=\"another folder, like packages/web\"\n spellCheck={false}\n onChange={(event) => setPath(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && path.trim() !== '') pick(path.trim());\n }}\n className=\"w-full pl-8 font-mono\"\n />\n </span>\n }\n />\n </Popover>\n <Button variant=\"primary\" size=\"lg\" data-testid=\"runners-panel-run\" onClick={onLaunch}>\n {command.trim() === '' ? 'Open shell' : 'Run'}\n </Button>\n </div>\n {problem === undefined ? (\n <span className=\"text-sm text-po-dim\">\n Runs in its own terminal and keeps going after Po's turn ends. Leave it empty for a plain shell.\n </span>\n ) : (\n <span\n role=\"alert\"\n data-testid=\"runners-panel-problem\"\n className=\"flex items-center gap-1.5 text-sm text-po-red\"\n >\n <AlertIcon className=\"size-3.5 shrink-0\" />\n {problem}\n </span>\n )}\n </div>\n );\n}\n","export const RUNNER_API_BASE_PATH = 'runner';\nexport const RUN_ID_PARAM = 'runId';\nexport const RUNNER_SCREEN_EVENT = 'screen';\nexport const RUNNER_LOG_STREAM_EVENT = 'append';\nexport const RUNNER_LOG_PING_EVENT = 'ping';\n","import type { LogSlice } from './logReader';\n\n/**\n * The runner log API, shared by this package's session-scoped routes and its\n * cockpit plugin. The two halves run in different processes, so the wire\n * vocabulary is declared here: the browser half may reach `src/types` and\n * nothing else on the server side.\n *\n * Where the routes live is not here. That is `src/types/apiRoutes`, which both\n * halves read, and the generated client turns into the URLs the page addresses.\n * The file a run writes to is still read from its metadata record by the server\n * alone.\n */\n\n/**\n * One chunk of an attached pane's output.\n *\n * Base64 because these are terminal bytes, escape sequences and all, and a\n * server-sent event is a line-oriented text frame that would mangle them.\n */\nexport interface RunnerScreenEvent {\n chunk: string;\n /** Byte offset just past this chunk, so a reconnect resumes rather than replays. */\n offset?: number;\n /** Set once the runner exits, so the page can stop watching. */\n ended?: boolean;\n}\n\n/** A finite byte slice for sealed HTTP followers. Decode chunks incrementally, not independently. */\nexport interface RunnerOutputResponse {\n /** Base64 bytes, preserving split UTF-8 characters and terminal escape sequences. */\n chunk: string;\n offset: number;\n /** The file was replaced or became shorter than the requested offset; discard the previous display/decoder state. */\n reset: boolean;\n /** Opaque raw file identity. Send back on screen/read to detect replacement, including regrowth. */\n generation?: string;\n exists: boolean;\n /** More bytes were present at read time; request the next slice before waiting. */\n hasMore: boolean;\n /** True only once the runner ended and all available bytes have been read. */\n ended: boolean;\n}\n\n/** The body of a keystroke POST. Text, not key codes: the pane wants bytes. */\nexport interface RunnerInputRequest {\n text: string;\n}\n\n/** The named SSE event carrying a RunnerScreenEvent payload. */\n\n/**\n * A log request as query parameters. `grep` is a literal substring, not a\n * regular expression, because that is what the reader matches; `lines` bounds\n * the answer to the last N lines of whatever survived the filter.\n */\nexport interface RunnerLogQueryParams {\n lines?: number;\n grep?: string;\n ignoreCase?: boolean;\n contextLines?: number;\n}\n\n/** The slice the log route answers with, plus which runner it came from. */\nexport interface RunnerLogResponse extends LogSlice {\n runId: string;\n /** True while the runner is still writing, so the page knows following is worth offering. */\n running: boolean;\n}\n\n/**\n * One server-sent event on the follow stream: the lines appended since the last\n * one. The stream never filters: a page that sets a query stops following and\n * reads a filtered slice instead, because grep with context is a whole-file\n * answer and cannot be assembled from a chunk at a time.\n */\nexport interface RunnerLogStreamEvent {\n /** Appended lines, in order; empty when the event only reports the runner ending. */\n lines: string[];\n /**\n * Byte offset just past the last line in this event.\n *\n * A follower that loses the stream resumes here. Without it the page could\n * only fall back to the offset its last slice reported, which every line\n * delivered since has already moved past, so a reconnect would replay them.\n */\n offset?: number;\n /** Set once the runner exits, so the page can stop following without polling the run list. */\n ended?: boolean;\n}\n\n/** The named SSE event carrying a RunnerLogStreamEvent payload. */\n\n/**\n * The named SSE event that carries nothing.\n *\n * A runner can be alive and silent for minutes, which on the wire is\n * indistinguishable from a connection that died. This is sent on a timer so\n * the socket keeps proving itself. Readers that only listen for `append`\n * ignore it, which is what makes it safe to add.\n */\n\n/** Query parameter names, shared so the page and the route cannot drift apart. */\nexport const RUNNER_LOG_PARAMS = {\n lines: 'lines',\n grep: 'grep',\n ignoreCase: 'ignoreCase',\n contextLines: 'contextLines',\n from: 'from',\n generation: 'generation',\n} as const;\n","import type { ApiResponseOf, ApiRoutes } from '@agimon-ai/po-core/web';\n\nimport { RUN_ID_PARAM } from '../constants/webRunnerLog';\nimport { RUNNER_LOG_PARAMS, type RunnerLogResponse, type RunnerOutputResponse } from './webRunnerLog';\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/runner/`, so the mount is\n * stated once, by the folder that creates it. This package stated it four times\n * before, once per URL builder, each of them re-spelling `/plugins/` and the\n * session prefix by hand.\n *\n * The Hono app registers these paths verbatim and the browser addresses them,\n * so a path cannot move on one side alone. `:runId` is Hono's own parameter\n * syntax for that reason; a caller supplies the value as `params`, and the\n * client encodes the segment.\n */\nexport const routes = {\n log: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/log`,\n query: [\n RUNNER_LOG_PARAMS.lines,\n RUNNER_LOG_PARAMS.grep,\n RUNNER_LOG_PARAMS.ignoreCase,\n RUNNER_LOG_PARAMS.contextLines,\n ],\n response: undefined as unknown as ApiResponseOf<RunnerLogResponse>,\n },\n /**\n * The live tail of that same log.\n *\n * `stream: true`, so the client exposes a URL and no call method: the\n * consumer is the browser’s own SSE reader, and a relayed call would\n * buffer a stream that never ends.\n */\n logStream: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/log/stream`,\n query: [RUNNER_LOG_PARAMS.from],\n stream: true,\n },\n /** The unscrubbed pane bytes, for a terminal emulator rather than a reader. */\n screenStream: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/screen/stream`,\n query: [RUNNER_LOG_PARAMS.from],\n stream: true,\n },\n /** Finite byte reads keep sealed HTTP exchanges bounded, unlike SSE. */\n logRead: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/log/read`,\n query: [RUNNER_LOG_PARAMS.from],\n response: undefined as unknown as ApiResponseOf<RunnerOutputResponse>,\n },\n screenRead: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/screen/read`,\n query: [RUNNER_LOG_PARAMS.from, RUNNER_LOG_PARAMS.generation],\n response: undefined as unknown as ApiResponseOf<RunnerOutputResponse>,\n },\n input: {\n method: 'POST',\n path: `/runners/:${RUN_ID_PARAM}/screen/input`,\n },\n} as const satisfies ApiRoutes;\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { createApiClient, sessionApiAddress } from '@agimon-ai/po-core/web';\nimport { browserTransport } from '@agimon-ai/po-web-security/browser';\n\nimport { routes } from '../src/types/apiRoutes';\n\n/** Scopes the tree mounts 'runner' at. */\nexport const apiScopes = ['session'] as const;\n\nexport const api = createApiClient(routes, {\n scopes: apiScopes,\n basePath: 'runner',\n transport: (input, init) => browserTransport.fetch(input, init),\n sessionAddress: sessionApiAddress,\n});\n","import { api } from '../../../../../../generated/client';\nimport { RUN_ID_PARAM, RUNNER_SCREEN_EVENT } from '../../../../../constants/webRunnerLog';\nimport { RUNNER_LOG_PARAMS, type RunnerInputRequest, type RunnerScreenEvent } from '../../../../../types/webRunnerLog';\n\n/**\n * The page's half of the attached pane.\n *\n * Two directions over two mechanisms, because the hub proxies requests and\n * server-sent events but cannot upgrade a socket: pane bytes arrive on an\n * EventSource, and keystrokes go back as ordinary POSTs. Both addresses come\n * from the generated client: the stream route offers a URL and no call method,\n * which is exactly what an EventSource wants and all it can be given.\n */\n\n/** Turns one base64 chunk back into the bytes a terminal was sent. */\nexport function decodeChunk(chunk: string): Uint8Array {\n const binary = atob(chunk);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) bytes[index] = binary.charCodeAt(index);\n return bytes;\n}\n\nexport interface RunnerScreenWatch {\n close(): void;\n}\n\n/** Attempts before a dropped screen stream is reported as lost rather than retried. */\nconst MAX_RETRIES = 5;\nconst RETRY_BASE_MS = 500;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport function watchRunnerScreen(\n sessionId: string,\n runId: string,\n from: number,\n handlers: { onEvent(event: RunnerScreenEvent): void; onLost(): void },\n): RunnerScreenWatch {\n let offset = from;\n let retries = 0;\n let closed = false;\n let source: EventSource | undefined;\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const open = (): void => {\n if (closed) return;\n const current = new EventSource(\n api\n .session(sessionId)\n .screenStream.url({ params: { [RUN_ID_PARAM]: runId }, query: { [RUNNER_LOG_PARAMS.from]: offset } }),\n );\n source = current;\n current.addEventListener(RUNNER_SCREEN_EVENT, (message) => {\n let parsed: unknown;\n try {\n parsed = JSON.parse((message as MessageEvent<string>).data);\n } catch {\n return;\n }\n if (!isRecord(parsed) || typeof parsed.chunk !== 'string') return;\n const event = parsed as unknown as RunnerScreenEvent;\n // Every delivered byte moves the resume point, so a reconnect asks for\n // what comes next rather than repainting everything again.\n if (typeof event.offset === 'number') offset = event.offset;\n retries = 0;\n // The server closes after this one, and a close reaches us as an error.\n if (event.ended === true) {\n closed = true;\n current.close();\n }\n handlers.onEvent(event);\n });\n current.addEventListener('error', () => {\n current.close();\n if (closed) return;\n retries += 1;\n if (retries > MAX_RETRIES) {\n handlers.onLost();\n return;\n }\n timer = setTimeout(open, RETRY_BASE_MS * 2 ** (retries - 1));\n });\n };\n\n open();\n return {\n close: () => {\n closed = true;\n if (timer !== undefined) clearTimeout(timer);\n source?.close();\n },\n };\n}\n\n/** Sends one batch of keystrokes. Resolves to whether the pane took them. */\nexport async function sendRunnerInput(sessionId: string, runId: string, text: string): Promise<boolean> {\n const body: RunnerInputRequest = { text };\n const result = await api.session(sessionId).input({ params: { [RUN_ID_PARAM]: runId }, body });\n return result.ok;\n}\n","import { api } from '../../../../../../generated/client';\nimport { RUN_ID_PARAM, RUNNER_LOG_STREAM_EVENT } from '../../../../../constants/webRunnerLog';\nimport {\n RUNNER_LOG_PARAMS,\n type RunnerLogQueryParams,\n type RunnerLogResponse,\n type RunnerLogStreamEvent,\n} from '../../../../../types/webRunnerLog';\nimport { decodeChunk } from './screenApi';\n\n/**\n * The page's half of this package's log API. The only place the cockpit talks\n * HTTP to the hub for a runner, so if the transport ever changes, it changes\n * here alone.\n *\n * The generated client owns every URL: a route is named, a session id selects\n * that session's own copy of the API, and the run id is a path parameter the\n * client substitutes and encodes. Nothing here spells a mount, a prefix or a\n * proxy parameter, which is what the four deleted URL builders each did by\n * hand.\n */\n\nexport type RunnerLogResult = { slice: RunnerLogResponse } | { error: string };\n\nconst UNREACHABLE = 'The cockpit hub is unreachable.';\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Reads one runner's log: the last N lines, or the lines matching a substring with context. */\nexport async function fetchRunnerLog(\n sessionId: string,\n runId: string,\n params: RunnerLogQueryParams = {},\n signal?: AbortSignal,\n): Promise<RunnerLogResult> {\n const result = await api.session(sessionId).log({\n params: { [RUN_ID_PARAM]: runId },\n // An unset parameter is left out rather than sent empty: the route reads a\n // missing one as its own default, and an empty grep as no filter at all.\n query: {\n [RUNNER_LOG_PARAMS.lines]: params.lines,\n [RUNNER_LOG_PARAMS.grep]: params.grep === '' ? undefined : params.grep,\n [RUNNER_LOG_PARAMS.ignoreCase]: params.ignoreCase === true ? true : undefined,\n [RUNNER_LOG_PARAMS.contextLines]: params.contextLines,\n },\n ...(signal === undefined ? {} : { signal }),\n });\n if (!result.ok) {\n // Status 0 is the transport never answering, which covers both a dead hub\n // and the caller replacing this request. An abort is the caller's own doing\n // and is reported as no answer rather than as a failure to show.\n if (result.status === 0) return { error: signal?.aborted === true ? '' : UNREACHABLE };\n return { error: result.error === '' ? `The hub answered ${String(result.status)}.` : result.error };\n }\n if (!isRecord(result.data) || typeof result.data.text !== 'string') {\n return { error: `The hub answered ${String(result.status)}.` };\n }\n return { slice: result.data };\n}\n\nexport interface RunnerLogFollow {\n close(): void;\n}\n\n/** Attempts before a dropped stream falls back to callable reads. */\nconst MAX_RETRIES = 5;\nconst RETRY_BASE_MS = 500;\nconst POLL_MS = 2_000;\n\n/**\n * Follows a running log from the offset already read, so no line is missed\n * between the slice and the stream. The stream never filters; a page with a\n * query stops following and reads a filtered slice instead.\n *\n * A dropped connection is retried with backoff from the offset the last event\n * reported, not from the offset the page started at, so a reconnect resumes\n * instead of replaying. After retries are exhausted, callable reads take over.\n * A stream that never opened (a host whose stream URL the browser cannot\n * reach) is not retried: callable reads take over at once.\n * The browser's own EventSource retry cannot do this:\n * it reopens the URL it was given, whose offset is stale the moment a line\n * arrives, so each of its reconnects would duplicate everything since.\n */\nexport function followRunnerLog(\n sessionId: string,\n runId: string,\n from: number,\n handlers: { onEvent(event: RunnerLogStreamEvent): void },\n): RunnerLogFollow {\n let offset = from;\n let retries = 0;\n let closed = false;\n let opened = false;\n let source: EventSource | undefined;\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const controller = new AbortController();\n let decoder = new TextDecoder();\n let pending = '';\n\n const deliver = (event: RunnerLogStreamEvent): void => {\n if (closed) return;\n if (typeof event.offset === 'number') offset = event.offset;\n if (event.ended === true) {\n closed = true;\n source?.close();\n }\n handlers.onEvent(event);\n };\n\n // Callable reads use the client transport, including hosts whose stream URL\n // cannot be reached directly by EventSource.\n const poll = async (): Promise<void> => {\n if (closed) return;\n let delay = POLL_MS;\n try {\n const result = await api.session(sessionId).logRead({\n params: { [RUN_ID_PARAM]: runId },\n query: { [RUNNER_LOG_PARAMS.from]: offset },\n signal: controller.signal,\n });\n if (closed || !result.ok) return;\n const read = result.data;\n if (read.reset) {\n decoder = new TextDecoder();\n pending = '';\n }\n pending += decoder.decode(decodeChunk(read.chunk), { stream: !read.ended });\n const lines = pending.split('\\n');\n pending = lines.pop() ?? '';\n if (read.ended && pending !== '') {\n lines.push(pending);\n pending = '';\n }\n deliver({ lines, offset: read.offset, ended: read.ended });\n if (read.hasMore) delay = 0;\n } catch {\n // A failed read leaves the cursor alone and is retried on the next poll.\n } finally {\n if (!closed) timer = setTimeout(() => void poll(), delay);\n }\n };\n\n const open = (): void => {\n if (closed) return;\n let current: EventSource;\n try {\n current = new EventSource(\n api\n .session(sessionId)\n .logStream.url({ params: { [RUN_ID_PARAM]: runId }, query: { [RUNNER_LOG_PARAMS.from]: offset } }),\n );\n } catch {\n void poll();\n return;\n }\n source = current;\n current.addEventListener('open', () => {\n opened = true;\n });\n current.addEventListener(RUNNER_LOG_STREAM_EVENT, (message) => {\n let parsed: unknown;\n try {\n parsed = JSON.parse((message as MessageEvent<string>).data);\n } catch {\n return; // A truncated frame is the next one's problem, not a reason to drop the stream.\n }\n if (!isRecord(parsed) || !Array.isArray(parsed.lines)) return;\n const event = parsed as unknown as RunnerLogStreamEvent;\n opened = true;\n retries = 0;\n // Stand down before the server's final close reaches us as an error.\n deliver(event);\n });\n current.addEventListener('error', () => {\n current.close();\n if (closed) return;\n retries += 1;\n if (!opened || retries > MAX_RETRIES) {\n void poll();\n return;\n }\n timer = setTimeout(open, RETRY_BASE_MS * 2 ** (retries - 1));\n });\n };\n\n open();\n return {\n close: () => {\n closed = true;\n if (timer !== undefined) clearTimeout(timer);\n source?.close();\n controller.abort();\n },\n };\n}\n","import type { TransientTab, WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { AnsiLine, Button, ChevronDownIcon, Input, SearchIcon, StatusBadge } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport type { RunnerLogResponse } from '../../../../../types/webRunnerLog';\nimport type { RunnerRunView } from '../../../../../types/webRunners';\nimport { formatRunnerUptime, isFollowingLive, logViewLines, runnerBadge, tailLineNumbers } from '../_lib/format';\nimport { fetchRunnerLog, followRunnerLog } from '../_lib/logApi';\nimport { requestRunnerStop, runners } from '../_lib/runnersStore';\n\n/** The tab id doubles as the URL segment, so it stays plain and unique across plugins. */\nconst TAB_ID_PREFIX = 'runner-log-';\n/** Lines held in the view; a follow that ran all day must not grow without bound. */\nconst MAX_VIEW_LINES = 2000;\n/** Context lines each side of a match, the same either-side window grep would use. */\nconst CONTEXT_LINES = 2;\n/** A query is typed a character at a time; each one costs a whole-file read on the hub. */\nconst SEARCH_DEBOUNCE_MS = 200;\n/** How close to the bottom still counts as \"at the bottom\" for following. */\nconst NEAR_BOTTOM_PX = 24;\nconst BYTES_PER_KB = 1024;\nconst BYTES_PER_MB = BYTES_PER_KB * BYTES_PER_KB;\n\n/** The temporary tab for one runner's log; the host keeps this panel while the tab is open. */\nexport function runnerLogTab(run: RunnerRunView): TransientTab {\n const runId = run.id;\n return {\n id: `${TAB_ID_PREFIX}${runId}`,\n label: `log · ${run.name}`,\n panel: (props: WebPluginSlotProps) => <RunnerLogPanel {...props} runId={runId} />,\n };\n}\n\nfunction formatSize(bytes: number): string {\n if (bytes < BYTES_PER_KB) return `${bytes} B`;\n if (bytes < BYTES_PER_MB) return `${(bytes / BYTES_PER_KB).toFixed(1)} KB`;\n return `${(bytes / BYTES_PER_MB).toFixed(1)} MB`;\n}\n\n/** Whether one line is a match rather than the context printed around one. */\nfunction isMatch(line: string, needle: string, ignoreCase: boolean): boolean {\n if (needle === '') return false;\n return ignoreCase ? line.toLowerCase().includes(needle.toLowerCase()) : line.includes(needle);\n}\n\n/**\n * One rendered log line: its number, whether it matched, and the text.\n *\n * A row per line rather than one block of joined text. The block form re-parsed\n * every line's escapes whenever a single line arrived, because the parse was\n * keyed on the joined string; keyed by line number instead, an append only\n * costs the line that appended.\n */\nfunction LogRow({\n number,\n line,\n matched,\n dimmed,\n}: {\n number: number | undefined;\n line: string;\n matched: boolean;\n /** Context around a match, printed quieter than the match itself. */\n dimmed: boolean;\n}) {\n return (\n <div data-testid=\"runner-log-row\" data-matched={matched} className=\"flex min-w-0 gap-2\">\n {number === undefined ? null : (\n <span className=\"w-12 shrink-0 select-none text-right font-mono text-sm leading-relaxed text-po-faint\">\n {number}\n </span>\n )}\n <span\n aria-hidden\n className={`w-4 shrink-0 select-none font-mono text-sm leading-relaxed ${matched ? 'text-po-yellow' : 'text-po-faint'}`}\n >\n {matched ? '>>' : ''}\n </span>\n <AnsiLine\n line={line}\n className={`min-w-0 flex-1 whitespace-pre-wrap break-words font-mono text-sm leading-relaxed ${\n dimmed ? 'text-po-dim' : 'text-po-text'\n }`}\n />\n </div>\n );\n}\n\n/**\n * One runner's log: the bounded tail, following while the runner writes, and\n * a grep over the whole file when the reader types a query.\n *\n * Search is not find-next. The reader matches a literal substring and answers\n * with the matching lines and their context, so a query replaces the view\n * rather than moving a cursor through it, and following pauses while one is\n * set because a filtered view is a snapshot of a file that is still growing.\n */\nexport function RunnerLogPanel({\n sessionId,\n runId,\n sendSessionFrame,\n onTerminal,\n}: WebPluginSlotProps & {\n runId: string;\n /** Returns an embedded view to the runner's live terminal; absent for a runner without one. */\n onTerminal?: () => void;\n}) {\n const { runs, stopRequested } = useStore(runners.store, (state) => runners.select(state, sessionId));\n const run = runs.find((candidate) => candidate.id === runId);\n const [typed, setTyped] = useState('');\n const [query, setQuery] = useState('');\n const [ignoreCase, setIgnoreCase] = useState(false);\n const [context, setContext] = useState(CONTEXT_LINES);\n const [following, setFollowing] = useState(true);\n const [slice, setSlice] = useState<RunnerLogResponse | undefined>(undefined);\n const [streamFrom, setStreamFrom] = useState<number | undefined>(undefined);\n const [appended, setAppended] = useState<string[]>([]);\n /** How far the stream has read, so the size shown grows with the lines instead of staying at the first read. */\n const [followedBytes, setFollowedBytes] = useState(0);\n const [error, setError] = useState<string | undefined>(undefined);\n /** False once the reader scrolls up: following must not yank them back down. */\n const [pinned, setPinned] = useState(true);\n /** A long command would eat a phone screen, so it starts as one truncated line. */\n const [commandOpen, setCommandOpen] = useState(false);\n const bottom = useRef<HTMLDivElement | null>(null);\n const body = useRef<HTMLDivElement | null>(null);\n\n const filtering = query !== '';\n const live = isFollowingLive(following, filtering, slice?.running === true);\n\n // Typing is not a question yet. Reading the log costs a whole-file scan on\n // the hub, so the question is asked once the reader stops typing.\n useEffect(() => {\n const timer = setTimeout(() => setQuery(typed), SEARCH_DEBOUNCE_MS);\n return () => clearTimeout(timer);\n }, [typed]);\n\n const load = useCallback(\n (signal: AbortSignal) => {\n if (sessionId === null) return;\n const params = filtering ? { grep: query, ignoreCase, contextLines: context } : {};\n void fetchRunnerLog(sessionId, runId, params, signal).then((result) => {\n if (signal.aborted) return;\n if ('error' in result) {\n if (result.error !== '') setError(result.error);\n return;\n }\n setError(undefined);\n setAppended([]);\n setFollowedBytes(0);\n setSlice(result.slice);\n setStreamFrom(result.slice.completeBytes);\n });\n },\n [sessionId, runId, filtering, query, ignoreCase, context],\n );\n\n // Re-read whenever the question changes. A query is debounced above, so the\n // in-flight request for the previous one is abandoned only on a real change.\n useEffect(() => {\n const controller = new AbortController();\n load(controller.signal);\n return () => controller.abort();\n }, [load]);\n\n // Keyed on the offset rather than the slice object: a re-read that lands on\n // the same place must not tear down a healthy stream and reopen it.\n useEffect(() => {\n if (!live || sessionId === null || streamFrom === undefined) return;\n const follow = followRunnerLog(sessionId, runId, streamFrom, {\n onEvent: (event) => {\n if (event.lines.length > 0) {\n setAppended((current) => [...current, ...event.lines].slice(-MAX_VIEW_LINES));\n }\n if (typeof event.offset === 'number') setFollowedBytes(event.offset);\n if (event.ended === true) setFollowing(false);\n },\n });\n return () => follow.close();\n }, [live, sessionId, runId, streamFrom]);\n\n // A slice read mid-line ends in a fragment the stream will send again whole.\n const partialTail = slice !== undefined && slice.exists && slice.completeBytes < slice.fileSize;\n const view = logViewLines(slice?.text ?? '', appended, MAX_VIEW_LINES, { dropPartialTail: live && partialTail });\n const numbers = useMemo(() => {\n if (slice === undefined) return [];\n if (filtering) return slice.lineNumbers ?? [];\n const last = slice.totalLines + appended.length - (live && partialTail ? 1 : 0);\n return tailLineNumbers(last, view.lines.length);\n }, [slice, filtering, appended.length, live, partialTail, view.lines.length]);\n\n useEffect(() => {\n if (live && pinned) bottom.current?.scrollIntoView({ block: 'end' });\n }, [live, pinned, view.lines.length]);\n\n // Following is a promise to show the newest line, not a promise to drag the\n // reader there. Scrolling up is how they say they are reading something else.\n const onScroll = (): void => {\n const element = body.current;\n if (element === null) return;\n setPinned(element.scrollHeight - element.scrollTop - element.clientHeight <= NEAR_BOTTOM_PX);\n };\n\n const badge = runnerBadge(run);\n const stopping = run !== undefined && stopRequested.includes(run.id);\n\n return (\n <div data-testid=\"runner-log-panel\" className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"flex min-h-11 shrink-0 flex-wrap items-center gap-2 border-b border-po-border-soft px-3 py-2 sm:h-11 sm:flex-nowrap sm:gap-2.5 sm:px-[26px] sm:py-0\">\n <span data-testid=\"runner-log-name\" className=\"shrink-0 truncate text-base font-semibold text-po-hi\">\n {run?.name ?? runId}\n </span>\n <StatusBadge tone={badge.tone} size=\"md\" data-testid=\"runner-log-state\">\n {badge.label}\n </StatusBadge>\n {run ? (\n <>\n <RunnerUptime run={run} />\n <span className=\"shrink-0 text-sm text-po-dim\">\n {`pid ${String(run.pid)} · ${run.backend}${run.interactive ? ' · tty' : ''}`}\n </span>\n </>\n ) : (\n <span data-testid=\"runner-log-gone\" className=\"text-sm text-po-dim\">\n no longer listed; its log stays readable\n </span>\n )}\n <span className=\"min-w-0 flex-1\" />\n {onTerminal ? (\n <Button variant=\"outline\" size=\"sm\" data-testid=\"runner-log-terminal\" onClick={onTerminal}>\n Back to terminal\n </Button>\n ) : null}\n {run !== undefined && run.state === 'running' && sessionId !== null ? (\n <Button\n variant={stopping ? 'outline' : 'danger-outline'}\n size=\"sm\"\n data-testid=\"runner-log-stop\"\n disabled={stopping}\n title={stopping ? 'stop requested; the runner reports its own exit' : 'ask the runtime to stop this runner'}\n onClick={() => requestRunnerStop(sendSessionFrame, sessionId, run.id)}\n >\n {stopping ? 'Stopping…' : 'Stop'}\n </Button>\n ) : null}\n </div>\n\n {run ? (\n <div className=\"shrink-0 border-b border-po-border-soft px-3 py-3 sm:px-[26px]\">\n <div className=\"flex items-start gap-2 rounded-md bg-po-deep px-3 py-2\">\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span\n data-testid=\"runner-log-command\"\n title={commandOpen ? undefined : `${run.command}\\nin ${run.cwd}`}\n className={`font-mono text-base text-po-hi ${commandOpen ? 'break-all' : 'truncate'}`}\n >\n <span aria-hidden className=\"select-none text-po-faint\">\n ${' '}\n </span>\n {run.command}\n </span>\n {commandOpen ? <span className=\"break-all font-mono text-sm text-po-dim\">in {run.cwd}</span> : null}\n </div>\n <button\n type=\"button\"\n data-testid=\"runner-log-command-toggle\"\n aria-expanded={commandOpen}\n aria-label={commandOpen ? 'Collapse command' : 'Expand command'}\n className=\"flex size-6 shrink-0 items-center justify-center rounded text-po-faint hover:text-po-hi\"\n onClick={() => setCommandOpen((open) => !open)}\n >\n <ChevronDownIcon className={`size-4 transition-transform ${commandOpen ? 'rotate-180' : ''}`} />\n </button>\n </div>\n </div>\n ) : null}\n\n <div className=\"flex min-h-11 shrink-0 flex-wrap items-center gap-2 border-b border-po-border-soft px-3 py-2 sm:flex-nowrap sm:gap-2.5 sm:px-[26px]\">\n <span className=\"relative flex min-w-0 flex-1 items-center sm:w-72 sm:flex-none\">\n <SearchIcon className=\"pointer-events-none absolute left-2.5 h-3.5 w-3.5 text-po-faint\" />\n <Input\n size=\"md\"\n data-testid=\"runner-log-search\"\n value={typed}\n placeholder=\"Search output\"\n onChange={(event) => setTyped(event.target.value)}\n className=\"w-full pl-8\"\n />\n </span>\n <Button\n variant={ignoreCase ? 'subtle' : 'outline'}\n size=\"sm\"\n data-testid=\"runner-log-ignore-case\"\n aria-pressed={ignoreCase}\n title=\"match regardless of case\"\n onClick={() => setIgnoreCase((current) => !current)}\n >\n {ignoreCase ? 'Any case' : 'Match case'}\n </Button>\n <Button\n variant={context > 0 && filtering ? 'subtle' : 'outline'}\n size=\"sm\"\n data-testid=\"runner-log-context\"\n disabled={!filtering}\n title=\"lines of context kept either side of a match\"\n onClick={() => setContext((current) => (current === 0 ? CONTEXT_LINES : 0))}\n >\n {`± ${String(context)} lines`}\n </Button>\n <span className=\"min-w-0 flex-1\" />\n <span data-testid=\"runner-log-stats\" className=\"min-w-0 basis-full truncate text-sm text-po-dim sm:basis-auto\">\n {slice === undefined\n ? 'reading…'\n : filtering\n ? `${String(slice.lineCount)} matching of ${slice.totalLines.toLocaleString('en-US')} lines`\n : `${live ? 'tailing' : 'showing'} last ${String(view.lines.length)} of ${(slice.totalLines + (live ? appended.length : 0)).toLocaleString('en-US')} lines`}\n {view.hidden > 0 ? ` · ${view.hidden.toLocaleString('en-US')} older hidden` : ''}\n </span>\n <Button\n variant={live ? 'subtle' : 'outline'}\n size=\"sm\"\n data-testid=\"runner-log-follow\"\n aria-pressed={live}\n disabled={filtering || slice?.running !== true}\n title={filtering ? 'a filtered view is a snapshot; clear the query to follow' : 'follow the log as it grows'}\n onClick={() => setFollowing((current) => !current)}\n >\n {filtering ? 'Paused while searching' : live ? 'Following' : 'Follow'}\n </Button>\n </div>\n\n <div className=\"relative min-h-0 flex-1\">\n <div\n ref={body}\n onScroll={onScroll}\n data-testid=\"runner-log-body\"\n className=\"h-full overflow-auto bg-po-deep px-3 py-3 sm:px-[26px]\"\n >\n {error !== undefined ? (\n <p data-testid=\"runner-log-error\" className=\"text-sm text-po-red\">\n {error}\n </p>\n ) : slice === undefined ? (\n <p data-testid=\"runner-log-reading\" className=\"text-sm text-po-dim\">\n reading…\n </p>\n ) : slice.exists === false ? (\n <p className=\"text-sm text-po-dim\">This runner has not printed anything yet.</p>\n ) : view.lines.length === 0 ? (\n <p className=\"text-sm text-po-dim\">{filtering ? 'Nothing matched.' : 'The log is empty.'}</p>\n ) : (\n view.lines.map((line, index) => {\n const number = numbers[index];\n const previous = numbers[index - 1];\n const gap = previous !== undefined && number !== undefined && number - previous > 1;\n return (\n <Fragment key={number ?? `row-${String(index)}`}>\n {gap ? (\n <div\n data-testid=\"runner-log-gap\"\n aria-hidden\n className=\"select-none py-0.5 pl-14 text-sm leading-relaxed text-po-faint\"\n >\n ⋯\n </div>\n ) : null}\n <LogRow\n number={number}\n line={line}\n matched={filtering && isMatch(line, query, ignoreCase)}\n dimmed={filtering && !isMatch(line, query, ignoreCase)}\n />\n </Fragment>\n );\n })\n )}\n <div ref={bottom} />\n </div>\n {live && !pinned ? (\n <Button\n variant=\"subtle\"\n size=\"sm\"\n data-testid=\"runner-log-jump\"\n title=\"scroll back to the newest lines and keep following\"\n onClick={() => {\n setPinned(true);\n bottom.current?.scrollIntoView({ block: 'end' });\n }}\n className=\"absolute bottom-3 right-3\"\n >\n Jump to latest\n </Button>\n ) : null}\n </div>\n\n <div className=\"flex h-8 shrink-0 items-center gap-2.5 border-t border-po-border-soft px-3 sm:px-[26px]\">\n <span data-testid=\"runner-log-path\" className=\"min-w-0 flex-1 truncate font-mono text-sm text-po-dim\">\n {run?.logPath ?? slice?.path ?? ''}\n </span>\n {slice !== undefined ? (\n <span className=\"shrink-0 text-sm text-po-dim\">{formatSize(Math.max(slice.fileSize, followedBytes))}</span>\n ) : null}\n </div>\n </div>\n );\n}\n\n/** Seconds below a minute, then minutes, hours and days, without rendering the log or activity panel. */\nexport function RunnerUptime({ run }: { run: RunnerRunView }) {\n const ref = useRef<HTMLSpanElement>(null);\n const [mountedAt] = useState(Date.now);\n useEffect(() => {\n if (run.exit || run.state !== 'running') return;\n const update = () => {\n const node = ref.current?.firstChild;\n if (node) node.nodeValue = formatRunnerUptime(run.startedAt, Date.now());\n };\n update();\n const timer = setInterval(update, 1_000);\n return () => clearInterval(timer);\n }, [run.startedAt, run.state, run.exit]);\n return (\n <span ref={ref} className=\"shrink-0 text-sm text-po-dim\">\n {formatRunnerUptime(run.startedAt, run.exit ? Date.parse(run.exit.finishedAt) : mountedAt)}\n </span>\n );\n}\n","import type { TransientTab, WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { Button, SearchIcon, StatusBadge, type TerminalHandle, TerminalView } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { RunnerRunView } from '../../../../../types/webRunners';\nimport { requestRunnerStop, runners } from '../_lib/runnersStore';\nimport { decodeChunk, sendRunnerInput, watchRunnerScreen } from '../_lib/screenApi';\nimport { runnerLogTab } from './RunnerLogPanel';\n\nconst TAB_ID_PREFIX = 'runner-shell-';\n/** Keystrokes are gathered for this long and sent as one request. */\nconst FLUSH_MS = 30;\n\n/** The temporary tab holding one interactive runner's pane. */\nexport function runnerShellTab(run: RunnerRunView): TransientTab {\n const runId = run.id;\n return {\n id: `${TAB_ID_PREFIX}${runId}`,\n label: `shell · ${run.name}`,\n panel: (props: WebPluginSlotProps) => <RunnerShellPanel {...props} runId={runId} />,\n };\n}\n\n/**\n * An interactive runner's pane, attached.\n *\n * A real terminal emulator, fed the pane's own bytes. The runner's sink keeps\n * an unscrubbed copy of its output beside the log for exactly this: the log is\n * stripped of cursor movement so it stays worth grepping, which is precisely\n * what a terminal needs. Because these are the original bytes, colour, cursor\n * placement and full-screen programs all render the way they would in a shell.\n *\n * xterm is loaded when the tab opens rather than with the plugin. Most sessions\n * never attach to anything, and an emulator is not a small thing to carry.\n *\n * Search reads the scrubbed log the sink writes beside the raw bytes, so it\n * hands over to the log view: `onSearch` when the panel is embedded, the\n * runner's log tab otherwise.\n */\nexport function RunnerShellPanel({\n sessionId,\n runId,\n sendSessionFrame,\n openTransientTab,\n onSearch,\n}: WebPluginSlotProps & { runId: string; onSearch?: () => void }) {\n const { runs, stopRequested } = useStore(runners.store, (state) => runners.select(state, sessionId));\n const run = runs.find((candidate) => candidate.id === runId);\n const [ended, setEnded] = useState(false);\n const [lost, setLost] = useState(false);\n const [ready, setReady] = useState(false);\n const terminal = useRef<TerminalHandle | null>(null);\n const pending = useRef<string[]>([]);\n const flush = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n useEffect(() => {\n if (sessionId === null || !ready) return;\n const watch = watchRunnerScreen(sessionId, runId, 0, {\n onEvent: (event) => {\n if (event.chunk !== '') terminal.current?.write(decodeChunk(event.chunk));\n if (event.ended === true) setEnded(true);\n },\n onLost: () => setLost(true),\n });\n return () => watch.close();\n }, [sessionId, runId, ready]);\n\n useEffect(\n () => () => {\n if (flush.current !== undefined) clearTimeout(flush.current);\n },\n [],\n );\n\n // Batched: a burst of typing is one request rather than one per character,\n // and the pane sees the keys in the order they were pressed either way.\n const send = (text: string): void => {\n if (sessionId === null) return;\n pending.current.push(text);\n if (flush.current !== undefined) return;\n flush.current = setTimeout(() => {\n const batch = pending.current.join('');\n pending.current = [];\n flush.current = undefined;\n if (batch !== '') void sendRunnerInput(sessionId, runId, batch);\n }, FLUSH_MS);\n };\n\n const live = run?.state === 'running' && !ended;\n const stopping = stopRequested.includes(runId);\n\n return (\n <div data-testid=\"runner-shell-panel\" className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"flex min-h-11 shrink-0 flex-wrap items-center gap-2 border-b border-po-border-soft px-3 py-2 sm:flex-nowrap sm:gap-2.5 sm:px-[26px] sm:py-1.5\">\n <span data-testid=\"runner-shell-name\" className=\"shrink-0 truncate text-base font-semibold text-po-hi\">\n {run?.name ?? runId}\n </span>\n <StatusBadge tone={live ? 'running' : 'neutral'} size=\"md\" data-testid=\"runner-shell-state\">\n {live ? 'Running' : 'Ended'}\n </StatusBadge>\n {run ? <span className=\"min-w-0 truncate font-mono text-sm text-po-dim\">{run.command}</span> : null}\n <span className=\"min-w-0 flex-1\" />\n {lost ? (\n <span data-testid=\"runner-shell-lost\" className=\"shrink-0 text-sm text-po-red\">\n The connection to this terminal dropped. Reopen the runner to attach again.\n </span>\n ) : null}\n {run ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n data-testid=\"runner-shell-search\"\n title=\"search everything this runner has printed\"\n onClick={() => (onSearch ? onSearch() : openTransientTab(runnerLogTab(run)))}\n className=\"gap-1.5\"\n >\n <SearchIcon className=\"h-3.5 w-3.5\" />\n Search output\n </Button>\n ) : null}\n {live ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n data-testid=\"runner-shell-interrupt\"\n title=\"send ctrl-c\"\n onClick={() => send('\\u0003')}\n >\n Ctrl-C\n </Button>\n ) : null}\n {live && sessionId !== null ? (\n <Button\n variant={stopping ? 'outline' : 'danger-outline'}\n size=\"sm\"\n data-testid=\"runner-shell-stop\"\n disabled={stopping}\n title={stopping ? 'stop requested; the runner reports its own exit' : 'ask the runtime to stop this runner'}\n onClick={() => requestRunnerStop(sendSessionFrame, sessionId, runId)}\n >\n {stopping ? 'Stopping…' : 'Stop'}\n </Button>\n ) : null}\n </div>\n\n <div className=\"relative min-h-0 flex-1 overflow-hidden bg-po-deep px-3 py-2 sm:px-[26px]\">\n <TerminalView\n ref={terminal}\n data-testid=\"runner-shell-terminal\"\n onData={(text) => send(text)}\n onReady={() => setReady(true)}\n />\n {ready ? null : (\n <p data-testid=\"runner-shell-reading\" className=\"text-sm text-po-dim\">\n attaching…\n </p>\n )}\n </div>\n\n <div className=\"flex h-8 shrink-0 items-center border-t border-po-border-soft px-3 sm:px-[26px]\">\n <span className=\"min-w-0 flex-1 truncate text-sm text-po-dim\">\n {live\n ? `Typing goes straight to ${run?.name ?? 'the runner'}. Ctrl-C stops what is running.`\n : 'This runner has ended. Its output stays searchable.'}\n </span>\n </div>\n </div>\n );\n}\n","import type { TransientTab, WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { Button, Dot, EmptyState } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { runnerRunRequest } from '../_lib/launchLine';\nimport { requestRunnerStart, runners } from '../_lib/runnersStore';\nimport { RunnerCommandBar } from './RunnerCommandBar';\nimport { RunnerLogPanel } from './RunnerLogPanel';\nimport { RunnerShellPanel } from './RunnerShellPanel';\n\nconst LAUNCH_TIMEOUT_MS = 30_000;\nconst RUNNERS_TAB_ID = 'runner-runs';\n\n/** The temporary tab the dock's runners group opens from its own name. */\nexport function runnersTab(): TransientTab {\n return { id: RUNNERS_TAB_ID, label: 'runners', panel: RunnersPanel };\n}\n\n/**\n * Everything this session has up, and the one place to start another.\n *\n * A runner is a shell: the bar takes a command and runs it on its own\n * terminal, or opens a plain shell when nothing was typed. The selected\n * runner is shown in place, as its terminal when it has one and as its log\n * when it does not (a command the agent backgrounded has no pane).\n *\n * Running runners only, the same rule the rail follows. A finished run leaves\n * the moment it exits; its log stays readable from the tool message that\n * started it, and `po-runner list` is where history lives.\n */\nexport function RunnersPanel(props: WebPluginSlotProps) {\n const { sessionId, sendSessionFrame } = props;\n const session = useStore(runners.store, (state) => runners.select(state, sessionId));\n const running = session.runs.filter((run) => run.state === 'running');\n const [command, setCommand] = useState('');\n const [cwd, setCwd] = useState('');\n const [selectedId, setSelectedId] = useState<string | undefined>(undefined);\n /** The terminal runner whose log is being searched instead of shown live. */\n const [searchingId, setSearchingId] = useState<string | undefined>(undefined);\n const launchBaseline = useRef<ReadonlySet<string> | null>(null);\n /** What the pending launch ran, put back if the start fails. */\n const launchedCommand = useRef('');\n const launchTimeout = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n const selected = running.find((run) => run.id === selectedId) ?? running[0];\n\n const launch = (): void => {\n if (sessionId === null) return;\n launchBaseline.current = new Set(session.runs.map((run) => run.id));\n clearTimeout(launchTimeout.current);\n launchTimeout.current = setTimeout(() => {\n launchBaseline.current = null;\n }, LAUNCH_TIMEOUT_MS);\n requestRunnerStart(sendSessionFrame, sessionId, runnerRunRequest(command, cwd));\n launchedCommand.current = command;\n setCommand('');\n };\n\n // ponytail: the first runner to appear after a launch is taken to be it. One\n // the agent starts in the same moment could be picked instead; matching on a\n // request id would need the start line to carry one.\n useEffect(() => {\n const baseline = launchBaseline.current;\n if (baseline === null) return;\n const started = session.runs.find((run) => run.state === 'running' && !baseline.has(run.id));\n if (!started) return;\n launchBaseline.current = null;\n clearTimeout(launchTimeout.current);\n setSelectedId(started.id);\n }, [session.runs]);\n\n // A start that did not happen hands the command back beside its problem.\n const failureId = session.startFailure?.id;\n useEffect(() => {\n if (failureId === undefined || launchBaseline.current === null) return;\n launchBaseline.current = null;\n clearTimeout(launchTimeout.current);\n setCommand(launchedCommand.current);\n }, [failureId]);\n\n useEffect(() => () => clearTimeout(launchTimeout.current), []);\n\n return (\n <div data-testid=\"runners-panel\" className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"flex h-11 shrink-0 items-center gap-2.5 border-b border-po-border-soft px-3 sm:px-[26px]\">\n <span className=\"text-lg font-semibold text-po-hi\">Runners</span>\n <span data-testid=\"runners-panel-count\" className=\"text-sm text-po-dim\">\n {running.length === 0 ? 'Nothing running' : `${String(running.length)} running`}\n </span>\n </div>\n\n {sessionId === null ? null : (\n <RunnerCommandBar\n command={command}\n onCommandChange={setCommand}\n cwd={cwd}\n onCwdChange={setCwd}\n folders={running.map((run) => run.cwd)}\n {...(session.sessionDirectory === undefined ? {} : { sessionDirectory: session.sessionDirectory })}\n {...(session.startFailure === undefined ? {} : { problem: session.startFailure.message })}\n onLaunch={launch}\n />\n )}\n\n {selected === undefined ? (\n <EmptyState\n data-testid=\"runners-panel-empty\"\n className=\"px-4 py-8\"\n title=\"Nothing running yet\"\n description={\n sessionId === null\n ? 'Open a session to start a runner.'\n : 'Type a command above, like pnpm dev, and it opens here as a live terminal.'\n }\n />\n ) : (\n <>\n <div data-testid=\"runners-panel-picker\" className=\"flex shrink-0 flex-wrap gap-1.5 px-3 pt-3 sm:px-[26px]\">\n {running.map((run) => (\n <Button\n key={run.id}\n variant={run === selected ? 'subtle' : 'ghost'}\n size=\"sm\"\n data-testid={`runners-panel-pick-${run.id}`}\n aria-pressed={run === selected}\n title={run.command}\n onClick={() => setSelectedId(run.id)}\n className={`gap-1.5 ${run === selected ? 'text-po-hi' : ''}`}\n >\n <Dot tone=\"yellow\" pulse />\n {run.name}\n </Button>\n ))}\n </div>\n <div className=\"mt-3 flex min-h-0 flex-1 flex-col border-t border-po-border-soft\">\n {selected.interactive && searchingId !== selected.id ? (\n <RunnerShellPanel\n key={selected.id}\n {...props}\n runId={selected.id}\n onSearch={() => setSearchingId(selected.id)}\n />\n ) : (\n <RunnerLogPanel\n key={selected.id}\n {...props}\n runId={selected.id}\n {...(selected.interactive ? { onTerminal: () => setSearchingId(undefined) } : {})}\n />\n )}\n </div>\n </>\n )}\n </div>\n );\n}\n","import { defineActivityGroup } from '@agimon-ai/po-core/web';\nimport { PlayCircleIcon } from '@agimon-ai/po-web-components';\n\nimport { runnersTab } from '../_components/RunnersPanel';\nimport { runnerActivitySource } from '../_lib/runnersStore';\nexport default defineActivityGroup({\n keys: 'r l',\n icon: PlayCircleIcon,\n activeSource: runnerActivitySource,\n transientTab: runnersTab,\n order: 20,\n});\n","import { defineChannelFile } from '@agimon-ai/po-core/web';\n\nimport { runnerRunsChannel } from '../_lib/runnersStore';\nexport default defineChannelFile(runnerRunsChannel);\n","import { ansiSpans } from '@agimon-ai/po-web-components';\nimport { useEffect, useState } from 'react';\n\nimport { fetchRunnerLog, followRunnerLog, type RunnerLogFollow } from '../_lib/logApi';\n\n/**\n * The newest line a running runner has written, for a row that has one line to\n * spend.\n *\n * The dock answers \"what is happening\", and a command that has not changed\n * since it started answers \"what was asked\". The last line of the log is the\n * closest thing to progress the cockpit can show without opening the log, so a\n * row that is still running trades its command for it.\n *\n * The line comes from the same two calls the log panel makes: read the tail,\n * then follow the stream from exactly where that read ended. Nothing new goes\n * on the wire, and a runner nobody is looking at is not followed, because the\n * stream lives and dies with the row.\n */\n\n/** Enough lines that a trailing blank, or a final progress redraw, is not the whole answer. */\nconst TAIL_REQUEST_LINES = 5;\n\n/**\n * The last line worth showing, as plain text.\n *\n * Blank lines are skipped, because a log that ends with a newline would\n * otherwise report nothing at all. Colour is dropped rather than rendered: the\n * row is nine pixels of faint text beside a name and a stop control, and a\n * green tick from someone else's palette in the middle of it reads as damage.\n */\nexport function plainTailLine(lines: readonly string[]): string | undefined {\n for (let index = lines.length - 1; index >= 0; index -= 1) {\n const text = ansiSpans(lines[index] ?? '')\n .map((span) => span.text)\n .join('')\n .trim();\n if (text.length > 0) return text;\n }\n return undefined;\n}\n\n/**\n * The newest log line of a running runner, or undefined for a runner that is\n * finished, unreachable, or has not written anything yet. The caller decides\n * what to show instead; this hook never invents a placeholder.\n */\nexport function useRunnerTail(sessionId: string | null, runId: string, running: boolean): string | undefined {\n // Kept with the run it belongs to, so a row that is reused for another\n // runner shows nothing rather than the previous runner's output.\n const [tail, setTail] = useState<{ runId: string; text: string } | undefined>(undefined);\n\n useEffect(() => {\n if (!running || sessionId === null) return;\n let live = true;\n let follow: RunnerLogFollow | undefined;\n const controller = new AbortController();\n void fetchRunnerLog(sessionId, runId, { lines: TAIL_REQUEST_LINES }, controller.signal).then((result) => {\n // A log the hub cannot serve leaves the row on its command, which is\n // still true; the log tab is where an unreachable runner is diagnosed.\n if (!live || 'error' in result) return;\n const initial = plainTailLine(result.slice.text.split('\\n'));\n if (initial !== undefined) setTail({ runId, text: initial });\n if (!result.slice.running) return;\n follow = followRunnerLog(sessionId, runId, result.slice.completeBytes, {\n onEvent: (event) => {\n const next = plainTailLine(event.lines);\n if (live && next !== undefined) setTail({ runId, text: next });\n },\n });\n });\n return () => {\n live = false;\n controller.abort();\n follow?.close();\n };\n }, [sessionId, runId, running]);\n\n return running && tail?.runId === runId ? tail.text : undefined;\n}\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { ArrowRightIcon, Button, Dot } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useSyncExternalStore } from 'react';\n\nimport type { RunnerRunView } from '../../../../../../types/webRunners';\nimport { runnerLogTab, RunnerUptime } from '../../_components/RunnerLogPanel';\nimport { runnersTab } from '../../_components/RunnersPanel';\nimport { useRunnerTail } from '../../_components/runnerTail';\nimport { isRunnerActivityVisible, requestRunnerStop, runnerActivitySource, runners } from '../../_lib/runnersStore';\n\n/**\n * The runners group's body in the activity dock: what this session has up\n * right now.\n *\n * Only runners running for more than three seconds are listed. A finished one leaves the moment it exits,\n * because the dock answers \"what is happening\", and a rail that keeps ten\n * completed playwright calls around buries the one command still working. The\n * runtime keeps every record; `po-runner list` and the run's own log tab are\n * where a finished run is read.\n */\nexport function RunnersActivitySection({ sessionId, sendSessionFrame, openTransientTab }: WebPluginSlotProps) {\n const session = useStore(runners.store, (state) => runners.select(state, sessionId));\n const visibleCount = () => session.runs.filter((run) => isRunnerActivityVisible(run)).length;\n useSyncExternalStore(runnerActivitySource.subscribe, visibleCount, visibleCount);\n const running = session.runs.filter((run) => isRunnerActivityVisible(run));\n\n if (running.length === 0) {\n return (\n <div className=\"flex flex-wrap items-center gap-x-4 gap-y-1\">\n <p data-testid=\"activity-summary-runners\" className=\"text-sm text-po-dim\">\n Idle\n </p>\n {sessionId === null ? null : (\n <Button\n variant=\"link\"\n size=\"sm\"\n data-testid=\"activity-runner-launch\"\n className=\"h-auto gap-1 px-0 text-po-green\"\n onClick={() => openTransientTab(runnersTab())}\n >\n Launch a runner\n <ArrowRightIcon aria-hidden className=\"size-3.5\" />\n </Button>\n )}\n </div>\n );\n }\n\n return (\n <div data-testid=\"activity-runner-runs\" className=\"flex flex-col gap-0.5\">\n {running.map((run: RunnerRunView) => (\n <RunnerRow\n key={run.id}\n run={run}\n stopRequested={session.stopRequested.includes(run.id)}\n sessionId={sessionId}\n sendSessionFrame={sendSessionFrame}\n openTransientTab={openTransientTab}\n />\n ))}\n </div>\n );\n}\n\n/**\n * One running runner: its name, how long it has been up, a stop control, and\n * one line of what it is doing. Its own component because the tail line is a\n * subscription per row, and a row that scrolls out of the dock closes it.\n */\nfunction RunnerRow({\n run,\n stopRequested,\n sessionId,\n sendSessionFrame,\n openTransientTab,\n}: {\n run: RunnerRunView;\n stopRequested: boolean;\n} & Pick<WebPluginSlotProps, 'sessionId' | 'sendSessionFrame' | 'openTransientTab'>) {\n const tail = useRunnerTail(sessionId, run.id, run.state === 'running');\n return (\n <Button\n variant=\"ghost\"\n size=\"card\"\n data-testid={`activity-runner-${run.id}`}\n data-runner-tone=\"running\"\n title=\"open this runner's log\"\n onClick={() => {\n if (sessionId === null) return;\n openTransientTab(runnerLogTab(run));\n }}\n className=\"min-w-0 gap-0.5 rounded-md px-1 py-1 hover:bg-po-panel\"\n >\n <span className=\"flex min-w-0 items-center gap-1.5\">\n <Dot tone=\"yellow\" pulse />\n <span className=\"min-w-0 flex-1 truncate text-left text-base font-semibold text-po-hi\">{run.name}</span>\n <span className=\"shrink-0 text-sm text-po-dim\">\n <RunnerUptime run={run} />\n {run.interactive ? ' · tty' : ''}\n </span>\n {sessionId !== null ? (\n <Button\n asChild\n variant={stopRequested ? 'outline' : 'danger-outline'}\n size=\"xs\"\n data-testid={`activity-runner-stop-${run.id}`}\n data-stopping={stopRequested}\n title={\n stopRequested ? 'stop requested; the runner reports its own exit' : 'ask the runtime to stop this runner'\n }\n className=\"px-1.5\"\n >\n {/* The row is already a button, so the stop control lends it\n the primitive's styling rather than nesting a second one. */}\n <span\n role=\"button\"\n tabIndex={stopRequested ? -1 : 0}\n aria-disabled={stopRequested}\n onClick={(event) => {\n event.stopPropagation();\n if (!stopRequested) requestRunnerStop(sendSessionFrame, sessionId, run.id);\n }}\n onKeyDown={(event) => {\n if (event.key !== 'Enter' && event.key !== ' ') return;\n event.preventDefault();\n event.stopPropagation();\n if (!stopRequested) requestRunnerStop(sendSessionFrame, sessionId, run.id);\n }}\n >\n {stopRequested ? 'stopping…' : 'stop'}\n </span>\n </Button>\n ) : null}\n </span>\n {/* What it is doing, falling back to what it was asked to do until the\n first line of output arrives. */}\n <span\n data-testid={`activity-runner-detail-${run.id}`}\n data-detail={tail === undefined ? 'command' : 'tail'}\n className=\"truncate pl-3 text-left text-sm text-po-dim\"\n >\n {tail ?? run.command}\n </span>\n </Button>\n );\n}\n","import { defineFill } from '@agimon-ai/po-core/web';\n\nimport { RunnersActivitySection } from './_components/RunnersActivitySection';\nexport default defineFill({ component: RunnersActivitySection });\n","/**\n * Pure view logic for the bash tool card, shared by the web and native halves.\n * Every input is the wire JSON of a tool_execution frame.\n */\n\nimport type { RunnerRunView } from '../../../../../../types/webRunners';\n\nconst ELLIPSIS = '…';\n/** Spaced so the join never glues two words into one unreadable token. */\nconst GAP = ' … ';\n/** Wide enough to keep a realistic command intact, short enough to stay on a few rows. */\nconst MAX_COMMAND_LENGTH = 160;\n/** Lines of log kept in the collapsed result, before the card is expanded. */\nconst COLLAPSED_TAIL_LINES = 12;\n/** Live output is unbounded while a command runs, so the running state keeps only a window. */\nconst STREAM_TAIL_LINES = 12;\nconst BYTES_PER_KB = 1024;\nconst BYTES_PER_MB = BYTES_PER_KB * BYTES_PER_KB;\n/** The user's home on the two platforms the runner ships for; the browser cannot ask the OS. */\nconst HOME_PATH = /(?<![\\w.-])(?:\\/Users|\\/home)\\/[^/\\s]+(?=\\/|\\s|$)/g;\n\n/** The bash tool's arguments as the frame carries them (src/schemas/bashTool.ts). */\nexport interface BashCallArgs {\n command?: unknown;\n timeout?: unknown;\n background?: unknown;\n interactive?: unknown;\n name?: unknown;\n}\n\n/** Scalar and sequence result details, read only by the renderers. */\nexport interface BashResultDetails {\n id?: string;\n runner?: string;\n exitCode?: number | null;\n logPath?: string;\n fileSize?: number;\n lines?: number;\n timedOut?: boolean;\n promoted?: boolean;\n reason?: string;\n tail?: string;\n tailLines?: number;\n sequenceId?: string;\n stages?: Array<{ index: number; state: string; logPath?: string }>;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Narrows the result details to the fields the card reads; anything else is ignored. */\nexport function bashResultDetails(details: unknown): BashResultDetails {\n if (!isRecord(details)) return {};\n const out: BashResultDetails = {};\n if (typeof details.id === 'string') out.id = details.id;\n if (typeof details.runner === 'string') out.runner = details.runner;\n if (typeof details.exitCode === 'number' || details.exitCode === null) out.exitCode = details.exitCode;\n if (typeof details.logPath === 'string') out.logPath = details.logPath;\n if (typeof details.fileSize === 'number') out.fileSize = details.fileSize;\n if (typeof details.lines === 'number') out.lines = details.lines;\n if (details.timedOut === true) out.timedOut = true;\n if (details.promoted === true) out.promoted = true;\n if (typeof details.reason === 'string') out.reason = details.reason;\n if (typeof details.tail === 'string') out.tail = details.tail;\n if (typeof details.tailLines === 'number') out.tailLines = details.tailLines;\n if (typeof details.sequenceId === 'string') {\n out.sequenceId = details.sequenceId;\n if (Array.isArray(details.stages)) {\n out.stages = details.stages.flatMap((stage) => {\n if (\n !isRecord(stage) ||\n !Number.isInteger(stage.index) ||\n Number(stage.index) < 0 ||\n typeof stage.state !== 'string'\n )\n return [];\n return [\n {\n index: Number(stage.index),\n state: stage.state,\n ...(typeof stage.logPath === 'string' ? { logPath: stage.logPath } : {}),\n },\n ];\n });\n }\n }\n return out;\n}\n\n/** `/Users/me/x` becomes `~/x`. Absolute home paths are what push these lines onto extra rows. */\nexport function abbreviateHome(text: string): string {\n return text.replace(HOME_PATH, '~');\n}\n\n/** Collapse a heredoc or multi-line script to one scannable line plus a count. */\nexport function collapseCommand(command: string): string {\n const lines = command\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line.length > 0);\n const first = lines[0] ?? '';\n return lines.length > 1 ? `${first} ${ELLIPSIS} +${lines.length - 1} lines` : first;\n}\n\n/** Drop the middle rather than the end, so a long pipeline keeps both its source and its sink. */\nexport function truncateMiddle(text: string, max: number = MAX_COMMAND_LENGTH): string {\n if (text.length <= max) return text;\n const keep = max - GAP.length;\n const head = Math.ceil(keep / 2);\n let start = text.slice(0, head);\n let end = text.slice(text.length - (keep - head));\n\n // Snap both cuts to a token boundary, so neither side ends mid-word. Each is\n // only moved when a boundary exists in the half nearest the cut, otherwise a\n // single long argument would swallow the whole budget.\n const lastSpace = start.lastIndexOf(' ');\n if (lastSpace > start.length / 2) start = start.slice(0, lastSpace);\n const firstSpace = end.indexOf(' ');\n if (firstSpace >= 0 && firstSpace < end.length / 2) end = end.slice(firstSpace + 1);\n\n return `${start}${GAP}${end}`;\n}\n\n/** Arrays are separate commands; the expanded body keeps their boundaries visible. */\nexport function bashCommandText(command: unknown): string {\n if (typeof command === 'string') return command;\n return Array.isArray(command) && command.every((entry) => typeof entry === 'string') ? command.join('\\n\\n') : '';\n}\n\nexport function formatBashCommand(command: unknown): string {\n const text = bashCommandText(command);\n if (text.length === 0) return '';\n const first = Array.isArray(command) ? bashCommandText(command[0]) : text;\n const suffix = Array.isArray(command) && command.length > 1 ? ` ${ELLIPSIS} +${command.length - 1} commands` : '';\n return truncateMiddle(`${abbreviateHome(collapseCommand(first))}${suffix}`);\n}\n\n/** Modifiers worth seeing at a glance, in the widget's `·` idiom. */\nexport function formatBashFlags(args: BashCallArgs): string[] {\n const flags: string[] = [];\n if (args.background === true) flags.push('bg');\n if (args.interactive === true) flags.push('tty');\n if (typeof args.timeout === 'number') flags.push(`${args.timeout}s`);\n if (typeof args.name === 'string' && args.name.length > 0) flags.push(args.name);\n return flags;\n}\n\n/** Human-readable byte count, matching how pi reports output sizes. */\nexport function formatSize(bytes: number): string {\n if (bytes < BYTES_PER_KB) return `${bytes} B`;\n if (bytes < BYTES_PER_MB) return `${(bytes / BYTES_PER_KB).toFixed(1)} KB`;\n return `${(bytes / BYTES_PER_MB).toFixed(1)} MB`;\n}\n\n/** The metadata footer, collapsed from five lines to one. */\nexport function formatResultSummary(details: BashResultDetails): string {\n const parts: string[] = [];\n if (details.lines !== undefined) parts.push(`${details.lines.toLocaleString('en-US')} lines`);\n if (details.fileSize !== undefined) parts.push(formatSize(details.fileSize));\n if (details.runner !== undefined) parts.push(details.runner);\n return parts.join(' · ');\n}\n\n/** Last `max` lines, so a chatty command cannot push the transcript off screen. */\nfunction lastLines(text: string, max: number): string[] {\n const all = text.split('\\n');\n while (all.length > 0 && all[all.length - 1]?.trim() === '') all.pop();\n return all.length <= max ? all : all.slice(-max);\n}\n\nexport type BashStatusTone = 'running' | 'ok' | 'error' | 'background';\n\nexport interface BashStatusLine {\n glyph: string;\n tone: BashStatusTone;\n text: string;\n}\n\n/** What the result body shows: the log lines, then the one-line status under them. */\nexport interface BashResultView {\n lines: string[];\n status: BashStatusLine | null;\n /** Lines the collapsed view is hiding, so the card can say so. */\n hidden: number;\n}\n\nexport interface BashResultInput {\n details: unknown;\n /** The result's text blocks joined, all a thrown failure leaves behind. */\n output: string;\n expanded: boolean;\n isPartial: boolean;\n isError: boolean;\n}\n\nexport function bashResultView(input: BashResultInput): BashResultView {\n const details = bashResultDetails(input.details);\n const logs = (details.stages ?? []).flatMap((stage) =>\n stage.logPath === undefined ? [] : [`stage ${stage.index + 1} · ${stage.state} · ${stage.logPath}`],\n );\n\n // Running. A sequence may already name stage logs; streamed text still needs\n // its own bound because it grows while the current command runs.\n if (input.isPartial) {\n return {\n lines: [...logs, ...lastLines(input.output, STREAM_TAIL_LINES)],\n status: { glyph: '◐', tone: 'running', text: 'running' },\n hidden: 0,\n };\n }\n\n // Scalar failures may have only error text. Sequence failures retain their\n // manifest and final excerpt, without displaying earlier commands' output.\n if (input.isError) {\n const all = lastLines(\n details.sequenceId === undefined ? input.output : (details.tail ?? input.output),\n Number.MAX_SAFE_INTEGER,\n );\n const lines = [...logs, ...(input.expanded ? all : all.slice(-COLLAPSED_TAIL_LINES))];\n const summary = formatResultSummary(details);\n return {\n lines,\n status: { glyph: '✗', tone: 'error', text: summary.length > 0 ? summary : 'failed' },\n hidden: Math.max(0, all.length + logs.length - lines.length),\n };\n }\n\n if (details.promoted === true) {\n const label = details.runner ?? details.id ?? 'runner';\n const suffix = details.id === undefined ? '' : ` · ${details.id}`;\n return {\n lines: logs,\n status: { glyph: '●', tone: 'background', text: `${label}${suffix} · background` },\n hidden: 0,\n };\n }\n\n const all = lastLines(\n details.tail ?? (details.sequenceId === undefined ? '' : input.output),\n Number.MAX_SAFE_INTEGER,\n );\n const lines = [...logs, ...(input.expanded ? all : all.slice(-COLLAPSED_TAIL_LINES))];\n // An absent exit code means the runner never reported one, which is not a failure.\n const exited = details.exitCode !== undefined && details.exitCode !== null;\n const failed = details.timedOut === true || (exited && details.exitCode !== 0);\n\n const meta: string[] = [];\n if (details.timedOut === true) meta.push('timed out');\n else if (failed) meta.push(`exit ${details.exitCode}`);\n const summary = formatResultSummary(details);\n if (summary.length > 0) meta.push(summary);\n\n const text = meta.length > 0 ? meta.join(' · ') : failed ? 'failed' : lines.length === 0 ? 'done' : '';\n return {\n lines,\n status: text.length > 0 ? { glyph: failed ? '✗' : '✓', tone: failed ? 'error' : 'ok', text } : null,\n hidden: Math.max(0, all.length + logs.length - lines.length),\n };\n}\n\n/** The tones a promoted run's card can wear; each is a StatusTone on both component libraries. */\nexport type BashBackgroundTone = 'info' | 'running' | 'ok' | 'neutral' | 'error';\n\n/**\n * A promoted command's outcome, read from the runner the channel reports\n * rather than from the tool call, which returned when the run went to the\n * background. The card never reads Completed while the runner still runs.\n */\nexport function backgroundOutcome(run: RunnerRunView | undefined): { tone: BashBackgroundTone; badge: string } {\n if (run === undefined) return { tone: 'info', badge: 'In background' };\n if (run.exit === undefined) return { tone: 'running', badge: 'In background' };\n const { reason, code } = run.exit;\n const exit = code === null ? '' : ` · exit ${code}`;\n if (reason === 'completed') return { tone: 'ok', badge: `Completed${exit}` };\n if (reason === 'stopped') return { tone: 'neutral', badge: 'Stopped' };\n return { tone: 'error', badge: `Failed${exit}` };\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n AnsiText,\n Button,\n FileIcon,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n type StatusTone,\n SyntaxText,\n toolTone,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\n\nimport { runnerLogTab } from '../../_components/RunnerLogPanel';\nimport { requestRunnerStop, runners } from '../../_lib/runnersStore';\nimport {\n backgroundOutcome,\n type BashStatusTone,\n bashCommandText,\n bashResultDetails,\n bashResultView,\n formatBashCommand,\n formatBashFlags,\n} from '../_lib/bashToolFormat';\n\nconst STATUS_TONE: Record<BashStatusTone, StatusTone> = {\n running: 'running',\n ok: 'ok',\n error: 'error',\n background: 'info',\n};\n\n/**\n * The bash tool's timeline item, the web half of renderBashCall and\n * renderBashResult. Collapsed it is a single header row: the tool name, the\n * command shortened to one line, its modifiers, and the outcome badge, so a\n * transcript of many calls stays scannable. Expanding it opens the body: the\n * command exactly as it was run, then the whole tail the frame carries, each\n * in its own scroll box so one chatty command cannot own the viewport. A\n * command promoted to a background runner offers the same stop the activity\n * dock does, for as long as the runners channel reports it running.\n */\nexport function BashToolMessage({\n sessionId,\n args,\n result,\n output,\n running,\n isError,\n sendSessionFrame,\n openTransientTab,\n}: ToolMessageRenderProps) {\n const details = bashResultDetails(result?.details);\n // A sequence owns several process logs, never a process or log tab of its own.\n const processId = details.sequenceId === undefined ? details.id : undefined;\n const runnerId = details.promoted === true ? processId : undefined;\n const run = useStore(runners.store, (state) =>\n processId === undefined ? undefined : runners.select(state, sessionId).runs.find((entry) => entry.id === processId),\n );\n const stopping = useStore(\n runners.store,\n (state) => runnerId !== undefined && runners.select(state, sessionId).stopRequested.includes(runnerId),\n );\n const rawCommand = bashCommandText(args.command);\n const command = formatBashCommand(args.command);\n const flags = formatBashFlags(args);\n const stoppable = sessionId !== null && runnerId !== undefined && run !== undefined && run.exit === undefined;\n // The tool call returned when the run went to the background; the card's\n // outcome is the runner's, so it never reads Completed while still running.\n const background = runnerId === undefined ? undefined : backgroundOutcome(run);\n\n return (\n <MessageItem tone={background?.tone ?? toolTone({ running, isError })} expandable>\n {({ expanded }) => {\n // Nothing is shown until the card is open, so the body always reads the\n // unclipped view; the collapsed state has no lines to bound.\n const view = bashResultView({\n details: result?.details,\n output,\n expanded: true,\n isPartial: running,\n isError,\n });\n return (\n <>\n <MessageItemHeader title=\"bash\" {...(background ? { badge: background.badge } : {})}>\n <span data-testid=\"tool-call-bash\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n <span className=\"min-w-0 flex-1 truncate font-mono text-po-text\">{command}</span>\n {flags.length > 0 ? (\n <span className=\"hidden shrink-0 text-po-dim sm:inline\">· {flags.join(' · ')}</span>\n ) : null}\n </span>\n {/* The log and the stop live in the header, not the body: a\n collapsed row still has to reach the whole log and still has\n to be able to stop a run it promoted to the background. */}\n {run !== undefined && sessionId !== null ? (\n <Button\n variant=\"outline\"\n size=\"xs\"\n data-testid=\"tool-result-bash-open-log\"\n title=\"open this runner's full log\"\n onClick={(event) => {\n event.stopPropagation();\n openTransientTab(runnerLogTab(run));\n }}\n className=\"shrink-0 gap-1 px-1.5 \"\n >\n <FileIcon className=\"h-2.5 w-2.5\" />\n log\n </Button>\n ) : null}\n {stoppable ? (\n <Button\n size=\"xs\"\n variant={stopping ? 'outline' : 'danger-outline'}\n disabled={stopping}\n data-testid=\"tool-result-bash-stop\"\n data-stopping={stopping}\n title={\n stopping ? 'stop requested; the runner reports its own exit' : 'ask the runtime to stop this runner'\n }\n onClick={(event) => {\n event.stopPropagation();\n if (sessionId !== null && runnerId !== undefined)\n requestRunnerStop(sendSessionFrame, sessionId, runnerId);\n }}\n className=\"shrink-0 px-1.5 \"\n >\n {stopping ? 'stopping…' : 'stop'}\n </Button>\n ) : null}\n </MessageItemHeader>\n {expanded ? (\n <MessageItemBody data-testid=\"tool-result-bash\" className=\"flex flex-col gap-2\">\n {/* The header had to shorten the command to one row; this is\n the command as it was actually run, wrapped rather than\n clipped and coloured as the shell it is. */}\n {rawCommand.length > 0 ? (\n <SyntaxText\n data-testid=\"tool-result-bash-command\"\n grammar=\"shell\"\n text={rawCommand}\n className=\"max-h-40 overflow-auto text-po-text\"\n />\n ) : null}\n {/* The tail arrives with the colours the command wrote: the\n log keeps them, and only the model's copy is flattened. */}\n {view.lines.length > 0 ? (\n <AnsiText\n data-testid=\"tool-result-bash-output\"\n text={view.lines.join('\\n')}\n className=\"max-h-96 overflow-auto whitespace-pre-wrap break-words [overflow-wrap:anywhere] border-po-border-soft border-t pt-2 font-mono text-po-dim\"\n />\n ) : null}\n {view.status ? (\n <MessageItemStatus\n data-testid=\"tool-result-bash-status\"\n tone={STATUS_TONE[view.status.tone]}\n glyph={view.status.glyph}\n className=\"min-w-0\"\n >\n <span className=\"break-words\">{view.status.text}</span>\n </MessageItemStatus>\n ) : null}\n {details.sequenceId === undefined && details.logPath !== undefined ? (\n // The tail is bounded by the runner; the whole log only ever exists on\n // disk, so the item names the file rather than pretending this is all.\n <span data-testid=\"tool-result-bash-log\" className=\"min-w-0 break-all text-po-dim\">\n full log · <span className=\"text-po-dim\">{details.logPath}</span>\n </span>\n ) : null}\n </MessageItemBody>\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { BashToolMessage } from './_components/BashToolMessage';\nexport default defineToolRenderer({ message: BashToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport activityGroupRunners from '../src/extensions/workspaces/sessions/(frontend)/activity-group/runners.web';\nimport channelRunnerRuns from '../src/extensions/workspaces/sessions/(frontend)/channel/runner-runs.web';\nimport fillRunners from '../src/extensions/workspaces/sessions/(frontend)/fill/Runners.activity.runners.web';\nimport toolBash from '../src/extensions/workspaces/sessions/(frontend)/tool/bash.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: 'runner',\n packageName: '@agimon-ai/po-runner',\n session: {\n get activityGroups(): WebPluginContributions['activityGroups'] { return [via({ name: 'runners' }, activityGroupRunners)]; },\n get channels(): WebPluginContributions['channels'] { return [via({ channel: 'runner_runs' }, channelRunnerRuns)]; },\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'activity.runners', id: 'runners' }, fillRunners)]; },\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['bash'] }, toolBash)]; },\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAWA,MAAa,qBAAqB;;AAgBlC,MAAa,uBAA4C;CACvD,SAAS;CACT,MAAM;CACN,aAAa;AACf;;;;;AAMA,SAAgB,iBAAiB,SAAiB,KAAkC;CAClF,MAAM,QAAQ,IAAI,KAAK,MAAM,KAAK,CAAC,IAAI,EAAE,IAAI;CAC7C,OAAO,QAAQ,KAAK,MAAM,KAAK;EAAE,GAAG;EAAsB,GAAG;CAAM,IAAI;EAAE;EAAS,GAAG;EAAO,mBAAmB;CAAK;AAC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AG;EACvH,IAAI,gBAAyD;GAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,GAAGC,gBAAQ,CAAC;EAAG;CAC9G;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"web.mjs","names":["isRecord","MAX_RETRIES","RETRY_BASE_MS","isRecord","isRecord","BYTES_PER_KB","BYTES_PER_MB","formatSize","activityGroupRunners","channelRunnerRuns","fillRunners","toolBash"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/_lib/launchLine.ts","../../src/constants/webRunners.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/runnersStore.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/format.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.tsx","../../src/constants/webRunnerLog.ts","../../src/types/webRunnerLog.ts","../../src/types/apiRoutes.ts","../../generated/client.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/screenApi.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/logApi.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/RunnerLogPanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/_components/RunnerShellPanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/activity-group/runners.web.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/runner-runs.web.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/runnerTail.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/RunnersActivitySection.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/Runners.activity.runners.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/bashToolFormat.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/bash.web.tsx","../../generated/web.ts"],"sourcesContent":["/**\n * The `/runners start` line the runners panel's command bar sends.\n *\n * WHY THE BUILDER LIVES HERE AND THE PARSER DOES NOT:\n * Cockpit code is compiled into the host bundle and may import only this\n * package's own web and type modules, so it cannot share the session's parser\n * in src/services. The two are pinned together by a test that parses what this\n * writes, which is the only guarantee that matters: the line has to survive\n * the trip.\n */\n\nexport const RUNNERS_START_LINE = '/runners start';\n/** A persistent login shell for the direct shell action in Runner Space. */\nexport const RUNNER_SHELL_COMMAND = 'exec \"${SHELL:-/bin/bash}\" -l';\n/** Ends the options and begins the command; the command may hold `=` and flags of its own. */\nexport const RUNNERS_COMMAND_SEPARATOR = '--';\n\nexport interface RunnerLaunchRequest {\n command: string;\n cwd?: string;\n name?: string;\n interactive?: boolean;\n /** A terminal when rmux or tmux is available, plain output otherwise. */\n preferInteractive?: boolean;\n}\n\n/** The no-form launch used when a reader asks for a shell rather than a command. */\nexport const RUNNER_SHELL_REQUEST: RunnerLaunchRequest = {\n command: RUNNER_SHELL_COMMAND,\n name: 'shell',\n interactive: true,\n};\n\n/**\n * What the runners panel's Run sends: the typed command on a terminal when\n * one is available, or a login shell when nothing was typed.\n */\nexport function runnerRunRequest(command: string, cwd: string): RunnerLaunchRequest {\n const where = cwd.trim() === '' ? {} : { cwd };\n return command.trim() === '' ? { ...RUNNER_SHELL_REQUEST, ...where } : { command, ...where, preferInteractive: true };\n}\n\n/** Quotes a value that carries whitespace, which is how a value survives tokenizing. */\nfunction quote(value: string): string {\n return /\\s/u.test(value) ? `\"${value}\"` : value;\n}\n\nexport function runnerLaunchLine(request: RunnerLaunchRequest): string {\n const cwd = request.cwd?.trim() ?? '';\n const name = request.name?.trim() ?? '';\n const pairs = [\n ...(name === '' ? [] : [`name=${quote(name)}`]),\n ...(cwd === '' ? [] : [`cwd=${quote(cwd)}`]),\n ...(request.interactive === true\n ? ['interactive=true']\n : request.preferInteractive === true\n ? ['interactive=prefer']\n : []),\n ];\n // The separator is always written, even with no options before it, so the\n // command is never re-read as a `key=value` pair.\n return [RUNNERS_START_LINE, ...pairs, RUNNERS_COMMAND_SEPARATOR, request.command.trim()].join(' ');\n}\n","export const RUNNER_RUNS_TYPE = 'runner_runs';\n","import { defineSessionStore, type SessionFrameSender } from '@agimon-ai/po-core/web';\n\nimport { RUNNER_RUNS_TYPE } from '../../../../../constants/webRunners';\nimport { type RunnerRunView, type RunnerStartFailureView } from '../../../../../types/webRunners';\nimport { type RunnerLaunchRequest, runnerLaunchLine } from './launchLine';\n\n/** The runtime's slash verb that stops one runner headlessly. */\nconst STOP_COMMAND = '/runners stop';\n\n/** One session's record: the hub's last report plus what this page asked for. */\nexport interface RunnersSession extends RunnerRunsPayload {\n /** Runners a stop was asked for and that have not yet reported an exit. */\n stopRequested: string[];\n}\n\nexport const runners = defineSessionStore<RunnersSession>({ runs: [], stopRequested: [] });\n\n/** Short commands stay out of the activity card, but remain in the runner feed. */\nexport function isRunnerActivityVisible(run: RunnerRunView, now = Date.now()): boolean {\n return run.state === 'running' && now - Date.parse(run.startedAt) > 3_000;\n}\n\n/** The runner channel keeps the dock's busy state aligned with its rendered run list. */\nexport const runnerActivitySource = {\n subscribe(this: void, listener: () => void) {\n let timer: ReturnType<typeof setTimeout> | undefined;\n const schedule = () => {\n clearTimeout(timer);\n const now = Date.now();\n let deadline = Infinity;\n for (const session of Object.values(runners.store.state)) {\n if (!session) continue;\n for (const run of session.runs) {\n if (run.state !== 'running') continue;\n const revealAt = Date.parse(run.startedAt) + 3_001;\n if (revealAt > now) deadline = Math.min(deadline, revealAt);\n }\n }\n if (Number.isFinite(deadline))\n timer = setTimeout(\n () => {\n listener();\n schedule();\n },\n Math.min(deadline - now, 2_147_483_647),\n );\n };\n const subscription = runners.store.subscribe(() => {\n listener();\n schedule();\n });\n schedule();\n return () => {\n subscription.unsubscribe();\n clearTimeout(timer);\n };\n },\n isActive(sessionId: string | null) {\n return runners.select(runners.store.state, sessionId).runs.some((run) => isRunnerActivityVisible(run));\n },\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * Asks the runtime to stop a runner through the same slash command the TUI's\n * Runner Space uses. The request is remembered until the runner's record\n * reports an exit; the runtime, not this click, decides when that is.\n */\nexport function requestRunnerStop(send: SessionFrameSender, sessionId: string, id: string): void {\n send(sessionId, { type: 'prompt', message: `${STOP_COMMAND} ${id}` });\n runners.update(sessionId, (current) => ({\n ...current,\n stopRequested: [...current.stopRequested.filter((known) => known !== id), id],\n }));\n}\n\n/**\n * Asks the runtime to start a runner, through the same prompt frame the stop\n * request uses and the same way agents and workflows launch their own work.\n *\n * Nothing is recorded as pending here. The runtime names the run, and it\n * arrives in the feed on its own; guessing at an id before it exists would\n * only have to be reconciled later.\n */\nexport function requestRunnerStart(send: SessionFrameSender, sessionId: string, request: RunnerLaunchRequest): void {\n send(sessionId, { type: 'prompt', message: runnerLaunchLine(request) });\n}\n\nexport interface RunnerRunsPayload {\n /** The runners the hub last reported; presented order preserved. */\n runs: RunnerRunView[];\n /** Where a runner starts when no folder is given. */\n sessionDirectory?: string;\n /** The last start that did not happen. */\n startFailure?: RunnerStartFailureView;\n}\n\n/** The plugin's session data channel: 'runner_runs' payloads into the store. */\nexport const runnerRunsChannel = runners.channel<RunnerRunsPayload>({\n channel: RUNNER_RUNS_TYPE,\n parse(input) {\n if (!isRecord(input) || !Array.isArray(input.runs)) return null;\n const failure = input.startFailure;\n return {\n runs: input.runs.filter(isRecord) as unknown as RunnerRunView[],\n ...(typeof input.sessionDirectory === 'string' ? { sessionDirectory: input.sessionDirectory } : {}),\n ...(isRecord(failure) && typeof failure.id === 'string' && typeof failure.message === 'string'\n ? { startFailure: { id: failure.id, message: failure.message } }\n : {}),\n };\n },\n reduce(current, payload) {\n // A stop request is spent once the runner reports an exit or leaves the feed.\n const stillRunning = new Set(payload.runs.filter((run) => run.state === 'running').map((run) => run.id));\n return { ...payload, stopRequested: current.stopRequested.filter((id) => stillRunning.has(id)) };\n },\n});\n","import type { RunnerRunView } from '../../../../../types/webRunners';\n\n/**\n * Local copy of the runtime's formatUptime (src/services/bashResult/index.ts):\n * the web plugin may reach only src/types, so the one helper it needs lives here.\n */\nexport function formatRunnerUptime(startedAt: string, now: number): string {\n const started = Date.parse(startedAt);\n if (Number.isNaN(started)) return 'unknown';\n const seconds = Math.max(0, Math.floor((now - started) / 1000));\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m`;\n const hours = Math.floor(minutes / 60);\n return hours < 24 ? `${hours}h` : `${Math.floor(hours / 24)}d`;\n}\n\n/** A bounded log view: what to render, and what the bound left out. */\nexport interface LogView {\n lines: string[];\n /** Lines dropped off the top to stay within the bound. */\n hidden: number;\n}\n\nexport interface LogViewOptions {\n /**\n * Drop the slice's last line because it is a fragment the follow stream will\n * deliver again, whole. Set only while following: a finished run's last line\n * may legitimately lack a newline, and dropping it would hide real output.\n */\n dropPartialTail?: boolean;\n}\n\n/**\n * The lines a log view shows: the slice's text, then whatever the follow\n * stream appended, bounded to the newest `max`.\n *\n * A log file ends with a newline, and the reader hands its text back with that\n * newline intact, so a naive split reports one blank line more than the file\n * has. Dropping exactly one trailing empty entry keeps the count the reader\n * sees equal to the count the server reported.\n */\nexport function logViewLines(\n text: string,\n appended: readonly string[],\n max: number,\n options: LogViewOptions = {},\n): LogView {\n const split = text.split('\\n');\n if (split.length > 0 && split[split.length - 1] === '') split.pop();\n if (options.dropPartialTail === true && split.length > 0) split.pop();\n const all = [...split, ...appended];\n const lines = all.slice(-max);\n return { lines, hidden: all.length - lines.length };\n}\n\n/**\n * Absolute 1-based numbers for a tail, counted back from the last line.\n *\n * A tail is contiguous, so only its end has to be known. Grep results are not\n * contiguous and carry their own numbers from the reader instead.\n */\nexport function tailLineNumbers(lastLineNumber: number, count: number): number[] {\n const first = Math.max(1, lastLineNumber - count + 1);\n return Array.from({ length: count }, (_, index) => first + index);\n}\n\n/**\n * Whether the view is actually following a growing log.\n *\n * Three things must hold: the reader asked to follow, no query is set (a\n * filtered view is a snapshot of the whole file, which a stream cannot\n * assemble a chunk at a time), and the runner is still writing. Without the\n * last one a finished run would claim to be tailing a file nothing will ever\n * append to.\n */\nexport function isFollowingLive(following: boolean, filtering: boolean, running: boolean): boolean {\n return following && !filtering && running;\n}\n\n/**\n * A folder as the command bar names it: the session directory by its last\n * segment, a folder inside it relative to it, anything else as written.\n */\nexport function runnerFolderLabel(folder: string, sessionDirectory: string | undefined): string {\n if (folder === '' || folder === sessionDirectory) {\n return sessionDirectory === undefined\n ? 'session directory'\n : (sessionDirectory.split('/').pop() ?? sessionDirectory);\n }\n if (sessionDirectory !== undefined && folder.startsWith(`${sessionDirectory}/`)) {\n return folder.slice(sessionDirectory.length + 1);\n }\n return folder;\n}\n\n/** The folders the picker offers past the session directory: those in use, then the one in effect. */\nexport function runnerFolders(\n inUse: readonly string[],\n current: string,\n sessionDirectory: string | undefined,\n): string[] {\n const folders = new Set([...inUse, current]);\n folders.delete('');\n if (sessionDirectory !== undefined) folders.delete(sessionDirectory);\n return [...folders];\n}\n\n/**\n * Undoes iOS smart punctuation, which React Native cannot switch off: a shell\n * reads ‘hi’ as literal quotes and a long dash before port as no flag at all.\n */\nexport function plainPunctuation(text: string): string {\n return text\n .replace(/[‘’]/g, \"'\")\n .replace(/[“”]/g, '\"')\n .replace(/\\u2014/g, '--');\n}\n\n/** The badge a run wears: its state while running, then how it ended. */\nexport function runnerBadge(run: RunnerRunView | undefined): {\n tone: 'neutral' | 'running' | 'ok' | 'error';\n label: string;\n} {\n if (run === undefined) return { tone: 'neutral', label: 'gone' };\n if (run.state === 'running') return { tone: 'running', label: 'running' };\n if (run.exit === undefined || run.exit.reason === 'stopped') return { tone: 'neutral', label: 'stopped' };\n const clean = run.exit.reason === 'completed' && (run.exit.code === 0 || run.exit.code === null);\n return clean ? { tone: 'ok', label: 'done' } : { tone: 'error', label: run.exit.reason.replace('_', ' ') };\n}\n","import {\n AlertIcon,\n Button,\n ChevronDownIcon,\n FolderIcon,\n Input,\n PickerContent,\n Popover,\n PopoverTrigger,\n type PickerItem,\n} from '@agimon-ai/po-web-components';\nimport { useState } from 'react';\n\nimport type { RunnerCommandBarProps } from '../../../../../types/webRunners';\nimport { runnerFolderLabel, runnerFolders } from '../_lib/format';\n\n/**\n * The one place a runner starts: a command, the folder it runs in, and Run.\n * An empty command opens a plain shell in that folder instead.\n */\nexport function RunnerCommandBar({\n command,\n onCommandChange,\n cwd,\n onCwdChange,\n sessionDirectory,\n folders,\n problem,\n onLaunch,\n defaultFolderOpen = false,\n}: RunnerCommandBarProps) {\n const [folderOpen, setFolderOpen] = useState(defaultFolderOpen);\n const [path, setPath] = useState('');\n const label = runnerFolderLabel(cwd, sessionDirectory);\n const pick = (next: string): void => {\n onCwdChange(next);\n setPath('');\n setFolderOpen(false);\n };\n const items: PickerItem[] = [\n { value: '', title: 'Session directory', subtitle: sessionDirectory ?? 'Where this session started' },\n ...runnerFolders(folders, cwd, sessionDirectory).map((folder) => ({\n value: folder,\n title: runnerFolderLabel(folder, sessionDirectory),\n subtitle: folder,\n })),\n ];\n\n return (\n <div className=\"flex shrink-0 flex-col gap-1.5 border-b border-po-border-soft px-3 py-3 sm:px-[26px]\">\n <div className=\"flex flex-wrap items-center gap-2 sm:flex-nowrap\">\n <span className=\"relative flex min-w-0 flex-1 basis-full items-center sm:basis-auto\">\n <span aria-hidden className=\"pointer-events-none absolute left-3 font-mono text-base text-po-faint\">\n $\n </span>\n <Input\n size=\"lg\"\n data-testid=\"runners-panel-command\"\n aria-label=\"Command to run\"\n value={command}\n placeholder=\"a command, like pnpm dev\"\n autoComplete=\"off\"\n spellCheck={false}\n onChange={(event) => onCommandChange(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') onLaunch();\n }}\n className=\"w-full pl-7 font-mono\"\n />\n </span>\n <Popover open={folderOpen} onOpenChange={setFolderOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"lg\"\n data-testid=\"runners-panel-cwd\"\n aria-label={`Runs in ${label}`}\n aria-invalid={problem === undefined ? undefined : true}\n title={cwd === '' ? sessionDirectory : cwd}\n className={`max-w-56 gap-1.5 px-3 font-mono ${problem === undefined ? '' : 'border-po-red'}`}\n >\n <FolderIcon className=\"h-3.5 w-3.5 shrink-0 text-po-faint\" />\n <span className=\"truncate\">{label}</span>\n <ChevronDownIcon className=\"size-3.5 shrink-0 opacity-60\" />\n </Button>\n </PopoverTrigger>\n <PickerContent\n side=\"bottom\"\n align=\"start\"\n title=\"Runs in\"\n items={items}\n value={[cwd]}\n onSelect={pick}\n footer={\n <span className=\"relative flex items-center px-3 py-2\">\n <FolderIcon className=\"pointer-events-none absolute left-5.5 h-3.5 w-3.5 text-po-faint\" />\n <Input\n data-testid=\"runners-panel-cwd-path\"\n aria-label=\"Another folder\"\n value={path}\n placeholder=\"another folder, like packages/web\"\n spellCheck={false}\n onChange={(event) => setPath(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && path.trim() !== '') pick(path.trim());\n }}\n className=\"w-full pl-8 font-mono\"\n />\n </span>\n }\n />\n </Popover>\n <Button variant=\"primary\" size=\"lg\" data-testid=\"runners-panel-run\" onClick={onLaunch}>\n {command.trim() === '' ? 'Open shell' : 'Run'}\n </Button>\n </div>\n {problem === undefined ? (\n <span className=\"text-sm text-po-dim\">\n Runs in its own terminal and keeps going after Po's turn ends. Leave it empty for a plain shell.\n </span>\n ) : (\n <span\n role=\"alert\"\n data-testid=\"runners-panel-problem\"\n className=\"flex items-center gap-1.5 text-sm text-po-red\"\n >\n <AlertIcon className=\"size-3.5 shrink-0\" />\n {problem}\n </span>\n )}\n </div>\n );\n}\n","export const RUNNER_API_BASE_PATH = 'runner';\nexport const RUN_ID_PARAM = 'runId';\nexport const RUNNER_SCREEN_EVENT = 'screen';\nexport const RUNNER_LOG_STREAM_EVENT = 'append';\nexport const RUNNER_LOG_PING_EVENT = 'ping';\n","import type { LogSlice } from './logReader';\n\n/**\n * The runner log API, shared by this package's session-scoped routes and its\n * cockpit plugin. The two halves run in different processes, so the wire\n * vocabulary is declared here: the browser half may reach `src/types` and\n * nothing else on the server side.\n *\n * Where the routes live is not here. That is `src/types/apiRoutes`, which both\n * halves read, and the generated client turns into the URLs the page addresses.\n * The file a run writes to is still read from its metadata record by the server\n * alone.\n */\n\n/**\n * One chunk of an attached pane's output.\n *\n * Base64 because these are terminal bytes, escape sequences and all, and a\n * server-sent event is a line-oriented text frame that would mangle them.\n */\nexport interface RunnerScreenEvent {\n chunk: string;\n /** Byte offset just past this chunk, so a reconnect resumes rather than replays. */\n offset?: number;\n /** Set once the runner exits, so the page can stop watching. */\n ended?: boolean;\n}\n\n/** A finite byte slice for sealed HTTP followers. Decode chunks incrementally, not independently. */\nexport interface RunnerOutputResponse {\n /** Base64 bytes, preserving split UTF-8 characters and terminal escape sequences. */\n chunk: string;\n offset: number;\n /** The file was replaced or became shorter than the requested offset; discard the previous display/decoder state. */\n reset: boolean;\n /** Opaque raw file identity. Send back on screen/read to detect replacement, including regrowth. */\n generation?: string;\n exists: boolean;\n /** More bytes were present at read time; request the next slice before waiting. */\n hasMore: boolean;\n /** True only once the runner ended and all available bytes have been read. */\n ended: boolean;\n}\n\n/** The body of a keystroke POST. Text, not key codes: the pane wants bytes. */\nexport interface RunnerInputRequest {\n text: string;\n}\n\n/** The named SSE event carrying a RunnerScreenEvent payload. */\n\n/**\n * A log request as query parameters. `grep` is a literal substring, not a\n * regular expression, because that is what the reader matches; `lines` bounds\n * the answer to the last N lines of whatever survived the filter.\n */\nexport interface RunnerLogQueryParams {\n lines?: number;\n grep?: string;\n ignoreCase?: boolean;\n contextLines?: number;\n}\n\n/** The slice the log route answers with, plus which runner it came from. */\nexport interface RunnerLogResponse extends LogSlice {\n runId: string;\n /** True while the runner is still writing, so the page knows following is worth offering. */\n running: boolean;\n}\n\n/**\n * One server-sent event on the follow stream: the lines appended since the last\n * one. The stream never filters: a page that sets a query stops following and\n * reads a filtered slice instead, because grep with context is a whole-file\n * answer and cannot be assembled from a chunk at a time.\n */\nexport interface RunnerLogStreamEvent {\n /** Appended lines, in order; empty when the event only reports the runner ending. */\n lines: string[];\n /**\n * Byte offset just past the last line in this event.\n *\n * A follower that loses the stream resumes here. Without it the page could\n * only fall back to the offset its last slice reported, which every line\n * delivered since has already moved past, so a reconnect would replay them.\n */\n offset?: number;\n /** Set once the runner exits, so the page can stop following without polling the run list. */\n ended?: boolean;\n}\n\n/** The named SSE event carrying a RunnerLogStreamEvent payload. */\n\n/**\n * The named SSE event that carries nothing.\n *\n * A runner can be alive and silent for minutes, which on the wire is\n * indistinguishable from a connection that died. This is sent on a timer so\n * the socket keeps proving itself. Readers that only listen for `append`\n * ignore it, which is what makes it safe to add.\n */\n\n/** Query parameter names, shared so the page and the route cannot drift apart. */\nexport const RUNNER_LOG_PARAMS = {\n lines: 'lines',\n grep: 'grep',\n ignoreCase: 'ignoreCase',\n contextLines: 'contextLines',\n from: 'from',\n generation: 'generation',\n} as const;\n","import type { ApiResponseOf, ApiRoutes } from '@agimon-ai/po-core/web';\n\nimport { RUN_ID_PARAM } from '../constants/webRunnerLog';\nimport { RUNNER_LOG_PARAMS, type RunnerLogResponse, type RunnerOutputResponse } from './webRunnerLog';\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/runner/`, so the mount is\n * stated once, by the folder that creates it. This package stated it four times\n * before, once per URL builder, each of them re-spelling `/plugins/` and the\n * session prefix by hand.\n *\n * The Hono app registers these paths verbatim and the browser addresses them,\n * so a path cannot move on one side alone. `:runId` is Hono's own parameter\n * syntax for that reason; a caller supplies the value as `params`, and the\n * client encodes the segment.\n */\nexport const routes = {\n log: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/log`,\n query: [\n RUNNER_LOG_PARAMS.lines,\n RUNNER_LOG_PARAMS.grep,\n RUNNER_LOG_PARAMS.ignoreCase,\n RUNNER_LOG_PARAMS.contextLines,\n ],\n response: undefined as unknown as ApiResponseOf<RunnerLogResponse>,\n },\n /**\n * The live tail of that same log.\n *\n * `stream: true`, so the client exposes a URL and no call method: the\n * consumer is the browser’s own SSE reader, and a relayed call would\n * buffer a stream that never ends.\n */\n logStream: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/log/stream`,\n query: [RUNNER_LOG_PARAMS.from],\n stream: true,\n },\n /** The unscrubbed pane bytes, for a terminal emulator rather than a reader. */\n screenStream: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/screen/stream`,\n query: [RUNNER_LOG_PARAMS.from],\n stream: true,\n },\n /** Finite byte reads keep sealed HTTP exchanges bounded, unlike SSE. */\n logRead: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/log/read`,\n query: [RUNNER_LOG_PARAMS.from],\n response: undefined as unknown as ApiResponseOf<RunnerOutputResponse>,\n },\n screenRead: {\n method: 'GET',\n path: `/runners/:${RUN_ID_PARAM}/screen/read`,\n query: [RUNNER_LOG_PARAMS.from, RUNNER_LOG_PARAMS.generation],\n response: undefined as unknown as ApiResponseOf<RunnerOutputResponse>,\n },\n input: {\n method: 'POST',\n path: `/runners/:${RUN_ID_PARAM}/screen/input`,\n },\n} as const satisfies ApiRoutes;\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { createApiClient, sessionApiAddress } from '@agimon-ai/po-core/web';\nimport { browserTransport } from '@agimon-ai/po-web-security/browser';\n\nimport { routes } from '../src/types/apiRoutes';\n\n/** Scopes the tree mounts 'runner' at. */\nexport const apiScopes = ['session'] as const;\n\nexport const api = createApiClient(routes, {\n scopes: apiScopes,\n basePath: 'runner',\n transport: (input, init) => browserTransport.fetch(input, init),\n sessionAddress: sessionApiAddress,\n});\n","import { api } from '../../../../../../generated/client';\nimport { RUN_ID_PARAM, RUNNER_SCREEN_EVENT } from '../../../../../constants/webRunnerLog';\nimport { RUNNER_LOG_PARAMS, type RunnerInputRequest, type RunnerScreenEvent } from '../../../../../types/webRunnerLog';\n\n/**\n * The page's half of the attached pane.\n *\n * Two directions over two mechanisms, because the hub proxies requests and\n * server-sent events but cannot upgrade a socket: pane bytes arrive on an\n * EventSource, and keystrokes go back as ordinary POSTs. Both addresses come\n * from the generated client: the stream route offers a URL and no call method,\n * which is exactly what an EventSource wants and all it can be given.\n */\n\n/** Turns one base64 chunk back into the bytes a terminal was sent. */\nexport function decodeChunk(chunk: string): Uint8Array {\n const binary = atob(chunk);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) bytes[index] = binary.charCodeAt(index);\n return bytes;\n}\n\nexport interface RunnerScreenWatch {\n close(): void;\n}\n\n/** Attempts before a dropped screen stream is reported as lost rather than retried. */\nconst MAX_RETRIES = 5;\nconst RETRY_BASE_MS = 500;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport function watchRunnerScreen(\n sessionId: string,\n runId: string,\n from: number,\n handlers: { onEvent(event: RunnerScreenEvent): void; onLost(): void },\n): RunnerScreenWatch {\n let offset = from;\n let retries = 0;\n let closed = false;\n let source: EventSource | undefined;\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const open = (): void => {\n if (closed) return;\n const current = new EventSource(\n api\n .session(sessionId)\n .screenStream.url({ params: { [RUN_ID_PARAM]: runId }, query: { [RUNNER_LOG_PARAMS.from]: offset } }),\n );\n source = current;\n current.addEventListener(RUNNER_SCREEN_EVENT, (message) => {\n let parsed: unknown;\n try {\n parsed = JSON.parse((message as MessageEvent<string>).data);\n } catch {\n return;\n }\n if (!isRecord(parsed) || typeof parsed.chunk !== 'string') return;\n const event = parsed as unknown as RunnerScreenEvent;\n // Every delivered byte moves the resume point, so a reconnect asks for\n // what comes next rather than repainting everything again.\n if (typeof event.offset === 'number') offset = event.offset;\n retries = 0;\n // The server closes after this one, and a close reaches us as an error.\n if (event.ended === true) {\n closed = true;\n current.close();\n }\n handlers.onEvent(event);\n });\n current.addEventListener('error', () => {\n current.close();\n if (closed) return;\n retries += 1;\n if (retries > MAX_RETRIES) {\n handlers.onLost();\n return;\n }\n timer = setTimeout(open, RETRY_BASE_MS * 2 ** (retries - 1));\n });\n };\n\n open();\n return {\n close: () => {\n closed = true;\n if (timer !== undefined) clearTimeout(timer);\n source?.close();\n },\n };\n}\n\n/** Sends one batch of keystrokes. Resolves to whether the pane took them. */\nexport async function sendRunnerInput(sessionId: string, runId: string, text: string): Promise<boolean> {\n const body: RunnerInputRequest = { text };\n const result = await api.session(sessionId).input({ params: { [RUN_ID_PARAM]: runId }, body });\n return result.ok;\n}\n","import { api } from '../../../../../../generated/client';\nimport { RUN_ID_PARAM, RUNNER_LOG_STREAM_EVENT } from '../../../../../constants/webRunnerLog';\nimport {\n RUNNER_LOG_PARAMS,\n type RunnerLogQueryParams,\n type RunnerLogResponse,\n type RunnerLogStreamEvent,\n} from '../../../../../types/webRunnerLog';\nimport { decodeChunk } from './screenApi';\n\n/**\n * The page's half of this package's log API. The only place the cockpit talks\n * HTTP to the hub for a runner, so if the transport ever changes, it changes\n * here alone.\n *\n * The generated client owns every URL: a route is named, a session id selects\n * that session's own copy of the API, and the run id is a path parameter the\n * client substitutes and encodes. Nothing here spells a mount, a prefix or a\n * proxy parameter, which is what the four deleted URL builders each did by\n * hand.\n */\n\nexport type RunnerLogResult = { slice: RunnerLogResponse } | { error: string };\n\nconst UNREACHABLE = 'The cockpit hub is unreachable.';\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Reads one runner's log: the last N lines, or the lines matching a substring with context. */\nexport async function fetchRunnerLog(\n sessionId: string,\n runId: string,\n params: RunnerLogQueryParams = {},\n signal?: AbortSignal,\n): Promise<RunnerLogResult> {\n const result = await api.session(sessionId).log({\n params: { [RUN_ID_PARAM]: runId },\n // An unset parameter is left out rather than sent empty: the route reads a\n // missing one as its own default, and an empty grep as no filter at all.\n query: {\n [RUNNER_LOG_PARAMS.lines]: params.lines,\n [RUNNER_LOG_PARAMS.grep]: params.grep === '' ? undefined : params.grep,\n [RUNNER_LOG_PARAMS.ignoreCase]: params.ignoreCase === true ? true : undefined,\n [RUNNER_LOG_PARAMS.contextLines]: params.contextLines,\n },\n ...(signal === undefined ? {} : { signal }),\n });\n if (!result.ok) {\n // Status 0 is the transport never answering, which covers both a dead hub\n // and the caller replacing this request. An abort is the caller's own doing\n // and is reported as no answer rather than as a failure to show.\n if (result.status === 0) return { error: signal?.aborted === true ? '' : UNREACHABLE };\n return { error: result.error === '' ? `The hub answered ${String(result.status)}.` : result.error };\n }\n if (!isRecord(result.data) || typeof result.data.text !== 'string') {\n return { error: `The hub answered ${String(result.status)}.` };\n }\n return { slice: result.data };\n}\n\nexport interface RunnerLogFollow {\n close(): void;\n}\n\n/** Attempts before a dropped stream falls back to callable reads. */\nconst MAX_RETRIES = 5;\nconst RETRY_BASE_MS = 500;\nconst POLL_MS = 2_000;\n\n/**\n * Follows a running log from the offset already read, so no line is missed\n * between the slice and the stream. The stream never filters; a page with a\n * query stops following and reads a filtered slice instead.\n *\n * A dropped connection is retried with backoff from the offset the last event\n * reported, not from the offset the page started at, so a reconnect resumes\n * instead of replaying. After retries are exhausted, callable reads take over.\n * A stream that never opened (a host whose stream URL the browser cannot\n * reach) is not retried: callable reads take over at once.\n * The browser's own EventSource retry cannot do this:\n * it reopens the URL it was given, whose offset is stale the moment a line\n * arrives, so each of its reconnects would duplicate everything since.\n */\nexport function followRunnerLog(\n sessionId: string,\n runId: string,\n from: number,\n handlers: { onEvent(event: RunnerLogStreamEvent): void },\n): RunnerLogFollow {\n let offset = from;\n let retries = 0;\n let closed = false;\n let opened = false;\n let source: EventSource | undefined;\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const controller = new AbortController();\n let decoder = new TextDecoder();\n let pending = '';\n\n const deliver = (event: RunnerLogStreamEvent): void => {\n if (closed) return;\n if (typeof event.offset === 'number') offset = event.offset;\n if (event.ended === true) {\n closed = true;\n source?.close();\n }\n handlers.onEvent(event);\n };\n\n // Callable reads use the client transport, including hosts whose stream URL\n // cannot be reached directly by EventSource.\n const poll = async (): Promise<void> => {\n if (closed) return;\n let delay = POLL_MS;\n try {\n const result = await api.session(sessionId).logRead({\n params: { [RUN_ID_PARAM]: runId },\n query: { [RUNNER_LOG_PARAMS.from]: offset },\n signal: controller.signal,\n });\n if (closed || !result.ok) return;\n const read = result.data;\n if (read.reset) {\n decoder = new TextDecoder();\n pending = '';\n }\n pending += decoder.decode(decodeChunk(read.chunk), { stream: !read.ended });\n const lines = pending.split('\\n');\n pending = lines.pop() ?? '';\n if (read.ended && pending !== '') {\n lines.push(pending);\n pending = '';\n }\n deliver({ lines, offset: read.offset, ended: read.ended });\n if (read.hasMore) delay = 0;\n } catch {\n // A failed read leaves the cursor alone and is retried on the next poll.\n } finally {\n if (!closed) timer = setTimeout(() => void poll(), delay);\n }\n };\n\n const open = (): void => {\n if (closed) return;\n let current: EventSource;\n try {\n current = new EventSource(\n api\n .session(sessionId)\n .logStream.url({ params: { [RUN_ID_PARAM]: runId }, query: { [RUNNER_LOG_PARAMS.from]: offset } }),\n );\n } catch {\n void poll();\n return;\n }\n source = current;\n current.addEventListener('open', () => {\n opened = true;\n });\n current.addEventListener(RUNNER_LOG_STREAM_EVENT, (message) => {\n let parsed: unknown;\n try {\n parsed = JSON.parse((message as MessageEvent<string>).data);\n } catch {\n return; // A truncated frame is the next one's problem, not a reason to drop the stream.\n }\n if (!isRecord(parsed) || !Array.isArray(parsed.lines)) return;\n const event = parsed as unknown as RunnerLogStreamEvent;\n opened = true;\n retries = 0;\n // Stand down before the server's final close reaches us as an error.\n deliver(event);\n });\n current.addEventListener('error', () => {\n current.close();\n if (closed) return;\n retries += 1;\n if (!opened || retries > MAX_RETRIES) {\n void poll();\n return;\n }\n timer = setTimeout(open, RETRY_BASE_MS * 2 ** (retries - 1));\n });\n };\n\n open();\n return {\n close: () => {\n closed = true;\n if (timer !== undefined) clearTimeout(timer);\n source?.close();\n controller.abort();\n },\n };\n}\n","import type { TransientTab, WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { AnsiLine, Button, ChevronDownIcon, Input, SearchIcon, StatusBadge } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport type { RunnerLogResponse } from '../../../../../types/webRunnerLog';\nimport type { RunnerRunView } from '../../../../../types/webRunners';\nimport { formatRunnerUptime, isFollowingLive, logViewLines, runnerBadge, tailLineNumbers } from '../_lib/format';\nimport { fetchRunnerLog, followRunnerLog } from '../_lib/logApi';\nimport { requestRunnerStop, runners } from '../_lib/runnersStore';\n\n/** The tab id doubles as the URL segment, so it stays plain and unique across plugins. */\nconst TAB_ID_PREFIX = 'runner-log-';\n/** Lines held in the view; a follow that ran all day must not grow without bound. */\nconst MAX_VIEW_LINES = 2000;\n/** Context lines each side of a match, the same either-side window grep would use. */\nconst CONTEXT_LINES = 2;\n/** A query is typed a character at a time; each one costs a whole-file read on the hub. */\nconst SEARCH_DEBOUNCE_MS = 200;\n/** How close to the bottom still counts as \"at the bottom\" for following. */\nconst NEAR_BOTTOM_PX = 24;\nconst BYTES_PER_KB = 1024;\nconst BYTES_PER_MB = BYTES_PER_KB * BYTES_PER_KB;\n\n/** The temporary tab for one runner's log; the host keeps this panel while the tab is open. */\nexport function runnerLogTab(run: RunnerRunView): TransientTab {\n const runId = run.id;\n return {\n id: `${TAB_ID_PREFIX}${runId}`,\n label: `log · ${run.name}`,\n panel: (props: WebPluginSlotProps) => <RunnerLogPanel {...props} runId={runId} />,\n };\n}\n\nfunction formatSize(bytes: number): string {\n if (bytes < BYTES_PER_KB) return `${bytes} B`;\n if (bytes < BYTES_PER_MB) return `${(bytes / BYTES_PER_KB).toFixed(1)} KB`;\n return `${(bytes / BYTES_PER_MB).toFixed(1)} MB`;\n}\n\n/** Whether one line is a match rather than the context printed around one. */\nfunction isMatch(line: string, needle: string, ignoreCase: boolean): boolean {\n if (needle === '') return false;\n return ignoreCase ? line.toLowerCase().includes(needle.toLowerCase()) : line.includes(needle);\n}\n\n/**\n * One rendered log line: its number, whether it matched, and the text.\n *\n * A row per line rather than one block of joined text. The block form re-parsed\n * every line's escapes whenever a single line arrived, because the parse was\n * keyed on the joined string; keyed by line number instead, an append only\n * costs the line that appended.\n */\nfunction LogRow({\n number,\n line,\n matched,\n dimmed,\n}: {\n number: number | undefined;\n line: string;\n matched: boolean;\n /** Context around a match, printed quieter than the match itself. */\n dimmed: boolean;\n}) {\n return (\n <div data-testid=\"runner-log-row\" data-matched={matched} className=\"flex min-w-0 gap-2\">\n {number === undefined ? null : (\n <span className=\"w-12 shrink-0 select-none text-right font-mono text-sm leading-relaxed text-po-faint\">\n {number}\n </span>\n )}\n <span\n aria-hidden\n className={`w-4 shrink-0 select-none font-mono text-sm leading-relaxed ${matched ? 'text-po-yellow' : 'text-po-faint'}`}\n >\n {matched ? '>>' : ''}\n </span>\n <AnsiLine\n line={line}\n className={`min-w-0 flex-1 whitespace-pre-wrap break-words font-mono text-sm leading-relaxed ${\n dimmed ? 'text-po-dim' : 'text-po-text'\n }`}\n />\n </div>\n );\n}\n\n/**\n * One runner's log: the bounded tail, following while the runner writes, and\n * a grep over the whole file when the reader types a query.\n *\n * Search is not find-next. The reader matches a literal substring and answers\n * with the matching lines and their context, so a query replaces the view\n * rather than moving a cursor through it, and following pauses while one is\n * set because a filtered view is a snapshot of a file that is still growing.\n */\nexport function RunnerLogPanel({\n sessionId,\n runId,\n sendSessionFrame,\n onTerminal,\n}: WebPluginSlotProps & {\n runId: string;\n /** Returns an embedded view to the runner's live terminal; absent for a runner without one. */\n onTerminal?: () => void;\n}) {\n const { runs, stopRequested } = useStore(runners.store, (state) => runners.select(state, sessionId));\n const run = runs.find((candidate) => candidate.id === runId);\n const [typed, setTyped] = useState('');\n const [query, setQuery] = useState('');\n const [ignoreCase, setIgnoreCase] = useState(false);\n const [context, setContext] = useState(CONTEXT_LINES);\n const [following, setFollowing] = useState(true);\n const [slice, setSlice] = useState<RunnerLogResponse | undefined>(undefined);\n const [streamFrom, setStreamFrom] = useState<number | undefined>(undefined);\n const [appended, setAppended] = useState<string[]>([]);\n /** How far the stream has read, so the size shown grows with the lines instead of staying at the first read. */\n const [followedBytes, setFollowedBytes] = useState(0);\n const [error, setError] = useState<string | undefined>(undefined);\n /** False once the reader scrolls up: following must not yank them back down. */\n const [pinned, setPinned] = useState(true);\n /** A long command would eat a phone screen, so it starts as one truncated line. */\n const [commandOpen, setCommandOpen] = useState(false);\n const bottom = useRef<HTMLDivElement | null>(null);\n const body = useRef<HTMLDivElement | null>(null);\n\n const filtering = query !== '';\n const live = isFollowingLive(following, filtering, slice?.running === true);\n\n // Typing is not a question yet. Reading the log costs a whole-file scan on\n // the hub, so the question is asked once the reader stops typing.\n useEffect(() => {\n const timer = setTimeout(() => setQuery(typed), SEARCH_DEBOUNCE_MS);\n return () => clearTimeout(timer);\n }, [typed]);\n\n const load = useCallback(\n (signal: AbortSignal) => {\n if (sessionId === null) return;\n const params = filtering ? { grep: query, ignoreCase, contextLines: context } : {};\n void fetchRunnerLog(sessionId, runId, params, signal).then((result) => {\n if (signal.aborted) return;\n if ('error' in result) {\n if (result.error !== '') setError(result.error);\n return;\n }\n setError(undefined);\n setAppended([]);\n setFollowedBytes(0);\n setSlice(result.slice);\n setStreamFrom(result.slice.completeBytes);\n });\n },\n [sessionId, runId, filtering, query, ignoreCase, context],\n );\n\n // Re-read whenever the question changes. A query is debounced above, so the\n // in-flight request for the previous one is abandoned only on a real change.\n useEffect(() => {\n const controller = new AbortController();\n load(controller.signal);\n return () => controller.abort();\n }, [load]);\n\n // Keyed on the offset rather than the slice object: a re-read that lands on\n // the same place must not tear down a healthy stream and reopen it.\n useEffect(() => {\n if (!live || sessionId === null || streamFrom === undefined) return;\n const follow = followRunnerLog(sessionId, runId, streamFrom, {\n onEvent: (event) => {\n if (event.lines.length > 0) {\n setAppended((current) => [...current, ...event.lines].slice(-MAX_VIEW_LINES));\n }\n if (typeof event.offset === 'number') setFollowedBytes(event.offset);\n if (event.ended === true) setFollowing(false);\n },\n });\n return () => follow.close();\n }, [live, sessionId, runId, streamFrom]);\n\n // A slice read mid-line ends in a fragment the stream will send again whole.\n const partialTail = slice !== undefined && slice.exists && slice.completeBytes < slice.fileSize;\n const view = logViewLines(slice?.text ?? '', appended, MAX_VIEW_LINES, { dropPartialTail: live && partialTail });\n const numbers = useMemo(() => {\n if (slice === undefined) return [];\n if (filtering) return slice.lineNumbers ?? [];\n const last = slice.totalLines + appended.length - (live && partialTail ? 1 : 0);\n return tailLineNumbers(last, view.lines.length);\n }, [slice, filtering, appended.length, live, partialTail, view.lines.length]);\n\n useEffect(() => {\n if (live && pinned) bottom.current?.scrollIntoView({ block: 'end' });\n }, [live, pinned, view.lines.length]);\n\n // Following is a promise to show the newest line, not a promise to drag the\n // reader there. Scrolling up is how they say they are reading something else.\n const onScroll = (): void => {\n const element = body.current;\n if (element === null) return;\n setPinned(element.scrollHeight - element.scrollTop - element.clientHeight <= NEAR_BOTTOM_PX);\n };\n\n const badge = runnerBadge(run);\n const stopping = run !== undefined && stopRequested.includes(run.id);\n\n return (\n <div data-testid=\"runner-log-panel\" className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"flex min-h-11 shrink-0 flex-wrap items-center gap-2 border-b border-po-border-soft px-3 py-2 sm:h-11 sm:flex-nowrap sm:gap-2.5 sm:px-[26px] sm:py-0\">\n <span data-testid=\"runner-log-name\" className=\"shrink-0 truncate text-base font-semibold text-po-hi\">\n {run?.name ?? runId}\n </span>\n <StatusBadge tone={badge.tone} size=\"md\" data-testid=\"runner-log-state\">\n {badge.label}\n </StatusBadge>\n {run?.exit?.code !== undefined && run.exit.code !== null ? (\n <span data-testid=\"runner-log-exit-code\" className=\"shrink-0 text-sm text-po-dim\">\n {`exit ${String(run.exit.code)}`}\n </span>\n ) : null}\n {run ? (\n <>\n <RunnerUptime run={run} />\n <span className=\"shrink-0 text-sm text-po-dim\">\n {`pid ${String(run.pid)} · ${run.backend}${run.interactive ? ' · tty' : ''}`}\n </span>\n </>\n ) : (\n <span data-testid=\"runner-log-gone\" className=\"text-sm text-po-dim\">\n no longer listed; its log stays readable\n </span>\n )}\n <span className=\"min-w-0 flex-1\" />\n {onTerminal ? (\n <Button variant=\"outline\" size=\"sm\" data-testid=\"runner-log-terminal\" onClick={onTerminal}>\n Back to terminal\n </Button>\n ) : null}\n {run !== undefined && run.state === 'running' && sessionId !== null ? (\n <Button\n variant={stopping ? 'outline' : 'danger-outline'}\n size=\"sm\"\n data-testid=\"runner-log-stop\"\n disabled={stopping}\n title={stopping ? 'stop requested; the runner reports its own exit' : 'ask the runtime to stop this runner'}\n onClick={() => requestRunnerStop(sendSessionFrame, sessionId, run.id)}\n >\n {stopping ? 'Stopping…' : 'Stop'}\n </Button>\n ) : null}\n </div>\n\n {run ? (\n <div className=\"shrink-0 border-b border-po-border-soft px-3 py-3 sm:px-[26px]\">\n <div className=\"flex items-start gap-2 rounded-md bg-po-deep px-3 py-2\">\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span\n data-testid=\"runner-log-command\"\n title={commandOpen ? undefined : `${run.command}\\nin ${run.cwd}`}\n className={`font-mono text-base text-po-hi ${commandOpen ? 'break-all' : 'truncate'}`}\n >\n <span aria-hidden className=\"select-none text-po-faint\">\n ${' '}\n </span>\n {run.command}\n </span>\n {commandOpen ? <span className=\"break-all font-mono text-sm text-po-dim\">in {run.cwd}</span> : null}\n </div>\n <button\n type=\"button\"\n data-testid=\"runner-log-command-toggle\"\n aria-expanded={commandOpen}\n aria-label={commandOpen ? 'Collapse command' : 'Expand command'}\n className=\"flex size-6 shrink-0 items-center justify-center rounded text-po-faint hover:text-po-hi\"\n onClick={() => setCommandOpen((open) => !open)}\n >\n <ChevronDownIcon className={`size-4 transition-transform ${commandOpen ? 'rotate-180' : ''}`} />\n </button>\n </div>\n </div>\n ) : null}\n\n <div className=\"flex min-h-11 shrink-0 flex-wrap items-center gap-2 border-b border-po-border-soft px-3 py-2 sm:flex-nowrap sm:gap-2.5 sm:px-[26px]\">\n <span className=\"relative flex min-w-0 flex-1 items-center sm:w-72 sm:flex-none\">\n <SearchIcon className=\"pointer-events-none absolute left-2.5 h-3.5 w-3.5 text-po-faint\" />\n <Input\n size=\"md\"\n data-testid=\"runner-log-search\"\n value={typed}\n placeholder=\"Search output\"\n onChange={(event) => setTyped(event.target.value)}\n className=\"w-full pl-8\"\n />\n </span>\n <Button\n variant={ignoreCase ? 'subtle' : 'outline'}\n size=\"sm\"\n data-testid=\"runner-log-ignore-case\"\n aria-pressed={ignoreCase}\n title=\"match regardless of case\"\n onClick={() => setIgnoreCase((current) => !current)}\n >\n {ignoreCase ? 'Any case' : 'Match case'}\n </Button>\n <Button\n variant={context > 0 && filtering ? 'subtle' : 'outline'}\n size=\"sm\"\n data-testid=\"runner-log-context\"\n disabled={!filtering}\n title=\"lines of context kept either side of a match\"\n onClick={() => setContext((current) => (current === 0 ? CONTEXT_LINES : 0))}\n >\n {`± ${String(context)} lines`}\n </Button>\n <span className=\"min-w-0 flex-1\" />\n <span data-testid=\"runner-log-stats\" className=\"min-w-0 basis-full truncate text-sm text-po-dim sm:basis-auto\">\n {slice === undefined\n ? 'reading…'\n : filtering\n ? `${String(slice.lineCount)} matching of ${slice.totalLines.toLocaleString('en-US')} lines`\n : `${live ? 'tailing' : 'showing'} last ${String(view.lines.length)} of ${(slice.totalLines + (live ? appended.length : 0)).toLocaleString('en-US')} lines`}\n {view.hidden > 0 ? ` · ${view.hidden.toLocaleString('en-US')} older hidden` : ''}\n </span>\n <Button\n variant={live ? 'subtle' : 'outline'}\n size=\"sm\"\n data-testid=\"runner-log-follow\"\n aria-pressed={live}\n disabled={filtering || slice?.running !== true}\n title={filtering ? 'a filtered view is a snapshot; clear the query to follow' : 'follow the log as it grows'}\n onClick={() => setFollowing((current) => !current)}\n >\n {filtering ? 'Paused while searching' : live ? 'Following' : 'Follow'}\n </Button>\n </div>\n\n <div className=\"relative min-h-0 flex-1\">\n <div\n ref={body}\n onScroll={onScroll}\n data-testid=\"runner-log-body\"\n className=\"h-full overflow-auto bg-po-deep px-3 py-3 sm:px-[26px]\"\n >\n {error !== undefined ? (\n <p data-testid=\"runner-log-error\" className=\"text-sm text-po-red\">\n {error}\n </p>\n ) : slice === undefined ? (\n <p data-testid=\"runner-log-reading\" className=\"text-sm text-po-dim\">\n reading…\n </p>\n ) : slice.exists === false ? (\n <p className=\"text-sm text-po-dim\">This runner has not printed anything yet.</p>\n ) : view.lines.length === 0 ? (\n <p className=\"text-sm text-po-dim\">{filtering ? 'Nothing matched.' : 'The log is empty.'}</p>\n ) : (\n view.lines.map((line, index) => {\n const number = numbers[index];\n const previous = numbers[index - 1];\n const gap = previous !== undefined && number !== undefined && number - previous > 1;\n return (\n <Fragment key={number ?? `row-${String(index)}`}>\n {gap ? (\n <div\n data-testid=\"runner-log-gap\"\n aria-hidden\n className=\"select-none py-0.5 pl-14 text-sm leading-relaxed text-po-faint\"\n >\n ⋯\n </div>\n ) : null}\n <LogRow\n number={number}\n line={line}\n matched={filtering && isMatch(line, query, ignoreCase)}\n dimmed={filtering && !isMatch(line, query, ignoreCase)}\n />\n </Fragment>\n );\n })\n )}\n <div ref={bottom} />\n </div>\n {live && !pinned ? (\n <Button\n variant=\"subtle\"\n size=\"sm\"\n data-testid=\"runner-log-jump\"\n title=\"scroll back to the newest lines and keep following\"\n onClick={() => {\n setPinned(true);\n bottom.current?.scrollIntoView({ block: 'end' });\n }}\n className=\"absolute bottom-3 right-3\"\n >\n Jump to latest\n </Button>\n ) : null}\n </div>\n\n <div className=\"flex h-8 shrink-0 items-center gap-2.5 border-t border-po-border-soft px-3 sm:px-[26px]\">\n <span data-testid=\"runner-log-path\" className=\"min-w-0 flex-1 truncate font-mono text-sm text-po-dim\">\n {run?.logPath ?? slice?.path ?? ''}\n </span>\n {slice !== undefined ? (\n <span className=\"shrink-0 text-sm text-po-dim\">{formatSize(Math.max(slice.fileSize, followedBytes))}</span>\n ) : null}\n </div>\n </div>\n );\n}\n\n/** Seconds below a minute, then minutes, hours and days, without rendering the log or activity panel. */\nexport function RunnerUptime({ run }: { run: RunnerRunView }) {\n const ref = useRef<HTMLSpanElement>(null);\n const [mountedAt] = useState(Date.now);\n useEffect(() => {\n if (run.exit || run.state !== 'running') return;\n const update = () => {\n const node = ref.current?.firstChild;\n if (node) node.nodeValue = formatRunnerUptime(run.startedAt, Date.now());\n };\n update();\n const timer = setInterval(update, 1_000);\n return () => clearInterval(timer);\n }, [run.startedAt, run.state, run.exit]);\n return (\n <span ref={ref} className=\"shrink-0 text-sm text-po-dim\">\n {formatRunnerUptime(run.startedAt, run.exit ? Date.parse(run.exit.finishedAt) : mountedAt)}\n </span>\n );\n}\n","import type { TransientTab, WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { Button, SearchIcon, StatusBadge, type TerminalHandle, TerminalView } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { RunnerRunView } from '../../../../../types/webRunners';\nimport { requestRunnerStop, runners } from '../_lib/runnersStore';\nimport { decodeChunk, sendRunnerInput, watchRunnerScreen } from '../_lib/screenApi';\nimport { runnerLogTab } from './RunnerLogPanel';\n\nconst TAB_ID_PREFIX = 'runner-shell-';\n/** Keystrokes are gathered for this long and sent as one request. */\nconst FLUSH_MS = 30;\n\n/** The temporary tab holding one interactive runner's pane. */\nexport function runnerShellTab(run: RunnerRunView): TransientTab {\n const runId = run.id;\n return {\n id: `${TAB_ID_PREFIX}${runId}`,\n label: `shell · ${run.name}`,\n panel: (props: WebPluginSlotProps) => <RunnerShellPanel {...props} runId={runId} />,\n };\n}\n\n/**\n * An interactive runner's pane, attached.\n *\n * A real terminal emulator, fed the pane's own bytes. The runner's sink keeps\n * an unscrubbed copy of its output beside the log for exactly this: the log is\n * stripped of cursor movement so it stays worth grepping, which is precisely\n * what a terminal needs. Because these are the original bytes, colour, cursor\n * placement and full-screen programs all render the way they would in a shell.\n *\n * xterm is loaded when the tab opens rather than with the plugin. Most sessions\n * never attach to anything, and an emulator is not a small thing to carry.\n *\n * Search reads the scrubbed log the sink writes beside the raw bytes, so it\n * hands over to the log view: `onSearch` when the panel is embedded, the\n * runner's log tab otherwise.\n */\nexport function RunnerShellPanel({\n sessionId,\n runId,\n sendSessionFrame,\n openTransientTab,\n onSearch,\n}: WebPluginSlotProps & { runId: string; onSearch?: () => void }) {\n const { runs, stopRequested } = useStore(runners.store, (state) => runners.select(state, sessionId));\n const run = runs.find((candidate) => candidate.id === runId);\n const [ended, setEnded] = useState(false);\n const [lost, setLost] = useState(false);\n const [ready, setReady] = useState(false);\n const terminal = useRef<TerminalHandle | null>(null);\n const pending = useRef<string[]>([]);\n const flush = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n useEffect(() => {\n if (sessionId === null || !ready) return;\n const watch = watchRunnerScreen(sessionId, runId, 0, {\n onEvent: (event) => {\n if (event.chunk !== '') terminal.current?.write(decodeChunk(event.chunk));\n if (event.ended === true) setEnded(true);\n },\n onLost: () => setLost(true),\n });\n return () => watch.close();\n }, [sessionId, runId, ready]);\n\n useEffect(\n () => () => {\n if (flush.current !== undefined) clearTimeout(flush.current);\n },\n [],\n );\n\n // Batched: a burst of typing is one request rather than one per character,\n // and the pane sees the keys in the order they were pressed either way.\n const send = (text: string): void => {\n if (sessionId === null) return;\n pending.current.push(text);\n if (flush.current !== undefined) return;\n flush.current = setTimeout(() => {\n const batch = pending.current.join('');\n pending.current = [];\n flush.current = undefined;\n if (batch !== '') void sendRunnerInput(sessionId, runId, batch);\n }, FLUSH_MS);\n };\n\n const live = run?.state === 'running' && !ended;\n const stopping = stopRequested.includes(runId);\n\n return (\n <div data-testid=\"runner-shell-panel\" className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"flex min-h-11 shrink-0 flex-wrap items-center gap-2 border-b border-po-border-soft px-3 py-2 sm:flex-nowrap sm:gap-2.5 sm:px-[26px] sm:py-1.5\">\n <span data-testid=\"runner-shell-name\" className=\"shrink-0 truncate text-base font-semibold text-po-hi\">\n {run?.name ?? runId}\n </span>\n <StatusBadge tone={live ? 'running' : 'neutral'} size=\"md\" data-testid=\"runner-shell-state\">\n {live ? 'Running' : 'Ended'}\n </StatusBadge>\n {run ? <span className=\"min-w-0 truncate font-mono text-sm text-po-dim\">{run.command}</span> : null}\n <span className=\"min-w-0 flex-1\" />\n {lost ? (\n <span data-testid=\"runner-shell-lost\" className=\"shrink-0 text-sm text-po-red\">\n The connection to this terminal dropped. Reopen the runner to attach again.\n </span>\n ) : null}\n {run ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n data-testid=\"runner-shell-search\"\n title=\"search everything this runner has printed\"\n onClick={() => (onSearch ? onSearch() : openTransientTab(runnerLogTab(run)))}\n className=\"gap-1.5\"\n >\n <SearchIcon className=\"h-3.5 w-3.5\" />\n Search output\n </Button>\n ) : null}\n {live ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n data-testid=\"runner-shell-interrupt\"\n title=\"send ctrl-c\"\n onClick={() => send('\\u0003')}\n >\n Ctrl-C\n </Button>\n ) : null}\n {live && sessionId !== null ? (\n <Button\n variant={stopping ? 'outline' : 'danger-outline'}\n size=\"sm\"\n data-testid=\"runner-shell-stop\"\n disabled={stopping}\n title={stopping ? 'stop requested; the runner reports its own exit' : 'ask the runtime to stop this runner'}\n onClick={() => requestRunnerStop(sendSessionFrame, sessionId, runId)}\n >\n {stopping ? 'Stopping…' : 'Stop'}\n </Button>\n ) : null}\n </div>\n\n <div className=\"relative min-h-0 flex-1 overflow-hidden bg-po-deep px-3 py-2 sm:px-[26px]\">\n <TerminalView\n ref={terminal}\n data-testid=\"runner-shell-terminal\"\n onData={(text) => send(text)}\n onReady={() => setReady(true)}\n />\n {ready ? null : (\n <p data-testid=\"runner-shell-reading\" className=\"text-sm text-po-dim\">\n attaching…\n </p>\n )}\n </div>\n\n <div className=\"flex h-8 shrink-0 items-center border-t border-po-border-soft px-3 sm:px-[26px]\">\n <span className=\"min-w-0 flex-1 truncate text-sm text-po-dim\">\n {live\n ? `Typing goes straight to ${run?.name ?? 'the runner'}. Ctrl-C stops what is running.`\n : 'This runner has ended. Its output stays searchable.'}\n </span>\n </div>\n </div>\n );\n}\n","import type { TransientTab, WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { Button, Dot, EmptyState } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { runnerRunRequest } from '../_lib/launchLine';\nimport { requestRunnerStart, runners } from '../_lib/runnersStore';\nimport { RunnerCommandBar } from './RunnerCommandBar';\nimport { RunnerLogPanel } from './RunnerLogPanel';\nimport { RunnerShellPanel } from './RunnerShellPanel';\n\nconst LAUNCH_TIMEOUT_MS = 30_000;\nconst RUNNERS_TAB_ID = 'runner-runs';\n\n/** The temporary tab the dock's runners group opens from its own name. */\nexport function runnersTab(): TransientTab {\n return { id: RUNNERS_TAB_ID, label: 'runners', panel: RunnersPanel };\n}\n\n/**\n * Everything this session has up, and the one place to start another.\n *\n * A runner is a shell: the bar takes a command and runs it on its own\n * terminal, or opens a plain shell when nothing was typed. The selected\n * runner is shown in place, as its terminal when it has one and as its log\n * when it does not (a command the agent backgrounded has no pane).\n *\n * Keep the feed's recently finished runners available here too: a UI-launched\n * command has no originating tool message from which to reopen its log.\n */\nexport function RunnersPanel(props: WebPluginSlotProps) {\n const { sessionId, sendSessionFrame } = props;\n const session = useStore(runners.store, (state) => runners.select(state, sessionId));\n const running = session.runs.filter((run) => run.state === 'running');\n const [command, setCommand] = useState('');\n const [cwd, setCwd] = useState('');\n const [selectedId, setSelectedId] = useState<string | undefined>(undefined);\n /** The terminal runner whose log is being searched instead of shown live. */\n const [searchingId, setSearchingId] = useState<string | undefined>(undefined);\n const launchBaseline = useRef<ReadonlySet<string> | null>(null);\n /** What the pending launch ran, put back if the start fails. */\n const launchedCommand = useRef('');\n const launchTimeout = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n const selected = session.runs.find((run) => run.id === selectedId) ?? session.runs[0];\n\n const launch = (): void => {\n if (sessionId === null) return;\n launchBaseline.current = new Set(session.runs.map((run) => run.id));\n clearTimeout(launchTimeout.current);\n launchTimeout.current = setTimeout(() => {\n launchBaseline.current = null;\n }, LAUNCH_TIMEOUT_MS);\n requestRunnerStart(sendSessionFrame, sessionId, runnerRunRequest(command, cwd));\n launchedCommand.current = command;\n setCommand('');\n };\n\n // ponytail: the first runner to appear after a launch is taken to be it. One\n // the agent starts in the same moment could be picked instead; matching on a\n // request id would need the start line to carry one.\n useEffect(() => {\n const baseline = launchBaseline.current;\n if (baseline === null) return;\n const started = session.runs.find((run) => !baseline.has(run.id));\n if (!started) return;\n launchBaseline.current = null;\n clearTimeout(launchTimeout.current);\n setSelectedId(started.id);\n }, [session.runs]);\n\n // A start that did not happen hands the command back beside its problem.\n const failureId = session.startFailure?.id;\n useEffect(() => {\n if (failureId === undefined || launchBaseline.current === null) return;\n launchBaseline.current = null;\n clearTimeout(launchTimeout.current);\n setCommand(launchedCommand.current);\n }, [failureId]);\n\n useEffect(() => () => clearTimeout(launchTimeout.current), []);\n\n return (\n <div data-testid=\"runners-panel\" className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"flex h-11 shrink-0 items-center gap-2.5 border-b border-po-border-soft px-3 sm:px-[26px]\">\n <span className=\"text-lg font-semibold text-po-hi\">Runners</span>\n <span data-testid=\"runners-panel-count\" className=\"text-sm text-po-dim\">\n {running.length === 0 ? 'Nothing running' : `${String(running.length)} running`}\n </span>\n </div>\n\n {sessionId === null ? null : (\n <RunnerCommandBar\n command={command}\n onCommandChange={setCommand}\n cwd={cwd}\n onCwdChange={setCwd}\n folders={running.map((run) => run.cwd)}\n {...(session.sessionDirectory === undefined ? {} : { sessionDirectory: session.sessionDirectory })}\n {...(session.startFailure === undefined ? {} : { problem: session.startFailure.message })}\n onLaunch={launch}\n />\n )}\n\n {selected === undefined ? (\n <EmptyState\n data-testid=\"runners-panel-empty\"\n className=\"px-4 py-8\"\n title=\"Nothing running yet\"\n description={\n sessionId === null\n ? 'Open a session to start a runner.'\n : 'Type a command above, like pnpm dev, and it opens here as a live terminal.'\n }\n />\n ) : (\n <>\n <div data-testid=\"runners-panel-picker\" className=\"flex shrink-0 flex-wrap gap-1.5 px-3 pt-3 sm:px-[26px]\">\n {session.runs.map((run) => (\n <Button\n key={run.id}\n variant={run === selected ? 'subtle' : 'ghost'}\n size=\"sm\"\n data-testid={`runners-panel-pick-${run.id}`}\n aria-pressed={run === selected}\n title={run.command}\n onClick={() => setSelectedId(run.id)}\n className={`gap-1.5 ${run === selected ? 'text-po-hi' : ''}`}\n >\n <Dot tone={run.state === 'running' ? 'yellow' : 'muted'} pulse={run.state === 'running'} />\n {run.name}\n </Button>\n ))}\n </div>\n <div className=\"mt-3 flex min-h-0 flex-1 flex-col border-t border-po-border-soft\">\n {selected.interactive && selected.state === 'running' && searchingId !== selected.id ? (\n <RunnerShellPanel\n key={selected.id}\n {...props}\n runId={selected.id}\n onSearch={() => setSearchingId(selected.id)}\n />\n ) : (\n <RunnerLogPanel\n key={selected.id}\n {...props}\n runId={selected.id}\n {...(selected.interactive && selected.state === 'running'\n ? { onTerminal: () => setSearchingId(undefined) }\n : {})}\n />\n )}\n </div>\n </>\n )}\n </div>\n );\n}\n","import { defineActivityGroup } from '@agimon-ai/po-core/web';\nimport { PlayCircleIcon } from '@agimon-ai/po-web-components';\n\nimport { runnersTab } from '../_components/RunnersPanel';\nimport { runnerActivitySource } from '../_lib/runnersStore';\nexport default defineActivityGroup({\n keys: 'r l',\n icon: PlayCircleIcon,\n activeSource: runnerActivitySource,\n transientTab: runnersTab,\n order: 20,\n});\n","import { defineChannelFile } from '@agimon-ai/po-core/web';\n\nimport { runnerRunsChannel } from '../_lib/runnersStore';\nexport default defineChannelFile(runnerRunsChannel);\n","import { ansiSpans } from '@agimon-ai/po-web-components';\nimport { useEffect, useState } from 'react';\n\nimport { fetchRunnerLog, followRunnerLog, type RunnerLogFollow } from '../_lib/logApi';\n\n/**\n * The newest line a running runner has written, for a row that has one line to\n * spend.\n *\n * The dock answers \"what is happening\", and a command that has not changed\n * since it started answers \"what was asked\". The last line of the log is the\n * closest thing to progress the cockpit can show without opening the log, so a\n * row that is still running trades its command for it.\n *\n * The line comes from the same two calls the log panel makes: read the tail,\n * then follow the stream from exactly where that read ended. Nothing new goes\n * on the wire, and a runner nobody is looking at is not followed, because the\n * stream lives and dies with the row.\n */\n\n/** Enough lines that a trailing blank, or a final progress redraw, is not the whole answer. */\nconst TAIL_REQUEST_LINES = 5;\n\n/**\n * The last line worth showing, as plain text.\n *\n * Blank lines are skipped, because a log that ends with a newline would\n * otherwise report nothing at all. Colour is dropped rather than rendered: the\n * row is nine pixels of faint text beside a name and a stop control, and a\n * green tick from someone else's palette in the middle of it reads as damage.\n */\nexport function plainTailLine(lines: readonly string[]): string | undefined {\n for (let index = lines.length - 1; index >= 0; index -= 1) {\n const text = ansiSpans(lines[index] ?? '')\n .map((span) => span.text)\n .join('')\n .trim();\n if (text.length > 0) return text;\n }\n return undefined;\n}\n\n/**\n * The newest log line of a running runner, or undefined for a runner that is\n * finished, unreachable, or has not written anything yet. The caller decides\n * what to show instead; this hook never invents a placeholder.\n */\nexport function useRunnerTail(sessionId: string | null, runId: string, running: boolean): string | undefined {\n // Kept with the run it belongs to, so a row that is reused for another\n // runner shows nothing rather than the previous runner's output.\n const [tail, setTail] = useState<{ runId: string; text: string } | undefined>(undefined);\n\n useEffect(() => {\n if (!running || sessionId === null) return;\n let live = true;\n let follow: RunnerLogFollow | undefined;\n const controller = new AbortController();\n void fetchRunnerLog(sessionId, runId, { lines: TAIL_REQUEST_LINES }, controller.signal).then((result) => {\n // A log the hub cannot serve leaves the row on its command, which is\n // still true; the log tab is where an unreachable runner is diagnosed.\n if (!live || 'error' in result) return;\n const initial = plainTailLine(result.slice.text.split('\\n'));\n if (initial !== undefined) setTail({ runId, text: initial });\n if (!result.slice.running) return;\n follow = followRunnerLog(sessionId, runId, result.slice.completeBytes, {\n onEvent: (event) => {\n const next = plainTailLine(event.lines);\n if (live && next !== undefined) setTail({ runId, text: next });\n },\n });\n });\n return () => {\n live = false;\n controller.abort();\n follow?.close();\n };\n }, [sessionId, runId, running]);\n\n return running && tail?.runId === runId ? tail.text : undefined;\n}\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { ArrowRightIcon, Button, Dot } from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useSyncExternalStore } from 'react';\n\nimport type { RunnerRunView } from '../../../../../../types/webRunners';\nimport { runnerLogTab, RunnerUptime } from '../../_components/RunnerLogPanel';\nimport { runnersTab } from '../../_components/RunnersPanel';\nimport { useRunnerTail } from '../../_components/runnerTail';\nimport { isRunnerActivityVisible, requestRunnerStop, runnerActivitySource, runners } from '../../_lib/runnersStore';\n\n/**\n * The runners group's body in the activity dock: what this session has up\n * right now.\n *\n * Only runners running for more than three seconds are listed. A finished one leaves the moment it exits,\n * because the dock answers \"what is happening\", and a rail that keeps ten\n * completed playwright calls around buries the one command still working. The\n * runtime keeps every record; `po-runner list` and the run's own log tab are\n * where a finished run is read.\n */\nexport function RunnersActivitySection({ sessionId, sendSessionFrame, openTransientTab }: WebPluginSlotProps) {\n const session = useStore(runners.store, (state) => runners.select(state, sessionId));\n const visibleCount = () => session.runs.filter((run) => isRunnerActivityVisible(run)).length;\n useSyncExternalStore(runnerActivitySource.subscribe, visibleCount, visibleCount);\n const running = session.runs.filter((run) => isRunnerActivityVisible(run));\n\n if (running.length === 0) {\n return (\n <div className=\"flex flex-wrap items-center gap-x-4 gap-y-1\">\n <p data-testid=\"activity-summary-runners\" className=\"text-sm text-po-dim\">\n Idle\n </p>\n {sessionId === null ? null : (\n <Button\n variant=\"link\"\n size=\"sm\"\n data-testid=\"activity-runner-launch\"\n className=\"h-auto gap-1 px-0 text-po-green\"\n onClick={() => openTransientTab(runnersTab())}\n >\n Launch a runner\n <ArrowRightIcon aria-hidden className=\"size-3.5\" />\n </Button>\n )}\n </div>\n );\n }\n\n return (\n <div data-testid=\"activity-runner-runs\" className=\"flex flex-col gap-0.5\">\n {running.map((run: RunnerRunView) => (\n <RunnerRow\n key={run.id}\n run={run}\n stopRequested={session.stopRequested.includes(run.id)}\n sessionId={sessionId}\n sendSessionFrame={sendSessionFrame}\n openTransientTab={openTransientTab}\n />\n ))}\n </div>\n );\n}\n\n/**\n * One running runner: its name, how long it has been up, a stop control, and\n * one line of what it is doing. Its own component because the tail line is a\n * subscription per row, and a row that scrolls out of the dock closes it.\n */\nfunction RunnerRow({\n run,\n stopRequested,\n sessionId,\n sendSessionFrame,\n openTransientTab,\n}: {\n run: RunnerRunView;\n stopRequested: boolean;\n} & Pick<WebPluginSlotProps, 'sessionId' | 'sendSessionFrame' | 'openTransientTab'>) {\n const tail = useRunnerTail(sessionId, run.id, run.state === 'running');\n return (\n <Button\n variant=\"ghost\"\n size=\"card\"\n data-testid={`activity-runner-${run.id}`}\n data-runner-tone=\"running\"\n title=\"open this runner's log\"\n onClick={() => {\n if (sessionId === null) return;\n openTransientTab(runnerLogTab(run));\n }}\n className=\"min-w-0 gap-0.5 rounded-md px-1 py-1 hover:bg-po-panel\"\n >\n <span className=\"flex min-w-0 items-center gap-1.5\">\n <Dot tone=\"yellow\" pulse />\n <span className=\"min-w-0 flex-1 truncate text-left text-base font-semibold text-po-hi\">{run.name}</span>\n <span className=\"shrink-0 text-sm text-po-dim\">\n <RunnerUptime run={run} />\n {run.interactive ? ' · tty' : ''}\n </span>\n {sessionId !== null ? (\n <Button\n asChild\n variant={stopRequested ? 'outline' : 'danger-outline'}\n size=\"xs\"\n data-testid={`activity-runner-stop-${run.id}`}\n data-stopping={stopRequested}\n title={\n stopRequested ? 'stop requested; the runner reports its own exit' : 'ask the runtime to stop this runner'\n }\n className=\"px-1.5\"\n >\n {/* The row is already a button, so the stop control lends it\n the primitive's styling rather than nesting a second one. */}\n <span\n role=\"button\"\n tabIndex={stopRequested ? -1 : 0}\n aria-disabled={stopRequested}\n onClick={(event) => {\n event.stopPropagation();\n if (!stopRequested) requestRunnerStop(sendSessionFrame, sessionId, run.id);\n }}\n onKeyDown={(event) => {\n if (event.key !== 'Enter' && event.key !== ' ') return;\n event.preventDefault();\n event.stopPropagation();\n if (!stopRequested) requestRunnerStop(sendSessionFrame, sessionId, run.id);\n }}\n >\n {stopRequested ? 'stopping…' : 'stop'}\n </span>\n </Button>\n ) : null}\n </span>\n {/* What it is doing, falling back to what it was asked to do until the\n first line of output arrives. */}\n <span\n data-testid={`activity-runner-detail-${run.id}`}\n data-detail={tail === undefined ? 'command' : 'tail'}\n className=\"truncate pl-3 text-left text-sm text-po-dim\"\n >\n {tail ?? run.command}\n </span>\n </Button>\n );\n}\n","import { defineFill } from '@agimon-ai/po-core/web';\n\nimport { RunnersActivitySection } from './_components/RunnersActivitySection';\nexport default defineFill({ component: RunnersActivitySection });\n","/**\n * Pure view logic for the bash tool card, shared by the web and native halves.\n * Every input is the wire JSON of a tool_execution frame.\n */\n\nimport type { RunnerRunView } from '../../../../../../types/webRunners';\n\nconst ELLIPSIS = '…';\n/** Spaced so the join never glues two words into one unreadable token. */\nconst GAP = ' … ';\n/** Wide enough to keep a realistic command intact, short enough to stay on a few rows. */\nconst MAX_COMMAND_LENGTH = 160;\n/** Lines of log kept in the collapsed result, before the card is expanded. */\nconst COLLAPSED_TAIL_LINES = 12;\n/** Live output is unbounded while a command runs, so the running state keeps only a window. */\nconst STREAM_TAIL_LINES = 12;\nconst BYTES_PER_KB = 1024;\nconst BYTES_PER_MB = BYTES_PER_KB * BYTES_PER_KB;\n/** The user's home on the two platforms the runner ships for; the browser cannot ask the OS. */\nconst HOME_PATH = /(?<![\\w.-])(?:\\/Users|\\/home)\\/[^/\\s]+(?=\\/|\\s|$)/g;\n\n/** The bash tool's arguments as the frame carries them (src/schemas/bashTool.ts). */\nexport interface BashCallArgs {\n command?: unknown;\n timeout?: unknown;\n background?: unknown;\n interactive?: unknown;\n name?: unknown;\n}\n\n/** Scalar and sequence result details, read only by the renderers. */\nexport interface BashResultDetails {\n id?: string;\n runner?: string;\n exitCode?: number | null;\n logPath?: string;\n fileSize?: number;\n lines?: number;\n timedOut?: boolean;\n promoted?: boolean;\n reason?: string;\n tail?: string;\n tailLines?: number;\n sequenceId?: string;\n stages?: Array<{ index: number; state: string; logPath?: string }>;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Narrows the result details to the fields the card reads; anything else is ignored. */\nexport function bashResultDetails(details: unknown): BashResultDetails {\n if (!isRecord(details)) return {};\n const out: BashResultDetails = {};\n if (typeof details.id === 'string') out.id = details.id;\n if (typeof details.runner === 'string') out.runner = details.runner;\n if (typeof details.exitCode === 'number' || details.exitCode === null) out.exitCode = details.exitCode;\n if (typeof details.logPath === 'string') out.logPath = details.logPath;\n if (typeof details.fileSize === 'number') out.fileSize = details.fileSize;\n if (typeof details.lines === 'number') out.lines = details.lines;\n if (details.timedOut === true) out.timedOut = true;\n if (details.promoted === true) out.promoted = true;\n if (typeof details.reason === 'string') out.reason = details.reason;\n if (typeof details.tail === 'string') out.tail = details.tail;\n if (typeof details.tailLines === 'number') out.tailLines = details.tailLines;\n if (typeof details.sequenceId === 'string') {\n out.sequenceId = details.sequenceId;\n if (Array.isArray(details.stages)) {\n out.stages = details.stages.flatMap((stage) => {\n if (\n !isRecord(stage) ||\n !Number.isInteger(stage.index) ||\n Number(stage.index) < 0 ||\n typeof stage.state !== 'string'\n )\n return [];\n return [\n {\n index: Number(stage.index),\n state: stage.state,\n ...(typeof stage.logPath === 'string' ? { logPath: stage.logPath } : {}),\n },\n ];\n });\n }\n }\n return out;\n}\n\n/** `/Users/me/x` becomes `~/x`. Absolute home paths are what push these lines onto extra rows. */\nexport function abbreviateHome(text: string): string {\n return text.replace(HOME_PATH, '~');\n}\n\n/** Collapse a heredoc or multi-line script to one scannable line plus a count. */\nexport function collapseCommand(command: string): string {\n const lines = command\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line.length > 0);\n const first = lines[0] ?? '';\n return lines.length > 1 ? `${first} ${ELLIPSIS} +${lines.length - 1} lines` : first;\n}\n\n/** Drop the middle rather than the end, so a long pipeline keeps both its source and its sink. */\nexport function truncateMiddle(text: string, max: number = MAX_COMMAND_LENGTH): string {\n if (text.length <= max) return text;\n const keep = max - GAP.length;\n const head = Math.ceil(keep / 2);\n let start = text.slice(0, head);\n let end = text.slice(text.length - (keep - head));\n\n // Snap both cuts to a token boundary, so neither side ends mid-word. Each is\n // only moved when a boundary exists in the half nearest the cut, otherwise a\n // single long argument would swallow the whole budget.\n const lastSpace = start.lastIndexOf(' ');\n if (lastSpace > start.length / 2) start = start.slice(0, lastSpace);\n const firstSpace = end.indexOf(' ');\n if (firstSpace >= 0 && firstSpace < end.length / 2) end = end.slice(firstSpace + 1);\n\n return `${start}${GAP}${end}`;\n}\n\n/** Arrays are separate commands; the expanded body keeps their boundaries visible. */\nexport function bashCommandText(command: unknown): string {\n if (typeof command === 'string') return command;\n return Array.isArray(command) && command.every((entry) => typeof entry === 'string') ? command.join('\\n\\n') : '';\n}\n\nexport function formatBashCommand(command: unknown): string {\n const text = bashCommandText(command);\n if (text.length === 0) return '';\n const first = Array.isArray(command) ? bashCommandText(command[0]) : text;\n const suffix = Array.isArray(command) && command.length > 1 ? ` ${ELLIPSIS} +${command.length - 1} commands` : '';\n return truncateMiddle(`${abbreviateHome(collapseCommand(first))}${suffix}`);\n}\n\n/** Modifiers worth seeing at a glance, in the widget's `·` idiom. */\nexport function formatBashFlags(args: BashCallArgs): string[] {\n const flags: string[] = [];\n if (args.background === true) flags.push('bg');\n if (args.interactive === true) flags.push('tty');\n if (typeof args.timeout === 'number') flags.push(`${args.timeout}s`);\n if (typeof args.name === 'string' && args.name.length > 0) flags.push(args.name);\n return flags;\n}\n\n/** Human-readable byte count, matching how pi reports output sizes. */\nexport function formatSize(bytes: number): string {\n if (bytes < BYTES_PER_KB) return `${bytes} B`;\n if (bytes < BYTES_PER_MB) return `${(bytes / BYTES_PER_KB).toFixed(1)} KB`;\n return `${(bytes / BYTES_PER_MB).toFixed(1)} MB`;\n}\n\n/** The metadata footer, collapsed from five lines to one. */\nexport function formatResultSummary(details: BashResultDetails): string {\n const parts: string[] = [];\n if (details.lines !== undefined) parts.push(`${details.lines.toLocaleString('en-US')} lines`);\n if (details.fileSize !== undefined) parts.push(formatSize(details.fileSize));\n if (details.runner !== undefined) parts.push(details.runner);\n return parts.join(' · ');\n}\n\n/** Last `max` lines, so a chatty command cannot push the transcript off screen. */\nfunction lastLines(text: string, max: number): string[] {\n const all = text.split('\\n');\n while (all.length > 0 && all[all.length - 1]?.trim() === '') all.pop();\n return all.length <= max ? all : all.slice(-max);\n}\n\nexport type BashStatusTone = 'running' | 'ok' | 'error' | 'background';\n\nexport interface BashStatusLine {\n glyph: string;\n tone: BashStatusTone;\n text: string;\n}\n\n/** What the result body shows: the log lines, then the one-line status under them. */\nexport interface BashResultView {\n lines: string[];\n status: BashStatusLine | null;\n /** Lines the collapsed view is hiding, so the card can say so. */\n hidden: number;\n}\n\nexport interface BashResultInput {\n details: unknown;\n /** The result's text blocks joined, all a thrown failure leaves behind. */\n output: string;\n expanded: boolean;\n isPartial: boolean;\n isError: boolean;\n}\n\nexport function bashResultView(input: BashResultInput): BashResultView {\n const details = bashResultDetails(input.details);\n const logs = (details.stages ?? []).flatMap((stage) =>\n stage.logPath === undefined ? [] : [`stage ${stage.index + 1} · ${stage.state} · ${stage.logPath}`],\n );\n\n // Running. A sequence may already name stage logs; streamed text still needs\n // its own bound because it grows while the current command runs.\n if (input.isPartial) {\n return {\n lines: [...logs, ...lastLines(input.output, STREAM_TAIL_LINES)],\n status: { glyph: '◐', tone: 'running', text: 'running' },\n hidden: 0,\n };\n }\n\n // Scalar failures may have only error text. Sequence failures retain their\n // manifest and final excerpt, without displaying earlier commands' output.\n if (input.isError) {\n const all = lastLines(\n details.sequenceId === undefined ? input.output : (details.tail ?? input.output),\n Number.MAX_SAFE_INTEGER,\n );\n const lines = [...logs, ...(input.expanded ? all : all.slice(-COLLAPSED_TAIL_LINES))];\n const summary = formatResultSummary(details);\n return {\n lines,\n status: { glyph: '✗', tone: 'error', text: summary.length > 0 ? summary : 'failed' },\n hidden: Math.max(0, all.length + logs.length - lines.length),\n };\n }\n\n if (details.promoted === true) {\n const label = details.runner ?? details.id ?? 'runner';\n const suffix = details.id === undefined ? '' : ` · ${details.id}`;\n return {\n lines: logs,\n status: { glyph: '●', tone: 'background', text: `${label}${suffix} · background` },\n hidden: 0,\n };\n }\n\n const all = lastLines(\n details.tail ?? (details.sequenceId === undefined ? '' : input.output),\n Number.MAX_SAFE_INTEGER,\n );\n const lines = [...logs, ...(input.expanded ? all : all.slice(-COLLAPSED_TAIL_LINES))];\n // An absent exit code means the runner never reported one, which is not a failure.\n const exited = details.exitCode !== undefined && details.exitCode !== null;\n const failed = details.timedOut === true || (exited && details.exitCode !== 0);\n\n const meta: string[] = [];\n if (details.timedOut === true) meta.push('timed out');\n else if (failed) meta.push(`exit ${details.exitCode}`);\n const summary = formatResultSummary(details);\n if (summary.length > 0) meta.push(summary);\n\n const text = meta.length > 0 ? meta.join(' · ') : failed ? 'failed' : lines.length === 0 ? 'done' : '';\n return {\n lines,\n status: text.length > 0 ? { glyph: failed ? '✗' : '✓', tone: failed ? 'error' : 'ok', text } : null,\n hidden: Math.max(0, all.length + logs.length - lines.length),\n };\n}\n\n/** The tones a promoted run's card can wear; each is a StatusTone on both component libraries. */\nexport type BashBackgroundTone = 'info' | 'running' | 'ok' | 'neutral' | 'error';\n\n/**\n * A promoted command's outcome, read from the runner the channel reports\n * rather than from the tool call, which returned when the run went to the\n * background. The card never reads Completed while the runner still runs.\n */\nexport function backgroundOutcome(run: RunnerRunView | undefined): { tone: BashBackgroundTone; badge: string } {\n if (run === undefined) return { tone: 'info', badge: 'In background' };\n if (run.exit === undefined) return { tone: 'running', badge: 'In background' };\n const { reason, code } = run.exit;\n const exit = code === null ? '' : ` · exit ${code}`;\n if (reason === 'completed') return { tone: 'ok', badge: `Completed${exit}` };\n if (reason === 'stopped') return { tone: 'neutral', badge: 'Stopped' };\n return { tone: 'error', badge: `Failed${exit}` };\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n AnsiText,\n Button,\n FileIcon,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n type StatusTone,\n SyntaxText,\n toolTone,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\n\nimport { runnerLogTab } from '../../_components/RunnerLogPanel';\nimport { requestRunnerStop, runners } from '../../_lib/runnersStore';\nimport {\n backgroundOutcome,\n type BashStatusTone,\n bashCommandText,\n bashResultDetails,\n bashResultView,\n formatBashCommand,\n formatBashFlags,\n} from '../_lib/bashToolFormat';\n\nconst STATUS_TONE: Record<BashStatusTone, StatusTone> = {\n running: 'running',\n ok: 'ok',\n error: 'error',\n background: 'info',\n};\n\n/**\n * The bash tool's timeline item, the web half of renderBashCall and\n * renderBashResult. Collapsed it is a single header row: the tool name, the\n * command shortened to one line, its modifiers, and the outcome badge, so a\n * transcript of many calls stays scannable. Expanding it opens the body: the\n * command exactly as it was run, then the whole tail the frame carries, each\n * in its own scroll box so one chatty command cannot own the viewport. A\n * command promoted to a background runner offers the same stop the activity\n * dock does, for as long as the runners channel reports it running.\n */\nexport function BashToolMessage({\n sessionId,\n args,\n result,\n output,\n running,\n isError,\n sendSessionFrame,\n openTransientTab,\n}: ToolMessageRenderProps) {\n const details = bashResultDetails(result?.details);\n // A sequence owns several process logs, never a process or log tab of its own.\n const processId = details.sequenceId === undefined ? details.id : undefined;\n const runnerId = details.promoted === true ? processId : undefined;\n const run = useStore(runners.store, (state) =>\n processId === undefined ? undefined : runners.select(state, sessionId).runs.find((entry) => entry.id === processId),\n );\n const stopping = useStore(\n runners.store,\n (state) => runnerId !== undefined && runners.select(state, sessionId).stopRequested.includes(runnerId),\n );\n const rawCommand = bashCommandText(args.command);\n const command = formatBashCommand(args.command);\n const flags = formatBashFlags(args);\n const stoppable = sessionId !== null && runnerId !== undefined && run !== undefined && run.exit === undefined;\n // The tool call returned when the run went to the background; the card's\n // outcome is the runner's, so it never reads Completed while still running.\n const background = runnerId === undefined ? undefined : backgroundOutcome(run);\n\n return (\n <MessageItem tone={background?.tone ?? toolTone({ running, isError })} expandable>\n {({ expanded }) => {\n // Nothing is shown until the card is open, so the body always reads the\n // unclipped view; the collapsed state has no lines to bound.\n const view = bashResultView({\n details: result?.details,\n output,\n expanded: true,\n isPartial: running,\n isError,\n });\n return (\n <>\n <MessageItemHeader title=\"bash\" {...(background ? { badge: background.badge } : {})}>\n <span data-testid=\"tool-call-bash\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n <span className=\"min-w-0 flex-1 truncate font-mono text-po-text\">{command}</span>\n {flags.length > 0 ? (\n <span className=\"hidden shrink-0 text-po-dim sm:inline\">· {flags.join(' · ')}</span>\n ) : null}\n </span>\n {/* The log and the stop live in the header, not the body: a\n collapsed row still has to reach the whole log and still has\n to be able to stop a run it promoted to the background. */}\n {run !== undefined && sessionId !== null ? (\n <Button\n variant=\"outline\"\n size=\"xs\"\n data-testid=\"tool-result-bash-open-log\"\n title=\"open this runner's full log\"\n onClick={(event) => {\n event.stopPropagation();\n openTransientTab(runnerLogTab(run));\n }}\n className=\"shrink-0 gap-1 px-1.5 \"\n >\n <FileIcon className=\"h-2.5 w-2.5\" />\n log\n </Button>\n ) : null}\n {stoppable ? (\n <Button\n size=\"xs\"\n variant={stopping ? 'outline' : 'danger-outline'}\n disabled={stopping}\n data-testid=\"tool-result-bash-stop\"\n data-stopping={stopping}\n title={\n stopping ? 'stop requested; the runner reports its own exit' : 'ask the runtime to stop this runner'\n }\n onClick={(event) => {\n event.stopPropagation();\n if (sessionId !== null && runnerId !== undefined)\n requestRunnerStop(sendSessionFrame, sessionId, runnerId);\n }}\n className=\"shrink-0 px-1.5 \"\n >\n {stopping ? 'stopping…' : 'stop'}\n </Button>\n ) : null}\n </MessageItemHeader>\n {expanded ? (\n <MessageItemBody data-testid=\"tool-result-bash\" className=\"flex flex-col gap-2\">\n {/* The header had to shorten the command to one row; this is\n the command as it was actually run, wrapped rather than\n clipped and coloured as the shell it is. */}\n {rawCommand.length > 0 ? (\n <SyntaxText\n data-testid=\"tool-result-bash-command\"\n grammar=\"shell\"\n text={rawCommand}\n className=\"max-h-40 overflow-auto text-po-text\"\n />\n ) : null}\n {/* The tail arrives with the colours the command wrote: the\n log keeps them, and only the model's copy is flattened. */}\n {view.lines.length > 0 ? (\n <AnsiText\n data-testid=\"tool-result-bash-output\"\n text={view.lines.join('\\n')}\n className=\"max-h-96 overflow-auto whitespace-pre-wrap break-words [overflow-wrap:anywhere] border-po-border-soft border-t pt-2 font-mono text-po-dim\"\n />\n ) : null}\n {view.status ? (\n <MessageItemStatus\n data-testid=\"tool-result-bash-status\"\n tone={STATUS_TONE[view.status.tone]}\n glyph={view.status.glyph}\n className=\"min-w-0\"\n >\n <span className=\"break-words\">{view.status.text}</span>\n </MessageItemStatus>\n ) : null}\n {details.sequenceId === undefined && details.logPath !== undefined ? (\n // The tail is bounded by the runner; the whole log only ever exists on\n // disk, so the item names the file rather than pretending this is all.\n <span data-testid=\"tool-result-bash-log\" className=\"min-w-0 break-all text-po-dim\">\n full log · <span className=\"text-po-dim\">{details.logPath}</span>\n </span>\n ) : null}\n </MessageItemBody>\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { BashToolMessage } from './_components/BashToolMessage';\nexport default defineToolRenderer({ message: BashToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport activityGroupRunners from '../src/extensions/workspaces/sessions/(frontend)/activity-group/runners.web';\nimport channelRunnerRuns from '../src/extensions/workspaces/sessions/(frontend)/channel/runner-runs.web';\nimport fillRunners from '../src/extensions/workspaces/sessions/(frontend)/fill/Runners.activity.runners.web';\nimport toolBash from '../src/extensions/workspaces/sessions/(frontend)/tool/bash.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: 'runner',\n packageName: '@agimon-ai/po-runner',\n session: {\n get activityGroups(): WebPluginContributions['activityGroups'] { return [via({ name: 'runners' }, activityGroupRunners)]; },\n get channels(): WebPluginContributions['channels'] { return [via({ channel: 'runner_runs' }, channelRunnerRuns)]; },\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'activity.runners', id: 'runners' }, fillRunners)]; },\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['bash'] }, toolBash)]; },\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAWA,MAAa,qBAAqB;;AAgBlC,MAAa,uBAA4C;CACvD,SAAS;CACT,MAAM;CACN,aAAa;AACf;;;;;AAMA,SAAgB,iBAAiB,SAAiB,KAAkC;CAClF,MAAM,QAAQ,IAAI,KAAK,MAAM,KAAK,CAAC,IAAI,EAAE,IAAI;CAC7C,OAAO,QAAQ,KAAK,MAAM,KAAK;EAAE,GAAG;EAAsB,GAAG;CAAM,IAAI;EAAE;EAAS,GAAG;EAAO,mBAAmB;CAAK;AACtH;;AAGA,SAAS,MAAM,OAAuB;CACpC,OAAO,MAAM,KAAK,KAAK,IAAI,IAAI,MAAM,KAAK;AAC5C;AAEA,SAAgB,iBAAiB,SAAsC;CACrE,MAAM,MAAM,QAAQ,KAAK,KAAK,KAAK;CACnC,MAAM,OAAO,QAAQ,MAAM,KAAK,KAAK;CACrC,MAAM,QAAQ;EACZ,GAAI,SAAS,KAAK,CAAC,IAAI,CAAC,QAAQ,MAAM,IAAI,GAAG;EAC7C,GAAI,QAAQ,KAAK,CAAC,IAAI,CAAC,OAAO,MAAM,GAAG,GAAG;EAC1C,GAAI,QAAQ,gBAAg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"version":1,"platformRequirements":{"@agimon-ai/po-runner-rmux-darwin-arm64":{"workspaceRange":"*","published":"0.0.0-alpha.190"},"@agimon-ai/po-runner-rmux-darwin-x64":{"workspaceRange":"*","published":"0.0.0-alpha.190"},"@agimon-ai/po-runner-rmux-linux-arm64":{"workspaceRange":"*","published":"0.0.0-alpha.190"},"@agimon-ai/po-runner-rmux-linux-x64":{"workspaceRange":"*","published":"0.0.0-alpha.190"},"@agimon-ai/po-runner-rtk-darwin-arm64":{"workspaceRange":"*","published":"0.0.0-alpha.190"},"@agimon-ai/po-runner-rtk-darwin-x64":{"workspaceRange":"*","published":"0.0.0-alpha.190"},"@agimon-ai/po-runner-rtk-linux-arm64":{"workspaceRange":"*","published":"0.0.0-alpha.190"},"@agimon-ai/po-runner-rtk-linux-x64":{"workspaceRange":"*","published":"0.0.0-alpha.190"}},"sourceFiles":["LICENSE","README.md","generated/client.native.ts","generated/client.ts","generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","llms.txt","package.json","skills/po-runner/SKILL.md","src/bin/cli.ts","src/bin/logSink.ts","src/bin/runnerHost.ts","src/constants/ansiScrub.ts","src/constants/bashResult.ts","src/constants/bashRunService.ts","src/constants/bashTool.ts","src/constants/cliApp.ts","src/constants/compaction.ts","src/constants/headless.ts","src/constants/launcher.ts","src/constants/lifeline.ts","src/constants/logReader.ts","src/constants/logTail.ts","src/constants/processControl.ts","src/constants/ptyHost.ts","src/constants/reconcile.ts","src/constants/rmuxBackend.ts","src/constants/rtkProcessor.ts","src/constants/runnerConfig.ts","src/constants/runnerLogApi.ts","src/constants/runnerNamer.ts","src/constants/runnerPaths.ts","src/constants/runnerRegistry.ts","src/constants/runnerRuntime.ts","src/constants/runnerSequence.ts","src/constants/runnerSettings.ts","src/constants/runners.ts","src/constants/runnersCommand.ts","src/constants/session.ts","src/constants/spawner.ts","src/constants/tmuxBackend.ts","src/constants/tokenEstimate.ts","src/constants/webRunnerLog.ts","src/constants/webRunnerRuns.ts","src/constants/webRunners.ts","src/exports/ansiScrub.ts","src/exports/apiContracts.ts","src/exports/bashRunService.ts","src/exports/bashSchema.ts","src/exports/bashTool.ts","src/exports/cliApp.ts","src/exports/clock.ts","src/exports/compaction.ts","src/exports/config.ts","src/exports/index.ts","src/exports/launch.ts","src/exports/launcher.ts","src/exports/lifeline.ts","src/exports/logFile.ts","src/exports/logReader.ts","src/exports/processControl.ts","src/exports/ptyHost.ts","src/exports/ptySpawner.ts","src/exports/reconcile.ts","src/exports/responseEnvelope.ts","src/exports/rmuxBackend.ts","src/exports/rtkProcessor.ts","src/exports/runnerDependencies.ts","src/exports/runnerNamer.ts","src/exports/runnerPaths.ts","src/exports/runnerRegistry.ts","src/exports/session.ts","src/exports/spawner.ts","src/exports/types.ts","src/extensions/(backend)/channel/runnerRuns.server.ts","src/extensions/workspaces/sessions/(backend)/_lib/serverRoot.edge.ts","src/extensions/workspaces/sessions/(backend)/_lib/serverRoot.ts","src/extensions/workspaces/sessions/(backend)/api/runner/route.server.ts","src/extensions/workspaces/sessions/(backend)/command/runners.server.ts","src/extensions/workspaces/sessions/(backend)/hook/session-compact.server.ts","src/extensions/workspaces/sessions/(backend)/resource/codemode-how-to-runner.server.edge.ts","src/extensions/workspaces/sessions/(backend)/resource/codemode-how-to-runner.server.ts","src/extensions/workspaces/sessions/(backend)/resource/help-how-to-runner.server.ts","src/extensions/workspaces/sessions/(backend)/root.server.ts","src/extensions/workspaces/sessions/(backend)/skill/help-how-to-runner.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/bash.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/bash.server.ts","src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.native.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerLogPanel.native.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerLogPanel.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerLogPanel.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerShellPanel.native.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerShellPanel.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerShellPanel.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.native.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.tsx","src/extensions/workspaces/sessions/(frontend)/_components/runnerHooks.native.ts","src/extensions/workspaces/sessions/(frontend)/_components/runnerTail.ts","src/extensions/workspaces/sessions/(frontend)/_lib/format.ts","src/extensions/workspaces/sessions/(frontend)/_lib/launchLine.ts","src/extensions/workspaces/sessions/(frontend)/_lib/logApi.native.ts","src/extensions/workspaces/sessions/(frontend)/_lib/logApi.ts","src/extensions/workspaces/sessions/(frontend)/_lib/runnersStore.native.ts","src/extensions/workspaces/sessions/(frontend)/_lib/runnersStore.ts","src/extensions/workspaces/sessions/(frontend)/_lib/screenApi.native.ts","src/extensions/workspaces/sessions/(frontend)/_lib/screenApi.ts","src/extensions/workspaces/sessions/(frontend)/activity-group/runners.native.ts","src/extensions/workspaces/sessions/(frontend)/activity-group/runners.web.ts","src/extensions/workspaces/sessions/(frontend)/channel/runner-runs.native.ts","src/extensions/workspaces/sessions/(frontend)/channel/runner-runs.web.ts","src/extensions/workspaces/sessions/(frontend)/fill/Runners.activity.runners.native.tsx","src/extensions/workspaces/sessions/(frontend)/fill/Runners.activity.runners.web.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/RunnersActivitySection.stories.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/RunnersActivitySection.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/bashToolFormat.ts","src/extensions/workspaces/sessions/(frontend)/tool/bash.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/bash.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/bash.web.tsx","src/models/runnerSettings.ts","src/prompts/codemode-how-to-runner/SKILL.md","src/prompts/help-how-to-runner/SKILL.md","src/schemas/apiContracts.ts","src/schemas/bashTool.ts","src/services/ansiScrub/index.ts","src/services/bashResult/index.ts","src/services/bashRunService/index.ts","src/services/bashRunService/resources.ts","src/services/cliApp/index.ts","src/services/clock/index.ts","src/services/compaction/index.ts","src/services/edgeBash/index.ts","src/services/edgeBash/type.ts","src/services/edgeRunStore/index.ts","src/services/headless/index.ts","src/services/launcher/index.ts","src/services/lifeline/client.ts","src/services/lifeline/index.ts","src/services/logFile/index.ts","src/services/logReader/index.ts","src/services/logTail/index.ts","src/services/processControl/index.ts","src/services/ptyBackendChain/index.ts","src/services/ptyHost/index.ts","src/services/ptySpawner/index.ts","src/services/reconcile/index.ts","src/services/rmuxBackend/index.ts","src/services/rtkProcessor/index.ts","src/services/runnerConfig/index.ts","src/services/runnerDependencies/index.ts","src/services/runnerDependencies/type.ts","src/services/runnerHost/index.ts","src/services/runnerHost/type.ts","src/services/runnerLaunch/index.ts","src/services/runnerLogApi/index.edge.ts","src/services/runnerLogApi/index.ts","src/services/runnerNamer/index.ts","src/services/runnerNamer/type.ts","src/services/runnerNamespace/index.ts","src/services/runnerOperations/index.ts","src/services/runnerPaths/index.ts","src/services/runnerPaths/type.ts","src/services/runnerRecord/index.ts","src/services/runnerRegistry/index.ts","src/services/runnerResult/index.ts","src/services/runnerSequence/index.ts","src/services/runnerSequenceStore/index.ts","src/services/runnerServerRuntime/index.ts","src/services/runnerSettings/index.ts","src/services/runnerSupervisor/index.ts","src/services/runnersChannel/index.ts","src/services/runnersCommand/index.ts","src/services/session/index.ts","src/services/spawner/index.ts","src/services/tmuxBackend/TmuxClient.ts","src/services/tmuxBackend/index.ts","src/services/tokenEstimate/index.ts","src/services/webRunnerRuns/index.ts","src/types/apiRoutes.ts","src/types/bashResult.ts","src/types/bashRunService.ts","src/types/clock.ts","src/types/launcher.ts","src/types/lifeline.ts","src/types/logFile.ts","src/types/logReader.ts","src/types/logTail.ts","src/types/processControl.ts","src/types/ptyHost.ts","src/types/ptySpawner.ts","src/types/rmuxBackend.ts","src/types/rtkProcessor.ts","src/types/runnerLaunch.ts","src/types/runnerRegistry.ts","src/types/runnerSequence.ts","src/types/runnerSettings.ts","src/types/spawner.ts","src/types/tmuxClient.ts","src/types/webRunnerLog.ts","src/types/webRunners.ts","tsdown.config.ts"],"sourceRevision":"89c74c1272f6c9735af8f271ca4e03ae","manifestRevision":"ed2b2f226fa083dc8582572bd3ea4105","outputFiles":["LICENSE","README.md","dist/ansiScrub-CsqTSaVT.mjs","dist/ansiScrub-D5gpHDch.cjs","dist/ansiScrub.cjs","dist/ansiScrub.mjs","dist/apiContracts.cjs","dist/apiContracts.mjs","dist/bashResult-BPF975C4.cjs","dist/bashResult-IuGzZZoI.mjs","dist/bashRunService-CqIzJ5F6.mjs","dist/bashRunService-pdXCVU1H.cjs","dist/bashRunService.cjs","dist/bashRunService.mjs","dist/bashSchema.cjs","dist/bashSchema.mjs","dist/bashTool-D2ECDAhc.cjs","dist/bashTool-vg8uhbkj.mjs","dist/bashTool.cjs","dist/bashTool.mjs","dist/bin/cli.cjs","dist/bin/cli.mjs","dist/bin/logSink.cjs","dist/bin/logSink.mjs","dist/bin/runnerHost.cjs","dist/bin/runnerHost.mjs","dist/cliApp-BagFzVGU.cjs","dist/cliApp-BeMxIbwu.mjs","dist/cliApp.cjs","dist/cliApp.mjs","dist/clock-Cv2pddgo.mjs","dist/clock-jqnLWziT.cjs","dist/clock.cjs","dist/clock.mjs","dist/compaction-Cduebib_.cjs","dist/compaction-nNlE6e5I.mjs","dist/compaction.cjs","dist/compaction.mjs","dist/config.cjs","dist/config.mjs","dist/extensions/mcp-ui.mjs","dist/extensions/mcp.cjs","dist/extensions/mcp.mjs","dist/extensions/native.mjs","dist/extensions/server.cjs","dist/extensions/server.mjs","dist/extensions/web.mjs","dist/headless-BX2fOEa_.cjs","dist/headless-Rl5pIHdV.mjs","dist/index.cjs","dist/index.mjs","dist/launch.cjs","dist/launch.mjs","dist/launcher-3xMxw72I.mjs","dist/launcher-D7qAhSRL.cjs","dist/launcher.cjs","dist/launcher.mjs","dist/lifeline-B4cjtrBe.cjs","dist/lifeline-C1v2ItCY.mjs","dist/lifeline-D4_ZRAhO.cjs","dist/lifeline-nPh3cx5A.mjs","dist/lifeline.cjs","dist/lifeline.mjs","dist/logFile-B9FSwmE0.cjs","dist/logFile-D1EOKqmL.mjs","dist/logFile.cjs","dist/logFile.mjs","dist/logReader-BYij2KyN.mjs","dist/logReader-CNgEm9YG.cjs","dist/logReader.cjs","dist/logReader.mjs","dist/processControl-DApTpV16.mjs","dist/processControl-DNJ1WZ9N.cjs","dist/processControl.cjs","dist/processControl.mjs","dist/ptyHost-C-oWV455.cjs","dist/ptyHost-C2zu-ZfO.mjs","dist/ptyHost.cjs","dist/ptyHost.mjs","dist/ptySpawner-C375NJnj.mjs","dist/ptySpawner-C39IzbRo.cjs","dist/ptySpawner.cjs","dist/ptySpawner.mjs","dist/reconcile-DUaX_vKZ.mjs","dist/reconcile-DjF9T1hN.cjs","dist/reconcile.cjs","dist/reconcile.mjs","dist/responseEnvelope.cjs","dist/responseEnvelope.mjs","dist/rmuxBackend-9tHTx1vf.cjs","dist/rmuxBackend-BaK-R35I.mjs","dist/rmuxBackend.cjs","dist/rmuxBackend.mjs","dist/rolldown-runtime-8H4AJuhK.mjs","dist/rolldown-runtime-C0BPl7ul.cjs","dist/rtkProcessor-B4_urXQr.mjs","dist/rtkProcessor-CsrCPyTQ.cjs","dist/rtkProcessor-DOXcp51z.mjs","dist/rtkProcessor-J2gLQvM4.cjs","dist/rtkProcessor.cjs","dist/rtkProcessor.mjs","dist/runnerConfig-BoLMinlx.cjs","dist/runnerConfig-XXMq4VQA.mjs","dist/runnerDependencies-CcZw6ZjF.cjs","dist/runnerDependencies-DGJXkZ4t.mjs","dist/runnerDependencies.cjs","dist/runnerDependencies.mjs","dist/runnerHost-BvNYPMeh.mjs","dist/runnerHost-C2F5oxzn.cjs","dist/runnerLaunch-BAf7hXMr.cjs","dist/runnerLaunch-Bimgdh4h.mjs","dist/runnerNamer-B8FH7n2v.mjs","dist/runnerNamer-we1XVYfM.cjs","dist/runnerNamer.cjs","dist/runnerNamer.mjs","dist/runnerPaths-CSkswyjR.cjs","dist/runnerPaths-D3P7_EhW.mjs","dist/runnerPaths.cjs","dist/runnerPaths.mjs","dist/runnerRegistry-B8K1L3lq.cjs","dist/runnerRegistry-Dqca6SD3.mjs","dist/runnerRegistry-NW6oAJ71.cjs","dist/runnerRegistry-l0C_55oO.mjs","dist/runnerRegistry.cjs","dist/runnerRegistry.mjs","dist/runnerSequence-ZTYgZ_2W.cjs","dist/runnerSequence-k-_Fd77y.mjs","dist/runnerSequenceStore-CaY7S_Sd.mjs","dist/runnerSequenceStore-Ck6M-8r_.cjs","dist/services/lifeline/client.cjs","dist/services/lifeline/client.mjs","dist/services/runnerSupervisor/index.cjs","dist/services/runnerSupervisor/index.mjs","dist/session-CdVeSD7F.mjs","dist/session-DnUj8Q71.cjs","dist/session-ISEGK4z9.mjs","dist/session-PQd3azWf.cjs","dist/session.cjs","dist/session.mjs","dist/spawner-BxFsINXP.cjs","dist/spawner-LoVsn55-.mjs","dist/spawner.cjs","dist/spawner.mjs","dist/types.cjs","dist/types.mjs","llms.txt","skills/po-runner/SKILL.md","src/prompts/codemode-how-to-runner/SKILL.md","src/prompts/help-how-to-runner/SKILL.md"],"outputRevision":"1d0d4ed81113f013287234d88941b2fd"}
|
|
1
|
+
{"version":1,"platformRequirements":{"@agimon-ai/po-runner-rmux-darwin-arm64":{"workspaceRange":"*","published":"0.0.0-alpha.192"},"@agimon-ai/po-runner-rmux-darwin-x64":{"workspaceRange":"*","published":"0.0.0-alpha.192"},"@agimon-ai/po-runner-rmux-linux-arm64":{"workspaceRange":"*","published":"0.0.0-alpha.192"},"@agimon-ai/po-runner-rmux-linux-x64":{"workspaceRange":"*","published":"0.0.0-alpha.192"},"@agimon-ai/po-runner-rtk-darwin-arm64":{"workspaceRange":"*","published":"0.0.0-alpha.192"},"@agimon-ai/po-runner-rtk-darwin-x64":{"workspaceRange":"*","published":"0.0.0-alpha.192"},"@agimon-ai/po-runner-rtk-linux-arm64":{"workspaceRange":"*","published":"0.0.0-alpha.192"},"@agimon-ai/po-runner-rtk-linux-x64":{"workspaceRange":"*","published":"0.0.0-alpha.192"}},"sourceFiles":["LICENSE","README.md","generated/client.native.ts","generated/client.ts","generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","llms.txt","package.json","skills/po-runner/SKILL.md","src/bin/cli.ts","src/bin/logSink.ts","src/bin/runnerHost.ts","src/constants/ansiScrub.ts","src/constants/bashResult.ts","src/constants/bashRunService.ts","src/constants/bashTool.ts","src/constants/cliApp.ts","src/constants/compaction.ts","src/constants/headless.ts","src/constants/launcher.ts","src/constants/lifeline.ts","src/constants/logReader.ts","src/constants/logTail.ts","src/constants/processControl.ts","src/constants/ptyHost.ts","src/constants/reconcile.ts","src/constants/rmuxBackend.ts","src/constants/rtkProcessor.ts","src/constants/runnerConfig.ts","src/constants/runnerLogApi.ts","src/constants/runnerNamer.ts","src/constants/runnerPaths.ts","src/constants/runnerRegistry.ts","src/constants/runnerRuntime.ts","src/constants/runnerSequence.ts","src/constants/runnerSettings.ts","src/constants/runners.ts","src/constants/runnersCommand.ts","src/constants/session.ts","src/constants/spawner.ts","src/constants/tmuxBackend.ts","src/constants/tokenEstimate.ts","src/constants/webRunnerLog.ts","src/constants/webRunnerRuns.ts","src/constants/webRunners.ts","src/exports/ansiScrub.ts","src/exports/apiContracts.ts","src/exports/bashRunService.ts","src/exports/bashSchema.ts","src/exports/bashTool.ts","src/exports/cliApp.ts","src/exports/clock.ts","src/exports/compaction.ts","src/exports/config.ts","src/exports/index.ts","src/exports/launch.ts","src/exports/launcher.ts","src/exports/lifeline.ts","src/exports/logFile.ts","src/exports/logReader.ts","src/exports/processControl.ts","src/exports/ptyHost.ts","src/exports/ptySpawner.ts","src/exports/reconcile.ts","src/exports/responseEnvelope.ts","src/exports/rmuxBackend.ts","src/exports/rtkProcessor.ts","src/exports/runnerDependencies.ts","src/exports/runnerNamer.ts","src/exports/runnerPaths.ts","src/exports/runnerRegistry.ts","src/exports/session.ts","src/exports/spawner.ts","src/exports/types.ts","src/extensions/(backend)/channel/runnerRuns.server.ts","src/extensions/workspaces/sessions/(backend)/_lib/serverRoot.edge.ts","src/extensions/workspaces/sessions/(backend)/_lib/serverRoot.ts","src/extensions/workspaces/sessions/(backend)/api/runner/route.server.ts","src/extensions/workspaces/sessions/(backend)/command/runners.server.ts","src/extensions/workspaces/sessions/(backend)/hook/session-compact.server.ts","src/extensions/workspaces/sessions/(backend)/resource/codemode-how-to-runner.server.edge.ts","src/extensions/workspaces/sessions/(backend)/resource/codemode-how-to-runner.server.ts","src/extensions/workspaces/sessions/(backend)/resource/help-how-to-runner.server.ts","src/extensions/workspaces/sessions/(backend)/root.server.ts","src/extensions/workspaces/sessions/(backend)/skill/help-how-to-runner.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/bash.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/bash.server.ts","src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.native.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerCommandBar.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerLogPanel.native.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerLogPanel.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerLogPanel.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerShellPanel.native.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerShellPanel.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnerShellPanel.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.native.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.stories.tsx","src/extensions/workspaces/sessions/(frontend)/_components/RunnersPanel.tsx","src/extensions/workspaces/sessions/(frontend)/_components/runnerHooks.native.ts","src/extensions/workspaces/sessions/(frontend)/_components/runnerTail.ts","src/extensions/workspaces/sessions/(frontend)/_lib/format.ts","src/extensions/workspaces/sessions/(frontend)/_lib/launchLine.ts","src/extensions/workspaces/sessions/(frontend)/_lib/logApi.native.ts","src/extensions/workspaces/sessions/(frontend)/_lib/logApi.ts","src/extensions/workspaces/sessions/(frontend)/_lib/runnersStore.native.ts","src/extensions/workspaces/sessions/(frontend)/_lib/runnersStore.ts","src/extensions/workspaces/sessions/(frontend)/_lib/screenApi.native.ts","src/extensions/workspaces/sessions/(frontend)/_lib/screenApi.ts","src/extensions/workspaces/sessions/(frontend)/activity-group/runners.native.ts","src/extensions/workspaces/sessions/(frontend)/activity-group/runners.web.ts","src/extensions/workspaces/sessions/(frontend)/channel/runner-runs.native.ts","src/extensions/workspaces/sessions/(frontend)/channel/runner-runs.web.ts","src/extensions/workspaces/sessions/(frontend)/fill/Runners.activity.runners.native.tsx","src/extensions/workspaces/sessions/(frontend)/fill/Runners.activity.runners.web.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/RunnersActivitySection.stories.tsx","src/extensions/workspaces/sessions/(frontend)/fill/_components/RunnersActivitySection.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/BashToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/bashToolFormat.ts","src/extensions/workspaces/sessions/(frontend)/tool/bash.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/bash.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/bash.web.tsx","src/models/runnerSettings.ts","src/prompts/codemode-how-to-runner/SKILL.md","src/prompts/help-how-to-runner/SKILL.md","src/schemas/apiContracts.ts","src/schemas/bashTool.ts","src/services/ansiScrub/index.ts","src/services/bashResult/index.ts","src/services/bashRunService/index.ts","src/services/bashRunService/resources.ts","src/services/cliApp/index.ts","src/services/clock/index.ts","src/services/compaction/index.ts","src/services/edgeBash/index.ts","src/services/edgeBash/type.ts","src/services/edgeRunStore/index.ts","src/services/headless/index.ts","src/services/launcher/index.ts","src/services/lifeline/client.ts","src/services/lifeline/index.ts","src/services/logFile/index.ts","src/services/logReader/index.ts","src/services/logTail/index.ts","src/services/processControl/index.ts","src/services/ptyBackendChain/index.ts","src/services/ptyHost/index.ts","src/services/ptySpawner/index.ts","src/services/reconcile/index.ts","src/services/rmuxBackend/index.ts","src/services/rtkProcessor/index.ts","src/services/runnerConfig/index.ts","src/services/runnerDependencies/index.ts","src/services/runnerDependencies/type.ts","src/services/runnerHost/index.ts","src/services/runnerHost/type.ts","src/services/runnerLaunch/index.ts","src/services/runnerLogApi/index.edge.ts","src/services/runnerLogApi/index.ts","src/services/runnerNamer/index.ts","src/services/runnerNamer/type.ts","src/services/runnerNamespace/index.ts","src/services/runnerOperations/index.ts","src/services/runnerPaths/index.ts","src/services/runnerPaths/type.ts","src/services/runnerRecord/index.ts","src/services/runnerRegistry/index.ts","src/services/runnerResult/index.ts","src/services/runnerSequence/index.ts","src/services/runnerSequenceStore/index.ts","src/services/runnerServerRuntime/index.ts","src/services/runnerSettings/index.ts","src/services/runnerSupervisor/index.ts","src/services/runnersChannel/index.ts","src/services/runnersCommand/index.ts","src/services/session/index.ts","src/services/spawner/index.ts","src/services/tmuxBackend/TmuxClient.ts","src/services/tmuxBackend/index.ts","src/services/tokenEstimate/index.ts","src/services/webRunnerRuns/index.ts","src/types/apiRoutes.ts","src/types/bashResult.ts","src/types/bashRunService.ts","src/types/clock.ts","src/types/launcher.ts","src/types/lifeline.ts","src/types/logFile.ts","src/types/logReader.ts","src/types/logTail.ts","src/types/processControl.ts","src/types/ptyHost.ts","src/types/ptySpawner.ts","src/types/rmuxBackend.ts","src/types/rtkProcessor.ts","src/types/runnerLaunch.ts","src/types/runnerRegistry.ts","src/types/runnerSequence.ts","src/types/runnerSettings.ts","src/types/spawner.ts","src/types/tmuxClient.ts","src/types/webRunnerLog.ts","src/types/webRunners.ts","tsdown.config.ts"],"sourceRevision":"e1a2b3606313f988823af0cde14d29b1","manifestRevision":"1d6a9d8de46c5c98bbb424361e74f51e","outputFiles":["LICENSE","README.md","dist/ansiScrub-CsqTSaVT.mjs","dist/ansiScrub-D5gpHDch.cjs","dist/ansiScrub.cjs","dist/ansiScrub.mjs","dist/apiContracts.cjs","dist/apiContracts.mjs","dist/bashResult-BPF975C4.cjs","dist/bashResult-IuGzZZoI.mjs","dist/bashRunService-CqIzJ5F6.mjs","dist/bashRunService-pdXCVU1H.cjs","dist/bashRunService.cjs","dist/bashRunService.mjs","dist/bashSchema.cjs","dist/bashSchema.mjs","dist/bashTool-D2ECDAhc.cjs","dist/bashTool-vg8uhbkj.mjs","dist/bashTool.cjs","dist/bashTool.mjs","dist/bin/cli.cjs","dist/bin/cli.mjs","dist/bin/logSink.cjs","dist/bin/logSink.mjs","dist/bin/runnerHost.cjs","dist/bin/runnerHost.mjs","dist/cliApp-BagFzVGU.cjs","dist/cliApp-BeMxIbwu.mjs","dist/cliApp.cjs","dist/cliApp.mjs","dist/clock-Cv2pddgo.mjs","dist/clock-jqnLWziT.cjs","dist/clock.cjs","dist/clock.mjs","dist/compaction-Cduebib_.cjs","dist/compaction-nNlE6e5I.mjs","dist/compaction.cjs","dist/compaction.mjs","dist/config.cjs","dist/config.mjs","dist/extensions/mcp-ui.mjs","dist/extensions/mcp.cjs","dist/extensions/mcp.mjs","dist/extensions/native.mjs","dist/extensions/server.cjs","dist/extensions/server.mjs","dist/extensions/web.mjs","dist/headless-BX2fOEa_.cjs","dist/headless-Rl5pIHdV.mjs","dist/index.cjs","dist/index.mjs","dist/launch.cjs","dist/launch.mjs","dist/launcher-3xMxw72I.mjs","dist/launcher-D7qAhSRL.cjs","dist/launcher.cjs","dist/launcher.mjs","dist/lifeline-B4cjtrBe.cjs","dist/lifeline-C1v2ItCY.mjs","dist/lifeline-D4_ZRAhO.cjs","dist/lifeline-nPh3cx5A.mjs","dist/lifeline.cjs","dist/lifeline.mjs","dist/logFile-B9FSwmE0.cjs","dist/logFile-D1EOKqmL.mjs","dist/logFile.cjs","dist/logFile.mjs","dist/logReader-BYij2KyN.mjs","dist/logReader-CNgEm9YG.cjs","dist/logReader.cjs","dist/logReader.mjs","dist/processControl-DApTpV16.mjs","dist/processControl-DNJ1WZ9N.cjs","dist/processControl.cjs","dist/processControl.mjs","dist/ptyHost-C-oWV455.cjs","dist/ptyHost-C2zu-ZfO.mjs","dist/ptyHost.cjs","dist/ptyHost.mjs","dist/ptySpawner-C375NJnj.mjs","dist/ptySpawner-C39IzbRo.cjs","dist/ptySpawner.cjs","dist/ptySpawner.mjs","dist/reconcile-DUaX_vKZ.mjs","dist/reconcile-DjF9T1hN.cjs","dist/reconcile.cjs","dist/reconcile.mjs","dist/responseEnvelope.cjs","dist/responseEnvelope.mjs","dist/rmuxBackend-9tHTx1vf.cjs","dist/rmuxBackend-BaK-R35I.mjs","dist/rmuxBackend.cjs","dist/rmuxBackend.mjs","dist/rolldown-runtime-8H4AJuhK.mjs","dist/rolldown-runtime-C0BPl7ul.cjs","dist/rtkProcessor-B4_urXQr.mjs","dist/rtkProcessor-CsrCPyTQ.cjs","dist/rtkProcessor-DOXcp51z.mjs","dist/rtkProcessor-J2gLQvM4.cjs","dist/rtkProcessor.cjs","dist/rtkProcessor.mjs","dist/runnerConfig-BoLMinlx.cjs","dist/runnerConfig-XXMq4VQA.mjs","dist/runnerDependencies-CcZw6ZjF.cjs","dist/runnerDependencies-DGJXkZ4t.mjs","dist/runnerDependencies.cjs","dist/runnerDependencies.mjs","dist/runnerHost-BvNYPMeh.mjs","dist/runnerHost-C2F5oxzn.cjs","dist/runnerLaunch-BAf7hXMr.cjs","dist/runnerLaunch-Bimgdh4h.mjs","dist/runnerNamer-B8FH7n2v.mjs","dist/runnerNamer-we1XVYfM.cjs","dist/runnerNamer.cjs","dist/runnerNamer.mjs","dist/runnerPaths-CSkswyjR.cjs","dist/runnerPaths-D3P7_EhW.mjs","dist/runnerPaths.cjs","dist/runnerPaths.mjs","dist/runnerRegistry-B8K1L3lq.cjs","dist/runnerRegistry-Dqca6SD3.mjs","dist/runnerRegistry-NW6oAJ71.cjs","dist/runnerRegistry-l0C_55oO.mjs","dist/runnerRegistry.cjs","dist/runnerRegistry.mjs","dist/runnerSequence-ZTYgZ_2W.cjs","dist/runnerSequence-k-_Fd77y.mjs","dist/runnerSequenceStore-CaY7S_Sd.mjs","dist/runnerSequenceStore-Ck6M-8r_.cjs","dist/services/lifeline/client.cjs","dist/services/lifeline/client.mjs","dist/services/runnerSupervisor/index.cjs","dist/services/runnerSupervisor/index.mjs","dist/session-CdVeSD7F.mjs","dist/session-DnUj8Q71.cjs","dist/session-ISEGK4z9.mjs","dist/session-PQd3azWf.cjs","dist/session.cjs","dist/session.mjs","dist/spawner-BxFsINXP.cjs","dist/spawner-LoVsn55-.mjs","dist/spawner.cjs","dist/spawner.mjs","dist/types.cjs","dist/types.mjs","llms.txt","skills/po-runner/SKILL.md","src/prompts/codemode-how-to-runner/SKILL.md","src/prompts/help-how-to-runner/SKILL.md"],"outputRevision":"16ae89ea5e7155f91c9988e84ac97173"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-runner",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.192",
|
|
4
4
|
"description": "Supervised shell execution, background process control, and run logs for Pi coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -214,10 +214,10 @@
|
|
|
214
214
|
},
|
|
215
215
|
"dependencies": {
|
|
216
216
|
"@agimon-ai/foundation-process-registry": "0.30.15",
|
|
217
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
218
|
-
"@agimon-ai/po-ui": "0.0.0-alpha.
|
|
219
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
220
|
-
"@agimon-ai/po-web-security": "0.0.0-alpha.
|
|
217
|
+
"@agimon-ai/po-core": "0.0.0-alpha.192",
|
|
218
|
+
"@agimon-ai/po-ui": "0.0.0-alpha.192",
|
|
219
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.192",
|
|
220
|
+
"@agimon-ai/po-web-security": "0.0.0-alpha.192",
|
|
221
221
|
"@deepseek-ai/cordis": "4.0.5",
|
|
222
222
|
"@rmux/sdk": "0.6.5",
|
|
223
223
|
"@xterm/headless": "6.0.0",
|
|
@@ -225,8 +225,8 @@
|
|
|
225
225
|
"typebox": "1.4.2"
|
|
226
226
|
},
|
|
227
227
|
"devDependencies": {
|
|
228
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
229
|
-
"@agimon-ai/po-native-components": "0.0.0-alpha.
|
|
228
|
+
"@agimon-ai/po-build": "0.0.0-alpha.192",
|
|
229
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.192",
|
|
230
230
|
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
231
231
|
"@tanstack/react-store": "0.11.2",
|
|
232
232
|
"@tanstack/store": "0.11.2",
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
"vitest": "5.0.4"
|
|
243
243
|
},
|
|
244
244
|
"peerDependencies": {
|
|
245
|
-
"@agimon-ai/po-native-components": "0.0.0-alpha.
|
|
245
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.192",
|
|
246
246
|
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
247
247
|
"react-native": "0.88.1",
|
|
248
248
|
"react-native-unistyles": "^3.5.3"
|
|
@@ -262,14 +262,14 @@
|
|
|
262
262
|
}
|
|
263
263
|
},
|
|
264
264
|
"optionalDependencies": {
|
|
265
|
-
"@agimon-ai/po-runner-rmux-darwin-arm64": "0.0.0-alpha.
|
|
266
|
-
"@agimon-ai/po-runner-rmux-darwin-x64": "0.0.0-alpha.
|
|
267
|
-
"@agimon-ai/po-runner-rmux-linux-arm64": "0.0.0-alpha.
|
|
268
|
-
"@agimon-ai/po-runner-rmux-linux-x64": "0.0.0-alpha.
|
|
269
|
-
"@agimon-ai/po-runner-rtk-darwin-arm64": "0.0.0-alpha.
|
|
270
|
-
"@agimon-ai/po-runner-rtk-darwin-x64": "0.0.0-alpha.
|
|
271
|
-
"@agimon-ai/po-runner-rtk-linux-arm64": "0.0.0-alpha.
|
|
272
|
-
"@agimon-ai/po-runner-rtk-linux-x64": "0.0.0-alpha.
|
|
265
|
+
"@agimon-ai/po-runner-rmux-darwin-arm64": "0.0.0-alpha.192",
|
|
266
|
+
"@agimon-ai/po-runner-rmux-darwin-x64": "0.0.0-alpha.192",
|
|
267
|
+
"@agimon-ai/po-runner-rmux-linux-arm64": "0.0.0-alpha.192",
|
|
268
|
+
"@agimon-ai/po-runner-rmux-linux-x64": "0.0.0-alpha.192",
|
|
269
|
+
"@agimon-ai/po-runner-rtk-darwin-arm64": "0.0.0-alpha.192",
|
|
270
|
+
"@agimon-ai/po-runner-rtk-darwin-x64": "0.0.0-alpha.192",
|
|
271
|
+
"@agimon-ai/po-runner-rtk-linux-arm64": "0.0.0-alpha.192",
|
|
272
|
+
"@agimon-ai/po-runner-rtk-linux-x64": "0.0.0-alpha.192"
|
|
273
273
|
},
|
|
274
274
|
"engines": {
|
|
275
275
|
"node": ">=24"
|