跳到正文Skip to content
Agent J Beta
菜单Menu
中文EN
登录Sign in

搜索文档和页面Search docs and pages

文档Docs

网页终端的操作日志:记录什么、为什么、谁能看The web terminal's operation log — what is logged, why, and who can read it

网页终端顶上写着「操作日志记录中」:Agent J 主机把你发的命令和终端里的文字输出记成文字,不录屏、不开摄像头、不录声音;只存在 Agent J 主机上、不上传,超过 30 天就删除;出了问题,你和 Agent J 能靠它倒查。The web terminal shows Operation log recording at the top. The Agent J host keeps a text log of the lines you send and the text output — no screen recording, no camera, no sound. It stays on the Agent J host, is never uploaded, and is deleted after 30 days; if something goes wrong, you and Agent J can trace it back.

本页说明普通 Agent J 主机上完整终端及旧版行模式的操作日志。Olares 应用的终端由 Olares 提供,不使用这里的日志和遮挡规则;见 Olares 网页终端。

用网页终端时,页面顶上一直写着「操作日志记录中」,后面是这次还剩多少时间。点它就会打开这一页。

记录什么

  • 完整终端记录遮挡后的输出和终端大小变化,不单独记录按键;行模式还记录你发的每一行命令。
  • 终端里显示出来的文字输出,和你在页面上看到的一样。
  • 每一段的时间,方便按先后顺序回看。

记录之前,Agent J 主机会先遮挡常见的密码和密钥,和页面上的遮挡一样。Agent J 主机登录密码从来不在里面。行模式里,程序正在运行时你发给它的内容,只留一句占位说明,不记内容。完整终端不另存原始输入;程序自己回显的文字仍属于输出,会先遮挡再记录。

它只是文字记录:不录屏,不开摄像头,不录声音。

遮挡只能减少意外泄露,不能识别任意编码或特殊格式的秘密。不要打印密码、密钥或令牌,也不要把含有它们的终端截图发给别人。

另外还有一份操作记录:哪台设备、什么时候打开和关闭了网页终端,以及你确认过的终端命令和 sudo。这一份只记指纹(一串哈希值),不记命令原文。

为什么要记录

网页终端能直接在 Agent J 主机上运行命令,权限很大。记下来,是为了出了问题能查清楚:

  • 倒查。 东西坏了、文件不见了,你和 Agent J 可以照着记录,一行一行看那段时间在 Agent J 主机上做过什么。
  • 防冒用。 万一别人拿到了你的遥控器,他在终端里做过的事也都有记录,你能看到是哪台设备、什么时候、做了什么。

存在哪里

只存在 Agent J 主机上,在 Agent J 的数据目录里(默认是 ~/.local/state/agentj/terminal/casts/),每打开一次就是一个文件。文件只有你在 Agent J 主机上的账户能读。记录不会上传到任何地方。

谁能看

  • 你。 在 Agent J 主机上运行下面这条命令,可以看到最近的操作记录和每一份记录的文件名:
agentj terminal logs
  • Agent J。 它可以直接读当前这次、或者上一次(关闭后 30 分钟内)的命令和输出,用来帮你接着查问题,读之前同样会先遮挡。更早的记录在 Agent J 的数据目录里,Agent 自己读不到;要它帮你看,由你在 Agent J 主机上把那一份拿给它。
  • 官方。 记录不会自动交给我们,也不会自动进客服报告或诊断。你需要我们帮忙查时,要不要发、发哪一段,由你决定:Agent 写好的客服消息要你同意才会发出,发出前还会在 Agent J 主机上再遮挡一遍。

保留多久

每份记录保留 30 天。超过 30 天的,下次打开网页终端时自动删除。Agent J 能直接读的那份只放在内存里,关闭后最多留 30 分钟,Agent J 主机上的 Agent J 停下或重启就没了。

为什么每次最长 15 分钟

网页终端每次打开默认最长 15 分钟,到点自动关掉。这是为了防止你忘了关:浏览器开着人走开了,终端也不会一直开着。完整终端连续 5 分钟没有输入和输出,或行模式 5 分钟没发任何一行,它会关闭;浏览器切到别的标签页或最小化超过 60 秒,也会关闭。短断线最多保留 30 秒,同一设备重新验证通行密钥后才可继续,原来的到期时间不变。

在原遥控器点「验证并恢复终端」,用通行密钥接回原进程。页面会显示剩余时限。若旧连接留有未提交的输入,终端会安全结束。仍在授权范围内可点「重新验证并开启」。若临时权限已到期,点「填写临时授权申请」,检查主对话里的草稿后发送,由主人确认。

需要更长时间,可以在 Agent J 主机上开启时用 --minutes 改,最多 60 分钟,见在 Agent J 主机上开启。时间到了想继续,再打开一次就行,每次打开都要 Face ID。

This page covers the operation log of Agent J’s full terminal and compatibility line mode on ordinary Agent J hosts. The Olares app uses Olares’ terminal, which does not use the logging or masking rules here; see Olares web terminal.

While you use the web terminal, its top always shows Operation log recording followed by the time left in this session. Click it to open this page.

What is logged

  • The full terminal keeps masked output and terminal size changes, without a separate keystroke record. Line mode also keeps each line you send.
  • The text output the terminal shows, the same as you see on the page.
  • When each part happened, so you can read it back in order.

Before anything is logged, the Agent J host hides common passwords and keys, the same way as on the page. The Agent J host login password is never in it. In line mode, a line sent to a running program is kept only as a placeholder, not its text. The full terminal does not separately save raw input. Text a program echoes is output and is masked before it is logged.

It is a text log only: no screen recording, no camera, no sound.

Masking reduces accidental disclosure; it cannot recognize secrets in every encoding or unusual format. Do not print passwords, keys or tokens, or share terminal screenshots containing them.

There is also an activity log: which device opened and closed the web terminal and when, plus the terminal lines and sudo calls you confirmed. That one keeps fingerprints only (a hash of each line), never the command text.

Why it is logged

The web terminal runs commands right on the Agent J host, so it is powerful. The log is there so a problem can be traced:

  • Trace back. Something broke or a file went missing: you and Agent J can go through the log line by line and see what was done on the Agent J host at that time.
  • Misuse. If someone else ever gets hold of your remote, what they did in the terminal is logged too: you can see which device, when, and what.

Where it is kept

Only on the Agent J host, in Agent J's data folder (by default ~/.local/state/agentj/terminal/casts/), one file per session. Only your account on the Agent J host can read the files. The log is never uploaded anywhere.

Who can read it

  • You. At the Agent J host, this shows the recent activity log and the file name of each session's log:
agentj terminal logs
  • Agent J. It can read the lines and output of the current session, or of the last one for up to 30 minutes after it closed, to help you carry on with a problem; this is masked the same way first. Older logs are in Agent J's data folder, which the Agent cannot read on its own; for it to look at one, you hand that file to it at the Agent J host.
  • Us. The log is never sent to us automatically and never goes into a support report or diagnostics by itself. When you want our help, you decide whether to send anything and which part: a support message the Agent writes goes out only after you say yes, and it is masked once more on the Agent J host before it leaves.

How long it is kept

Each session's log is kept for 30 days. Older ones are deleted the next time the web terminal opens. The copy Agent J can read directly is kept in memory only, for at most 30 minutes after the close, and is gone when Agent J stops or restarts on the Agent J host.

Why 15 minutes at most

Each time the web terminal opens it lasts at most 15 minutes by default, then closes by itself. This is so a forgotten terminal does not stay open: if you walk away from the browser, the terminal does not wait there for anyone. It also closes after 5 minutes with no input or output in the full terminal, or no line in line mode, and when the browser has been on another tab or minimised for more than 60 seconds. A short disconnection is retained for at most 30 seconds. Only the same device can resume after a fresh passkey check; the original expiry stays unchanged.

On the original remote, choose Verify and resume terminal and use your passkey to return to the same process. The page shows the remaining time. Unsubmitted input on the old connection can require a new terminal. Choose Verify and open again while you still have access. If temporary access expired, choose Prepare an access request, review the draft in chat and send it for the owner to approve.

For longer sessions, set --minutes when you switch it on at the Agent J host, at most 60; see Switch it on at the Agent J host. When the time is up and you want to go on, open it again; every open needs Face ID.

这一页的 Markdown 原文This page as Markdown: zh.md · en.md