← 博客 Computer History 拆包笔记 ChatGPT · Codex · macOS

Codex / ChatGPT App · Computer History 完整记录

Computer History、chronicle、skysight 三个名字,以及 App 到 events.jsonl 再到 Markdown 记忆的管线
封面按正文画:三个内部名,再加上采集到记忆的那条路。

记录日期:2026-08-19

对象:ChatGPT 桌面端(macOS)里的 Computer History,不是会话 history、不是内置浏览器 OwlHistory、也不是旧 Chronicle 录屏本身。

性质:对着本机安装包还原。Electron 来自未加密 app.asar(无 source map)。采集内核是 SkyComputerUseService(Mach-O / Swift),没有 .swift 源文件,但类型名、JSON kind、摘要管线、硬编码 bundle 列表能从字符串完整抽出。

补全轮次:2026-08-19 第二轮(Service 21MB + Client MCP + Record & Replay 同源事件层)。

0. 一句话

Computer History 把你允许范围内的 Mac App / 网站交互事件,周期性收成 Markdown 记忆和时间线,给 ChatGPT 与 Codex 当「你刚才在干什么」的上下文。产品名是 Computer History;配置和 UI 代码仍叫 chronicle;原生采集和 feature flag 叫 skysight

1. 不要和这些搞混

名字是什么路径 / 标识
Computer History本文对象。被动记交互事件 → 记忆 + 时间线features.skysight + features.chronicle;记忆在 ~/.codex/memories/extensions/skysight/resources/
Chronicle2026-04 研究预览,录屏 + OCR$TMPDIR/chronicle/screen_recording/;二进制 codex_chronicle;旧记忆在 ~/.codex/memories_extensions/chronicle/
Computer UseAgent 主动点、打、控 App同一套 Sky 客户端,子命令 mcp
Record & Replay你按开始/结束,演示一遍做成 skill同一客户端,子命令 event-stream mcp
会话 / thread history聊天记录~/.codex/sessionsthread_history_1.sqlite
OwlHistory内置浏览器网页历史owl-feature-bootstrap-cache.json 里的 OwlHistory

Computer History 打开时会把旧 Chronicle skill 归档,采集改走 Skysight。旧 Chronicle 的 242 条 md 不会被新时间线读取。

2. 三个名字对照

one feature, three names Computer History settings page chronicle config / i18n skysight native IPC / flag
用户看见 Computer History。配置还叫 chronicle。采集叫 skysight。

同一功能在包里同时存在:

名字
用户可见Computer History
设置页 i18n / React query / 配置开关chroniclesettings.chronicle.*t.chronicle.listHistory()features.chronicle
桌面 feature flagskysight(默认 false,仅 darwin
原生 IPC / 分析ComputerUseIPCSkysightCodexSkysight
插件包computer-history
记忆目录memories/extensions/skysight/

asar 里实例化条件(主进程):

js
chronicle: process.platform === "darwin"
  && this.options.getSkysightRecorderController != null
    ? new /* ChronicleHostService */(..., {
        list: () => pde({ resourcesDirectory: u }),
        listSuggestions: () => mde({ resourcesDirectory: u }),
        listSummaryIntervals: (sinceMs) => hde({ resourcesDirectory: u, sinceMs }),
      })
    : undefined

u 固定为:

js
path.join(executionCodexHome, "memories", "extensions", "skysight", "resources")

插件表:

js
{
  ...computerHistory,
  isAvailable: ({ features, platform }) =>
    platform === "darwin" && features.skysight
}

3. 本机对应的安装物

记录时版本:

组件
/Applications/ChatGPT.appbundle com.openai.codex26.814.41407 (build 6720)
Computer Use / Skycom.openai.sky.CUAService26.817.1000761
Computer History 插件1.0.1000761(与 Computer Use、Record & Replay 同号)
Codex CLI 缓存版本0.148.0~/.codex/version.json
官方上线2026-08-13(What's new:August 10–14, 2026)

关键文件:

text
/Applications/ChatGPT.app/Contents/Resources/app.asar
/Applications/ChatGPT.app/Contents/Resources/plugins/openai-bundled/plugins/computer-history/
/Applications/ChatGPT.app/Contents/Resources/codex_chronicle          # 旧 sidecar,仍打包
/Applications/ChatGPT.app/Contents/Resources/computer-history.svg
/Applications/ChatGPT.app/Contents/Resources/computer-history-pause.svg
/Applications/ChatGPT.app/Contents/Resources/computer-history-resume.svg

~/.codex/computer-use/Codex Computer Use.app/
  Contents/MacOS/SkyComputerUseService
  Contents/SharedSupport/SkyComputerUseClient.app/Contents/MacOS/SkyComputerUseClient
  Contents/Resources/Package_ComputerUse.bundle/Contents/Resources/
    SkysightSummarizer.md
    SkysightMemoryInstructions.md

asar 内与 Computer History 直接对应的前端 chunk:

text
webview/assets/chronicle-settings-page-*.js      # 设置 + 时间线 UI
webview/assets/computer-history-query-*.js       # listHistory / suggestions / intervals
webview/assets/computer-history-suggestions-*.js
webview/assets/computer-history-suggestion-prompt-*.js
.vite/build/main-*.js                            # 主进程 recorder + 时间线解析
.vite/build/src-*.js                             # App Server 侧 coordinator

没有 .map。源码是压缩 JS,不是原始 TypeScript。

4. 谁能开、什么条件

官方 + 本机代码对齐后的硬条件:

  1. 平台:macOS。代码里 sidecar/Skysight 额外要求 darwin && arm64(或 NODE_ENV===test)。Intel Mac 走不通这条。
  2. 套餐:Pro / Business / Enterprise。API key、Amazon Bedrock 不可用。
  3. 地区:EEA、瑞士、英国没有(官方文档)。
  4. 双开关:用户配置必须同时

配置路径由 Yb(name) 写成 features.<name>,经 config/value/write upsert。

  1. 桌面 flagfeatures.skysight === true(客户端默认 false,由服务端 / Statsig 打开)。
  2. 组织门闩configRequirements.featureRequirements.chronicle !== false。为 false 时抛

Computer History is disabled by your organization

  1. 权限:macOS Accessibility。不要 Screen Recording。没批完时:

enabled: truerecorderState: "stopped"activationState: "waiting_for_permissions"

  1. Business / Enterprise:管理员先开 Enable Computer History,成员再自己开。管理员批准 ≠ 替用户打开。

isFeatureConfigured()

js
orgAllowed
  && userConfig.features.memories === true
  && userConfig.features.chronicle === true

5. 架构

允许的 App / 网站 clicks · AX · URLs SkyComputerUseService EventTap + AXObserver SkyComputerUseClient skysight* IPC ChatGPT.app recorder enable / pause / archive skill events.jsonl · 48h TTL + suppressed.jsonl codex exec SkysightSummarizer.md ~/.codex/memories/extensions/skysight/ 10min md → 6h rollup → MEMORY.md 下次对话若引用记忆,Markdown 正文会进那次请求。原始事件官方称处理后不留。 同一客户端还提供 Computer Use(mcp)和 Record & Replay(event-stream mcp)。
Electron 管开关。21MB 的 SkyComputerUseService 管采集。记忆是本机 codex exec 压出来的 Markdown。
text
允许的 App / 网站
        │  macOS Accessibility(点击、按键、切窗、AX 文本/diff、选中、焦点、鼠标/键盘目标)
        ▼
SkyComputerUseService  (原生,写事件段)
        │  Apple Events IPC(ComputerUseIPCSkysight*)
        ▼
SkyComputerUseClient
        │  Electron worker 方法 skysightStart/Stop/Pause/Resume/Status/GetSettings/UpdateSettings/ClearHistory
        ▼
ChatGPT.app 主进程 recorder
        │  状态机 + 插件安装 + 旧 skill 归档
        ▼
本地事件流(App Group,官方称 ≤48h)
  <eventStreamRootPath>/segments/<ts>/
    events.jsonl
    metadata.json
  另有 suppressedEventsPath(被策略丢掉的事件)
        │  周期性 ephemeral Codex session
        │  提示词:SkysightSummarizer.md
        ▼
~/.codex/memories/extensions/skysight/resources/
    <utc>-<4字母>-10min-memory-summary.md
    <utc>-<4字母>-6h-memory-summary.md
        │  phase2:SkysightMemoryInstructions.md
        ▼
~/.codex/memories/MEMORY.md 等长期记忆(打 [skysight memory])
        │  以后某次对话用到
        ▼
记忆正文进入请求上下文(是否训练看 ChatGPT data controls)

同一原生二进制 SkyComputerUseClient 的子命令:

子命令产品
mcpComputer Use
event-stream mcpRecord & Replay
computer-history mcpComputer History
turn-endedCodex 一轮结束通知(config.tomlnotify

插件启动:

text
computer-use-client-launcher computer-history mcp
→ $CODEX_HOME/computer-use/Codex Computer Use.app/.../SkyComputerUseClient computer-history mcp

6. 打开 / 暂停 / 关闭(主进程源码)

Recorder 类(asar main-*.js,压缩名 Dre)。

默认缓存状态:

js
{
  state: "stopped",
  eventStreamRootPath: null,
  currentSegmentEventsPath: null,
  currentSegmentMetadataPath: null,
  suppressedEventsPath: null,
  startedAtMs: null,
  endedAtMs: null,
}

原生时间戳是 Apple 纪元(2001-01-01)。Electron 换算:

js
APPLE_EPOCH = 978307200
startedAtMs = (startedAt + 978307200) * 1000

状态:stopped | running | paused

激活态:idle | starting | waiting_for_permissions | failed

打开 enable()

desiredState = running,串行执行,失败则停采集并回滚:

  1. archiveLegacyChronicleSkill()

见第 14 节。reason = skysight_gate_enabled

  1. reconcileComputerHistoryPluginInstallation(true)

对齐 bundled 插件 computer-history

  1. worker:skysightStart

原生超时 115 秒(start/resume);其它操作 15 秒。

Apple Event 失败码 -600 / -609 / -1708 / -1717 会退避重试。

服务端回 Computer History is not enabled for this user 也会重试。

权限 pending:配置已写成开启,采集仍 stopped。

权限 denied:回滚配置,enabled: false

对齐 reconcileEnabled()

已开过、服务重启后:若 status 已是 running 则只同步 desiredState,否则再 skysightStart

暂停 / 继续

关闭 disable()

skysightStop。停完后若 currentSegmentEventsPathcurrentSegmentMetadataPath 仍非空,抛:

Chronicle stopped but did not close its current segment

然后 reconcileComputerHistoryPluginInstallation(false)

双后端

getSkysightRecorderController() 有值 → 新 Skysight。

没有 → 旧 sidecar:$TMPDIR/codex_chronicle/chronicle-started.pid,环境变量 CODEX_CHRONICLE_STARTED_PID_PATH,配置对象 codex_chronicle_config。包里仍带 codex_chronicle 二进制。

7. 原生 IPC

Electron → SkyComputerUseClientSkyComputerUseService,Apple Events。

Electron worker 方法

方法作用
skysightStart开始采集
skysightStop停止并关闭当前 segment
skysightPause暂停,可选 duration
skysightResume继续
skysightStatus状态 + 路径
skysightGetSettings观察策略
skysightUpdateSettings整份覆盖 settings
skysightClearHistory{ scope, interval? }

Swift / protobuf 类型(Client 二进制字符串)

text
ComputerUseIPCSkysightStartRequest
ComputerUseIPCSkysightStopRequest
ComputerUseIPCSkysightPauseRequest
ComputerUseIPCSkysightResumeRequest
ComputerUseIPCSkysightStatusRequest
ComputerUseIPCSkysightStatus
ComputerUseIPCSkysightState
ComputerUseIPCSkysightGetSettingsRequest
ComputerUseIPCSkysightUpdateSettingsRequest
ComputerUseIPCSkysightUpdateObservationPolicyRequest
ComputerUseIPCSkysightSettings
ComputerUseIPCSkysightObservationSettings
ComputerUseIPCSkysightObservationRule
ComputerUseIPCSkysightObservationRuleScope
ComputerUseIPCSkysightObservationDefaultBehavior
ComputerUseIPCSkysightClearHistoryRequest
ComputerUseIPCSkysightClearHistoryScope
ComputerUseIPCSkysightHistoryInterval

菜单栏另有 ComputerUseIPCCodexStatusItemMenuStateRequestComputerUseIPCAppStopRequest

分析事件

text
CodexSkysightServiceStarted / Stopped / Paused / Resumed
CodexSkysightServiceStopReason
CodexSkysightObservationSettingsUpdated
CodexSkysightHistoryCleared
CodexSkysightMemorySummaryFinished
CodexSkysightMcpServerLaunched
CodexSkysightMcpToolCalled
CodexSkysightStatusItemActionClicked

传输:Apple Events + XPC。Client 字符串里有 CodexComputerUseIPC-3CodexComputerUseNativeBridge-1ComputerUseIPCXPCTransportsendRequestWithTypeName:requestData:...。版本不一致会要求用户重启 ChatGPT.app。

events.jsonl 不在 Client 里。写入器在 Service:EventStreamJSONLWriterSkysightSegmentWriter。路径经 Status 回传。

MCP 工具(类 ComputerHistoryMCPServer)完整文案:

工具文案
computer_history_pauseTemporarily pause Computer History without disabling it.
computer_history_resumeResume a paused Computer History recorder.
computer_history_statusGet Computer History status and paths to recent activity files.
computer_history_get_settingsGet all Computer History settings. Call this immediately before updating settings so unchanged fields can be preserved.
computer_history_update_settingsReplace all Computer History settings. … first calling computer_history_get_settings.

Status 回传字段(Client 类型布局):stateeventStreamRootPathcurrentSegmentEventsPathcurrentSegmentMetadataPathsuppressedEventsPathstartedAtendedAt

另有 sessionDirectoryPathmaxDurationSeconds(Record & Replay 共用事件层)。

工具 JSON schema 没有以明文 JSON 躺在二进制里(additionalProperties 紧挨着 update 文案)。参数形状以 Electron Zod + protobuf 字段名为准。

8. 观察策略(settings)

Zod 形状(asar 里校验):

ts
{
  observation: {
    defaultApplicationBehavior: "observe" | "do_not_observe",
    defaultURLBehavior: "observe" | "do_not_observe",
    allowlist: Array<{ scope: "app" | "url", bundleID?: string | null, urlDomain?: string | null }>,
    blocklist: Array<{ scope: "app" | "url", bundleID?: string | null, urlDomain?: string | null }>,
  }
}

规则(插件 SKILL.md):

UI 四套:Exclude these apps / websites,Include only these apps / websites。

时间线条目上点 App 图标,可以直接 exclude / include。

菜单栏策略补丁走 ComputerUseIPCSkysightUpdateObservationPolicyRequest,映射:

text
app.include  → include_application
app.exclude  → exclude_application
url.include  → include_url
url.exclude  → exclude_url

清除映射:

text
application_session → clear_application_session
last_ten_minutes    → clear_last_ten_minutes
last_hour           → clear_last_hour
last_day            → clear_last_day

菜单状态还带:

ts
{
  computerUse: { activeApplications: App[] },
  computerHistory: {
    state: "stopped" | "running" | "paused",
    canClearHistory: { lastTenMinutes, lastHour, lastDay },
    recentApplications: Array<App & {
      isExcluded,
      lastSession: { startedAt, endedAt, canClearHistory },
      domains: Array<{ domain, isExcluded }>,
    }>,
  }
}

9. 事件流(采集产物)

Service 内嵌提示词与 SKILL 一致,并标明 ephemeral:

text
# Raw event stream segments (ephemeral; not persisted)
<eventStreamRootPath>/
  segments/
    <segment_timestamp>/
      events.jsonl      # append-only activity events
      metadata.json     # timestamps and event counts
      suppressed.jsonl  # 被策略丢掉的事件(Service 文件名)

eventStreamRootURLSkysightService 上。Status 另回 suppressedEventsPath

metadata.json 字段:startedAtendedAtendReasoneventCountsuppressedEventCount

Record & Replay 同一套存储还会写 session.jsonendReasonrecording_controls_cancelled)。Computer History 用滚动 segment。

路径相关字段:rootDirectoryURLdirectoryURLeventsURLmetadataURLsuppressedEventsURLmemoryResourcesURLmemoryExtensionURLconfigurationRootURL

容器:appGroupContainerUnavailable(官方 App Group;本机 Group Container 2DC432GLL2.com.openai.sky.CUAService 目前只有 IPC socket computeruse.sock,没有 segment 目录——功能没开过)。

TTL / 删除(补上原先的缺口):

不录屏、不录音、不要 Screen Recording。隐私浏览:privateBrowsingExcludedPrivateBrowsingIndicators,以及一长串本地化「无痕/隐私浏览」窗口标题碎片。

9.1 一条事件(EventStreamRecord

__swift5_reflstr 里,记录字段和枚举 case 紧挨着,这就是 Codable 用的名字。

记录字段:

text
timestamp
kind
app
window
mouse
keyboard
selection
ax

旁边还有一条 AX 通知记录:timestampkindappwindownotificationKindselectionwindowIDtexteventTargetax_pendingAXNotificationRecords)。

顶层 / 嵌套字段(同一段反射字符串):

text
bundleIdentifier, url, windowID, clickCount, text, selectedText
eventsPath, eventCount, suppressedEventCount
directoryURL, eventsURL, metadataURL, suppressedEventsURL

Swift 构造器还带 diagnostic: EventStreamDiagnostic?。没有 typedText 这个键;键盘输入走 keyboard + kind keyboardTextInput,缓冲在 _textBuffer / _textFlushTask

9.2 EventStreamEventKind(完整枚举)

window.changed mouse.click mouse.context_menu mouse.drag keyboard.text_input keyboard.submit keyboard.shortcut selection.changed

反射字符串里 8 个 case,与 JSON raw value 一一对应:

Swift caseJSON kind
appWindowChangedwindow.changed
mouseClickmouse.click
mouseContextMenumouse.context_menu
mouseDragmouse.drag
keyboardTextInputkeyboard.text_input
keyboardSubmitkeyboard.submit
keyboardShortcutkeyboard.shortcut
selectionChangedselection.changed

二进制里另外还有 terminal.value_changedsession.startedsession.ended。后两个更像 Record & Replay 的 session.json 边界,不一定是 Computer History 的 EventKind。terminal.value_changed 对着终端 bundle 表,可能是终端专用分类,不在这 8 个 case 里。

底层 AX 通知(先变成 pending,再 debounce 成上面的 kind):

AXApplicationActivated / Deactivated / Shown / HiddenAXFocusedUIElementChangedAXFocusedWindowChangedAXMainWindowChangedAXSelectedTextChangedAXSelectedChildrenChangedAXWindowMiniaturized / DeminiaturizedAXUIElementDestroyedAXMenuItemSelected

AX 树:EventStreamAXTree + ModeisAXTreeDiffingEnabled、feature axTreeDiffing。diff 语法:~ / + / -。残留路径:ComputerUse/RefetchableSkyshotAXTree.swift

9.2.1 采集循环(Service 字段,不再是黑盒)

EventStreamRecorder 内部状态(reflstr):

text
_eventTap
_currentAppPID
_frontmostAppObserver
_axObserver
_previousWindowRevision
_previousWindowRevisionWindowID
_latestURLByWindowID
_mouseDown
_textBuffer
_textFlushTask
_pendingAXNotificationRecords
_axNotificationDebounceTasks
onSuppressedRecord / _onSuppressedRecordStored
_shouldCaptureApplication

对应 CG 层:clickEventTapkeyboardEventTapmouseEventTapsmouseDown / mouseUp / mouseDragged / mouseMoved

流程:

  1. EventTap 收鼠标/键盘;AXObserver 收焦点、选区、窗口。
  2. 鼠标按下记在 _mouseDown,松手合成 mouseClick / mouseDrag / mouseContextMenu
  3. 按键进 _textBuffer,debounce flush 成 keyboardTextInput;回车/快捷键单独成 keyboardSubmit / keyboardShortcut
  4. AX 通知进 _pendingAXNotificationRecords,debounce 后合成 appWindowChanged / selectionChanged
  5. _latestURLByWindowID 给浏览器记录补 URL。
  6. EventStreamRecordFilter + EventStreamURLPolicyRecordFilter:过不了就 appendSuppressedsuppressed.jsonl
  7. 通过则 EventStreamJSONLWriter append → 当前 segment 的 events.jsonl

抑制原因(reflstr,对应 SkysightObservationSuppressionReason):

text
applicationExcluded
privateBrowsingExcluded
urlExcluded
urlPolicyBlocked

另有错误态:appNotAllowedrecorderSuppressedappGroupContainerUnavailable

9.3 硬编码特殊 bundle(Service 连续字符串表)

密码器(几乎肯定默认抑制 / 特殊处理):

text
com.1password.1password
com.1password.safari
com.bitwarden.desktop
com.dashlane.dashlanephonefinal
com.lastpass.LastPass
com.nordsec.nordpass
me.proton.pass.electron
me.proton.pass.catalyst

终端(对应 terminal.value_changed):

text
com.apple.Terminal
com.googlecode.iterm2
dev.warp.Warp-Stable
net.kovidgoyal.kitty
com.github.wez.wezterm
com.mitchellh.ghostty
com.raphaelamorim.rio
dev.commandline.waveterm

本产品(避免录自己):

text
com.openai.codex / .alpha / .beta / .dev / .nightly
com.openai.chat.alpha / .beta / .nightly / .mac-debug
com.openai.atlas / .alpha / .beta

浏览器(走 URL 策略 + 无痕检测,不是一律不记):

text
com.google.Chrome
com.apple.Safari
com.brave.Browser
com.microsoft.edgemac
com.operasoftware.Opera
com.vivaldi.Vivaldi
company.thebrowser.Browser / .browser / .dia
org.chromium.Chromium
ai.perplexity.comet
com.openai.atlas*

紧接着是 com.apple.UserNotificationCenterLocalAuthenticationRemoteServiceSecurityAgent,以及多语言「无痕/隐私浏览」标题碎片。

Electron 时间线另外还滤:com.openai.sky.CUAService、Dock、Control Center、WindowManager 等(第 10 节)。

9.4 记忆生成管线(Service,不再只靠官方一句话)

类型:

text
SkysightMemoryPipeline
SkysightSummariser / SkysightSummarizer
SkysightCodexExecSummariser    # 调 `codex exec`
SkysightChildSummary
SixHourWindow
SkysightSummaryError
SummaryFile
ProcessOutput                  # succeed / failed / timed_out

出错字符串:

text
codex exec did not emit a final agent message.
codex exec timed out.
codex exec failed:
invalid summary directory.
invalid child summary:

10 分钟窗把 segment 路径塞进 BEGIN UNTRUSTED OBSERVED INPUT,再跑 codex exec。6 小时窗吃 child summaries(UNTRUSTED CHILD SUMMARY)。

提示词还要求:只用事件流当证据;记忆里不要凭据、token、原始 event JSON

这与官方「ephemeral Codex session」一致:落地实现就是本机 codex exec,不是 Electron 自己拼 prompt。

分析事件 CodexSkysightMemorySummaryFinished 对应这一步结束。

9.5 Codex 自己怎么用这些数据(asar src-*.js 环境提示)

Ambient suggestions 的硬规则:

这和用户手动问「我刚才在干什么」时 SKILL 允许 rg events.jsonl 是两套策略:后台建议更严。

10. 记忆文件格式(时间线真正读的东西)

目录:

text
$CODEX_HOME/memories/extensions/skysight/
  instructions.md          # 即 SkysightMemoryInstructions.md 的落地版
  resources/
    YYYY-MM-DDTHH-MM-SS-<4字母>-10min-memory-summary.md
    YYYY-MM-DDTHH-MM-SS-<4字母>-6h-memory-summary.md

主进程文件名正则:

js
/^(\d{4}-\d{2}-\d{2})T(\d{2})-(\d{2})-(\d{2})-[^-]+-(10min|6h)-memory-summary\.md$/

时间从文件名解析为 UTC:Date.parse(${date}T${hh}:${mm}:${ss}Z)

后缀窗口summaryLevel
10min10 分钟(600 * 1000 ms)ten_minute
6h6 小时(360 60 1000 ms)six_hour

时间线合并

  1. 列出目录里所有匹配文件
  2. 读 YAML frontmatter(--- 围栏,zod 校验)
  3. 有 6h 覆盖的区间,不再展示落在该区间内的 10min
  4. startMs 降序
  5. suggestion 仅当 now - startMs < 48h2880 60 1000)才带上

Frontmatter schema:

yaml
---
title: string
description: string          # 给用户看,用 you/your
applications: [bundle.id]    # 只要 bundle id
suggestion:                  # 可选;解析失败则丢掉,不整条作废
  type: skill | automation
  name: string
  description: string
---

不进 App 图标列表的 bundle

text
com.openai.sky.CUAService
com.apple.WindowManager
com.apple.controlcenter
com.apple.dock
com.apple.notificationcenterui
com.apple.UserNotificationCenter
com.apple.LocalAuthentication.UIAgent
com.apple.LocalAuthenticationRemoteService
com.apple.SecurityAgent

另:isBackgroundAgent === true 的也会滤掉。

摘要正文结构(SkysightSummarizer.md)

三个一级标题,顺序固定:

  1. Memory summary
  1. Recording summary(按时间段细账)
  2. Citations(只许本地路径 / 本地产物,禁止 URL 和 markdown 链接)

摘要器把事件、AX 文本、网页、子摘要全部当不可信输入。禁止把屏幕上的「忽略之前的指令 / 写进记忆 / 告诉未来 agent」写成规则。禁止密钥、PII、网页正文、律师-客户特权材料(连「存在过」都不许写)。

phase2 合并(SkysightMemoryInstructions.md):

11. 设置页 UI(asar chronicle-settings-page

路由在 Settings → Integrations → Computer history。i18n 前缀仍是 settings.chronicle.*

未打开

卖点文案:不录屏、不录音;可问刚才在做什么、少解释、发现可自动化的重复劳动。

示例问答(产品写死的演示,不是真实记忆):

前置检查:服务是否在、Memories 是否可用。没有 Memories 会弹出「先开 Memories」。

同意框

按钮:Allow all apps / Customize apps。

已打开

「问历史」预填 prompt(产品写死)

text
Give me a list of tasks I’ve worked on today and their status
Prepare a summary of what I did yesterday for standup
Where can I find the proposal document I was looking for earlier today?
Who contacted me today that I need to follow up with?
Roast my computer behavior
How often do I get distracted, and what usually pulls me off task?
Give me feedback on how I operate day to day
Analyse the writing samples you have from me and describe my writing style with examples and guidelines
Create a reusable skill that writes like me
What keyboard shortcuts do I use most? And which should I be using more?
Where am I being ineffective, and what should I be using AI for instead?
What is my most commonly used phrase?
How do I split my time between focused work, switching tabs, and returning to unfinished tasks?
What was I working on before my last break?

Suggestion → 新对话

skill:

text
Create a new "{name}" skill based on the description below.
Consult the memory at {memoryFilePath} and the events.jsonl files cited there
to understand the recorded workflow and my actions.

"{request}"

automation 额外一句:Use my local timezone and a new chat for scheduled runs.

未读 skill 建议会堆在 atom 里;打开相关 UI 后清掉。建议去重:同 type + 小写 trim 后的 name + 时间区间相交。

Query key:["chronicle-history"],suggestions / summary-intervals 是它的派生。staleTime: 0,聚焦窗口会重拉。

summary-intervals 默认回看 10080 60 1000 ms = 7 天

另有 Statsig / 实验 id 3488289778:不满足则前端不把 Computer History suggestions 当可用。

12. 插件 / MCP / Agent 用法

插件 computer-history 1.0.1000761,Proprietary,category Productivity。

MCP 工具(SKILL + ComputerHistoryMCPServer 二进制文案):

工具作用
computer_history_status状态 + 近期活动文件路径
computer_history_pause暂停但不关闭功能;原生 duration:thirtyMinutes / oneHour / untilTomorrow
computer_history_resume继续
computer_history_get_settings读完整策略
computer_history_update_settings整份覆盖;非法设置报 Invalid Computer History settings:

SKILL 要求:

  1. computer_history_status,再用 date 对时间
  2. 问大范围先读 6h,再下钻 10min
  3. 问刚发生的事:rg events.jsonl(App、窗口、URL、选中、输入、焦点、目标、AX)
  4. 认到源之后立刻切 connector / 文件系统 / App skill,不要靠事件残缺文本干活
  5. 不要用 Record & Replay 的工具回答「我刚才在干什么」
  6. 不要手改磁盘上的 settings,只用 MCP

默认快捷 prompt:

13. 和 Codex Memories 的关系

Computer History 依赖 Memories,单独开不了。

ChatGPT 网页 Memory本地 Codex MemoriesComputer History
来源聊天里模型决定记住的空闲会话摘要 + 合并电脑上的真实操作
存储云端~/.codex/memories/事件 → skysight md → 可选并入本地 Memories
控制Personalization/memories[features] memoriesSettings > Computer history + 菜单栏
粒度长期偏好会话 / 项目10min / 6h 时间线

本地 Memories 自己还会:跳过进行中/太短的会话;额度低了不抽;memories.disable_on_external_context 可排除用过 MCP / web search 的会话。

摘要消耗 Codex token。开着等于后台持续有 summarizer。

14. 从 Chronicle 迁到 Computer History

产品说法:replaces Chronicle, rebuilt system rather than a rename。

打开 Computer History 时归档旧 skill(主进程 ire()):

去向
~/.codex/skills/chronicle~/.codex/skysight/migration/legacy-chronicle-skill/<ts-uuid>/skill
~/.codex/.codex-chronicle-assets-to-install.marker同目录 marker
元数据同目录 metadata.json(originalPath、hash、reason=skysight_gate_enabled、时间)

跨卷用 copy + rm。归档成功会 broadcastQueryCacheInvalidation(["skills"])

旧记忆目录 ~/.codex/memories_extensions/chronicle/resources/ 新时间线不读

旧录屏:$TMPDIR/chronicle/screen_recording/(latest.jpg、ocr.jsonl、1min 帧)。约 6 小时删除。需要 Screen Recording。

15. 隐私与安全

官方承诺不进历史:截屏、屏幕录像、麦克风、系统音频、隐私浏览。

仍会进事件、再被摘要:打的字(安全输入框能否挡住取决于 App)、选中文本、窗口标题、AX 可见文字。

磁盘:

上传:

  1. 周期性:事件 → OpenAI 写记忆。官方称事后不留事件、不训练。
  2. 以后对话引用记忆:记忆进该次 chat,是否训练看 data controls。

Prompt injection:文档写明,恶意网页指令可能被 ChatGPT / Codex 执行。摘要器做了隔离;记忆再进后续对话时隔离变弱。

官方建议:通讯应用先暂停或排除;健康 / 财务 / 密码器直接 exclude。

16. 官方产品能力(文档口径)

用途:

定位:history 用来 认源,认完去读 Google Doc / Slack / 本地文件,不要把摘要当原文。

官方文档 learn.chatgpt.com/docs/customization/computer-history

Memories learn.chatgpt.com/docs/customization/memories

17. 本机状态(2026-08-19 检查)

状态
ChatGPT.app / Sky已装,版本见第 3 节
chronicle-consent-acceptedtrue(旧 Chronicle 同意过)
chronicle-setup-completion-pendingfalse
config.toml [features] memories没有
~/.codex/memories/extensions/skysight/不存在
旧 Chronicle 记忆~/.codex/memories_extensions/chronicle/resources/242 条,2026-04-28~05-12
~/.codex/skills/chronicle还在(尚未被 skysight_gate_enabled 归档)
Computer History 插件在 ChatGPT.app 和 ~/.codex/.tmp/bundled-marketplaces/plugins/cache 里没有常驻一份

结论:这台机器用过旧 Chronicle,还没让新 Computer History 写出过记忆。设置页时间线会是空的。旧 242 条不会出现在新时间线里。

若要开:

  1. Settings → Personalization → Enable memories
  2. Settings → Integrations → Computer history → Turn on
  3. 排除 1Password / 钥匙串 / 银行 / 医疗 / 不想被记的聊天软件
  4. 约 20 分钟后看 ~/.codex/memories/extensions/skysight/resources/ 是否出现第一条 *-10min-memory-summary.md

18. 证据清单

没有 .swift 源文件,也没有跑过 Skysight 的真实 events.jsonl

19. 完整度(相对「实现说明书」)

状态
命名、开关、归档、时间线读盘完整(asar)
观察策略 schema、清除范围、暂停档位完整
MCP 工具名与文案完整;JSON Schema 原文未嵌入二进制
EventStreamEventKind 8 case + JSON raw value完整(__swift5_reflstr
Record 字段、抑制原因、采集循环内部状态完整(reflstr 字段表)
摘要:codex exec + 10min/6h 任务名完整到管线;模型名/超时秒数未出现在字符串里
硬编码密码器/终端/浏览器/无痕标题完整
事件 TTLttl / expiresAt / retainUntil,与文档 48h、建议窗口 48h 对齐;字面量秒数未写出
segmentDurationSeconds 的数字字段有,运行时才填;上界是 10 分钟摘要
真实 events.jsonl 一行样本本机没有。要打开 Computer History 才会出现
App Group 里的 segment 目录容器在 2DC432GLL2.com.openai.sky.CUAService,目前只有 IPC/computeruse.sock
设置页 14MB chunk 状态机i18n + activation 字段已覆盖产品行为

20. 压缩结论

Computer History 是 ChatGPT.app 在 macOS Apple Silicon 上的被动工作记忆。Electron 管开关、时间线、插件;SkyComputerUseService 用 Accessibility / EventTap 写成 EventStreamRecord JSONL(mouse.clickkeyboard.text_input 这类 kind),再 codex execSkysightSummarizer.md 变成 memories/extensions/skysight/resources 里的 10 分钟 / 6 小时 Markdown。配置 key 仍叫 chronicle,IPC 叫 skysight

采集循环、事件 kind、抑制原因、TTL 字段已经从 Swift 反射段补全。本机仍然没有一行真实 events.jsonl——那要打开功能才会写到 App Group。没开的话,这份就是安装包能还原的全部。

文章目录23
Silent Star约 17 分钟