ompgui 0.7.2 → 0.7.4
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +8 -6
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +4 -4
- package/.next/required-server-files.js +2 -2
- package/.next/required-server-files.json +2 -2
- package/.next/routes-manifest.json +12 -0
- package/.next/server/app/_global-error/page.js +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +2 -2
- package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
- package/.next/server/app/api/agent/[id]/bash-output/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/running/events/route.js +2 -2
- package/.next/server/app/api/agent/running/events/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/[name]/route.js +1 -1
- package/.next/server/app/api/agents/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/route.js +1 -1
- package/.next/server/app/api/agents/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/unpack/route.js +1 -1
- package/.next/server/app/api/agents/unpack/route.js.nft.json +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js.nft.json +1 -1
- package/.next/server/app/api/cwd/validate/route.js +2 -2
- package/.next/server/app/api/cwd/validate/route.js.nft.json +1 -1
- package/.next/server/app/api/daemon/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js.nft.json +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/file-index/route.js.nft.json +1 -1
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/git/diff/route.js +2 -2
- package/.next/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next/server/app/api/git/status/route.js +2 -2
- package/.next/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/mcp/route.js +3 -3
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/model-roles/route.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/connectivity/route.js +1 -0
- package/.next/server/app/api/models-config/connectivity/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/connectivity/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/route.js.nft.json +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/omp-settings/route.js +1 -1
- package/.next/server/app/api/omp-update/route.js +2 -2
- package/.next/server/app/api/omp-update/route.js.nft.json +1 -1
- package/.next/server/app/api/omp-version/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/plugins/route.js.nft.json +1 -1
- package/.next/server/app/api/projects/route.js +2 -2
- package/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/server/app/api/providers/enable/route.js +1 -1
- package/.next/server/app/api/relay/devices/[id]/route.js +1 -1
- package/.next/server/app/api/relay/devices/route.js +1 -1
- package/.next/server/app/api/relay/pair/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/archive/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/archive/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/media/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/media/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/subagents/[subagentId]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/subagents/[subagentId]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/subagents/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/subagents/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/archive/route.js +1 -1
- package/.next/server/app/api/sessions/archive/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/import/route.js +1 -1
- package/.next/server/app/api/sessions/import/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/search/route.js +1 -0
- package/.next/server/app/api/sessions/search/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js.nft.json +1 -1
- package/.next/server/app/api/usage/route.js +1 -1
- package/.next/server/app/api/web-auth/session/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/apple-icon.png/route.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +3 -3
- package/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/pair/page.js +1 -1
- package/.next/server/app/pair/page_client-reference-manifest.js +1 -1
- package/.next/server/app/pair.html +1 -1
- package/.next/server/app/pair.rsc +3 -3
- package/.next/server/app/pair.segments/_full.segment.rsc +3 -3
- package/.next/server/app/pair.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/pair.segments/pair/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/relay/route.js +1 -1
- package/.next/server/app-paths-manifest.json +8 -6
- package/.next/server/chunks/1410.js +2 -0
- package/.next/server/chunks/1671.js +1 -1
- package/.next/server/chunks/2043.js +3 -3
- package/.next/server/chunks/2676.js +1 -1
- package/.next/server/chunks/3100.js +1 -1
- package/.next/server/chunks/3798.js +1 -1
- package/.next/server/chunks/4980.js +1 -1
- package/.next/server/chunks/5318.js +1 -1
- package/.next/server/chunks/6332.js +1 -1
- package/.next/server/chunks/6337.js +1 -1
- package/.next/server/chunks/6480.js +18 -0
- package/.next/server/chunks/7077.js +1 -1
- package/.next/server/chunks/714.js +3 -1
- package/.next/server/chunks/7226.js +107 -0
- package/.next/server/chunks/7779.js +1 -1
- package/.next/server/chunks/8573.js +11 -0
- package/.next/server/chunks/9145.js +1 -1
- package/.next/server/chunks/933.js +1 -1
- package/.next/server/functions-config-manifest.json +3 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/3274.487a15bb28a8bf64.js +2 -0
- package/.next/static/chunks/4315-dfe6a33b10f1a366.js +1 -0
- package/.next/static/chunks/4318.65827559038c9692.js +17 -0
- package/.next/static/chunks/{4906-7dff29185f63f908.js → 4906-1472d0151646b3d8.js} +1 -1
- package/.next/static/chunks/app/_global-error/page-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/agent/running/events/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/agents/[name]/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/agents/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/agents/unpack/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/app-update/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/daemon/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/home/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/model-roles/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/models/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/models-config/connectivity/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/omp-settings/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/omp-update/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/omp-version/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/projects/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/providers/enable/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/relay/devices/[id]/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/relay/devices/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/relay/pair/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/archive/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/media/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/subagents/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/archive/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/import/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/sessions/search/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/skills/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/usage/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/web-auth/session/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/app/page-bca40f639be6becb.js +59 -0
- package/.next/static/chunks/app/relay/route-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-08a33f204a956c10.js +1 -0
- package/.next/static/chunks/webpack-b14269412e91a71d.js +1 -0
- package/.next/static/d7tCWD5FStyLazqHgLBLG/_buildManifest.js +1 -0
- package/README.ja.md +4 -1
- package/README.ko.md +6 -2
- package/README.md +7 -3
- package/README.zh-CN.md +4 -1
- package/bin/ompgui-update.js +11 -6
- package/bin/ompgui.js +6 -2
- package/package.json +2 -2
- package/.next/server/chunks/6209.js +0 -12
- package/.next/server/chunks/795.js +0 -105
- package/.next/server/chunks/8834.js +0 -18
- package/.next/static/Na7qed083WBP3X-plluRO/_buildManifest.js +0 -1
- package/.next/static/chunks/1012.477e42e5184b6aaa.js +0 -17
- package/.next/static/chunks/3274.2a04ea2716225057.js +0 -1
- package/.next/static/chunks/4315-142781649334beb2.js +0 -1
- package/.next/static/chunks/app/_global-error/page-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/agent/running/events/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/agents/[name]/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/agents/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/agents/unpack/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/app-update/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/daemon/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/home/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/model-roles/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/models/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/omp-settings/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/omp-update/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/omp-version/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/projects/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/providers/enable/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/relay/devices/[id]/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/relay/devices/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/relay/pair/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/archive/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/media/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/subagents/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/archive/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/import/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/skills/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/usage/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/web-auth/session/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/app/page-f53564bcb292e1e5.js +0 -59
- package/.next/static/chunks/app/relay/route-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-710453b8adcf7d31.js +0 -1
- package/.next/static/chunks/webpack-4e02c722bd171663.js +0 -1
- /package/.next/static/{Na7qed083WBP3X-plluRO → d7tCWD5FStyLazqHgLBLG}/_ssgManifest.js +0 -0
package/README.ko.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./README.md) | [한국어](./README.ko.md) | [日本語](./README.ja.md) | [简体中文](./README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
> **Android APK (Android 12+)** — Kotlin 보조 앱으로 원격 ompgui 서버에 연결하고, 최신 세션의 읽기 전용 오프라인 스냅샷을 이용할 수 있습니다. [ompgui Remote v0.7.
|
|
5
|
+
> **Android APK (Android 12+)** — Kotlin 보조 앱으로 원격 ompgui 서버에 연결하고, 최신 세션의 읽기 전용 오프라인 스냅샷을 이용할 수 있습니다. [ompgui Remote v0.7.4 다운로드](https://github.com/dbc-hbin/ompgui/releases/download/v0.7.4/ompgui-remote-v0.7.4.apk) · [릴리스 노트](https://github.com/dbc-hbin/ompgui/releases/tag/v0.7.4)
|
|
6
6
|
|
|
7
|
-
> `android/`의 실험용 네이티브 Compose 클라이언트는 인증된 `/relay` WebSocket을 사용하며, 세션/기록 제어와
|
|
7
|
+
> `android/`의 실험용 네이티브 Compose 클라이언트는 인증된 `/relay` WebSocket을 사용하며, 세션/기록 제어와 링크·도구 호출·결과·오류·미디어 참조를 포함하는 풍부한 온라인 대화 기록, 오프라인 Mermaid 다이어그램 및 코드 구문 강조, 이미지/PDF/오디오/HTML/Markdown/DOCX 인라인 미리보기를 제공합니다. 온라인 기록은 보호된 오프라인 스냅샷과 별개입니다. 크기가 제한된 미리보기에서 `sessions.content`로 전체 텍스트를 나누어 가져오고 미디어 참조도 페이지 단위로 조회하므로 대화 기록을 4,000자로 잘라내지 않습니다. 오프라인 캐시의 개인정보 보호 제한은 그대로 유지됩니다. 파일 자동 새로고침은 화면에 보일 때만 동작하며 저장하지 않은 편집 내용을 보존합니다. 허용된 숨김 파일 탐색과 아카이브 검색도 지원합니다. 모델/설정에서는 공개 models.dev 카탈로그, 고급 OMP 설정, 구성 상태와 구분되는 세션별 실제 MCP 실행 상태를 확인할 수 있습니다. 첨부 파일은 휴대폰에서 하나의 거대한 JSON으로 묶지 않고 스트리밍으로 스테이징하며, 이미지는 개당 10 MiB로 최대 10개, 텍스트 첨부는 별도로 개당 256 KiB로 최대 10개까지 지원합니다. OMP 자체의 이미지 정규화와 제공자별 이미지 개수 제한은 계속 적용됩니다.
|
|
8
8
|
>
|
|
9
9
|
> 네이티브 인터페이스는 웹 앱의 Warm 및 OMP 색상 팔레트를 따르며, 간결한 프로젝트/세션 트리와 설정/사용량 하단 메뉴, 도구 모음을 한 줄로 정리한 메시지 입력창을 제공합니다. 기록, 세션 정보, 명령 및 런타임 제어는 세션 메뉴에 모았고, 보조 워크스페이스 작업은 더보기 메뉴에 유지했습니다. 런타임 제어는 펼칠 수 있는 트리 카테고리로 구성하고 현재 값을 일정한 열에 맞춰 표시합니다. 설정은 간결한 행 단위 선택 컨트롤을 사용하며, 드롭다운 메뉴는 해당 컨트롤에 붙어 열립니다. Android 네이티브 컨트롤, 파일 선택기, 시트 탐색 방식과 서로 겹치지 않는 최소 48dp 터치 영역을 유지합니다.
|
|
10
10
|
>
|
|
@@ -174,6 +174,10 @@ ompgui은 Node가 호스팅하는 Next.js 앱으로, 설치된 `omp` 바이너
|
|
|
174
174
|
- **파일 접근**: 파일 탐색과 미리보기는 선택한 프로젝트 디렉터리 및 세션에 나타난 작업 디렉터리로 제한됩니다. `isWindowsAbsolutePath`/`samePath` 단일 헬퍼로 경로를 정규화하고 `realpath` 해석 뒤 심볼릭 링크 탈출을 거부합니다. Windows에서는 루트에서 드라이브 목록을 제공하는 디렉터리 선택기를 사용합니다.
|
|
175
175
|
- **포크와 세션 내 브랜치**: 포크는 새 `.jsonl` 파일을 만듭니다. “여기서 편집”은 같은 세션 파일 안에 다른 브랜치를 만듭니다.
|
|
176
176
|
|
|
177
|
+
- **메시지 대기열**: 웹과 현재 Android 클라이언트는 서버 소유의 메모리 내 대기열을 공유합니다. Android에서는 **Session controls → Queue**를 직접 열며, 입력 중 Execution/Queue 막대가 자동으로 나타나지 않습니다. 전송 전 항목은 텍스트와 이미지를 입력창으로 회수하거나 삭제할 수 있고, 후속 메시지를 안전한 전송 시점을 따르는 조종 메시지로 승격할 수 있습니다. 전송 중 항목은 편집할 수 없습니다. 스냅샷에는 이미지 메타데이터만 포함되고 원본 바이트는 비공개로 보관되며 개수·바이트·메모리 제한이 적용됩니다. 15 MiB를 초과하는 Relay 회수는 변경 전에 거부하고 웹 사용을 안내합니다. 서버 프로세스 재시작 시 대기열은 보존되지 않으며, 기존 배포 클라이언트의 프롬프트 진입점은 호환됩니다.
|
|
178
|
+
- **세션 검색**: 메타데이터 또는 색인 기반 본문 모드를 선택하고, 시작일 포함·종료일 제외 필터와 읽기 전용 일치 문맥을 사용할 수 있습니다. 비공개 Node/SQLite 파생 색인은 표시되는 대화 텍스트를 대상으로 하며 자격 증명, 숨겨진 추론, 불투명 페이로드는 색인하지 않습니다. 검색은 기록을 수정하지 않습니다.
|
|
179
|
+
- **공급자 확인**: 구성 검증은 네트워크 테스트가 아닙니다. 실제 연결 테스트는 비용 발생 가능성에 대한 명시적 승인 후 고정 프롬프트와 최대 32 출력 토큰으로 공급자 요청을 한 번 이하 전송합니다. 직접 입력한 후보 자격 증명의 OpenAI Chat Completions·OpenAI Responses·Anthropic Messages API 형식만 지원하며 저장된 OAuth 자격 증명은 사용하지 않습니다.
|
|
180
|
+
|
|
177
181
|
## 개발
|
|
178
182
|
|
|
179
183
|
```bash
|
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./README.md) | [한국어](./README.ko.md) | [日本語](./README.ja.md) | [简体中文](./README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
> **Android APK (Android 12+)** — Use the Kotlin companion app to connect to a remote ompgui server, with a read-only offline snapshot of the latest session. [Download ompgui Remote v0.7.
|
|
5
|
+
> **Android APK (Android 12+)** — Use the Kotlin companion app to connect to a remote ompgui server, with a read-only offline snapshot of the latest session. [Download ompgui Remote v0.7.4](https://github.com/dbc-hbin/ompgui/releases/download/v0.7.4/ompgui-remote-v0.7.4.apk) · [Release notes](https://github.com/dbc-hbin/ompgui/releases/tag/v0.7.4)
|
|
6
6
|
|
|
7
|
-
> The Kotlin companion app in `android/` uses authenticated `/relay` WebSockets for session/history controls and linked messages, offline Mermaid diagrams and code highlighting
|
|
7
|
+
> The Kotlin companion app in `android/` uses authenticated `/relay` WebSockets for session/history controls and rich online transcripts with linked messages, tool calls/results/errors, and media references, plus offline Mermaid diagrams and code highlighting and inline image/PDF/audio/HTML/Markdown/DOCX previews. Online history is independent of the protected offline snapshot: bounded previews fetch full text through `sessions.content` and paginate media references, rather than truncating the transcript at 4,000 characters. Offline cache privacy restrictions remain unchanged. Visible-only file auto-refresh preserves unsaved edits; browsing supports allowed hidden files and archive search. Models/settings include the public models.dev catalog, advanced OMP settings, and actual per-session MCP runtime status shown separately from configuration. Attachments are streamed into staging rather than packed into one giant phone JSON payload: up to 10 images at 10 MiB each and, independently, 10 text attachments at 256 KiB each. OMP's own image normalization and provider-specific image-count limi…
|
|
8
8
|
>
|
|
9
|
-
> New in v0.7.0: Settings redesigned with tabbed categories and always-visible search (web-like parity), all Strings migrated to string resources (English/Korean/Japanese/Chinese complete), Usage sheet redesigned with capacity chips and color-coded progress bars, tighter session/message spacing
|
|
9
|
+
> New in v0.7.0: Settings redesigned with tabbed categories and always-visible search (web-like parity), all Strings migrated to string resources (English/Korean/Japanese/Chinese complete), Usage sheet redesigned with capacity chips and color-coded progress bars, and tighter session/message spacing.
|
|
10
10
|
>
|
|
11
11
|
> Its native interface follows the web app’s Warm and OMP palettes, with a compact project/session tree, a Settings/Usage footer, and a compact composer with a single-row toolbar. History, session information, commands, and runtime controls live in the session menu; secondary workspace actions remain in overflow menus. Runtime controls use expandable tree categories with aligned current values. Settings use compact row selectors, and dropdown menus are anchored to their triggers. Native Android controls, file pickers, sheet navigation, and distinct touch regions of at least 48 dp are retained.
|
|
12
12
|
>
|
|
@@ -176,6 +176,10 @@ ompgui is a Node-hosted Next.js app that drives your installed `omp` binary —
|
|
|
176
176
|
- **File access**: file browsing and preview are scoped to the selected project directory and working directories that appear in sessions; paths are canonicalized via a single `isWindowsAbsolutePath`/`samePath` helper and symlink escapes are rejected after `realpath` resolution. On Windows the directory picker offers a drive list at the root.
|
|
177
177
|
- **Forks vs in-session branches**: Fork creates a new `.jsonl` file. "Edit from here" creates another branch inside the same session file.
|
|
178
178
|
|
|
179
|
+
- **Queued messages**: web and current Android clients share a server-owned, in-memory queue. On Android, open **Session controls → Queue** explicitly; typing does not add an automatic Execution/Queue bar. Recall restores text and images, delete discards an eligible item, and promotion changes a follow-up to steering subject to safe dispatch. Sending items cannot be edited. Snapshots expose image metadata, not private image bytes; count, byte, and memory limits apply. Relay recalls over 15 MiB are refused before mutation and direct you to the web client. A server-process restart does not preserve pending items; older deployed clients retain compatible prompt entry points.
|
|
180
|
+
- **Session search**: choose metadata or indexed body search, with inclusive start/exclusive end dates and read-only match context. The private Node/SQLite index covers visible conversation text, not credentials, hidden reasoning, or opaque payloads; search does not modify history.
|
|
181
|
+
- **Provider checks**: configuration validation is not a network test. A real connectivity test requires explicit approval of possible cost, uses a fixed prompt with a 32-token output limit, and sends at most one provider request. It supports OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages API shapes with literal candidate credentials only—not stored OAuth credentials.
|
|
182
|
+
|
|
179
183
|
## Development
|
|
180
184
|
|
|
181
185
|
```bash
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./README.md) | [한국어](./README.ko.md) | [日本語](./README.ja.md) | [简体中文](./README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
> **Android APK(Android 12+)** — 使用 Kotlin 配套应用连接远程 ompgui 服务器,并查看最新会话的只读离线快照。[下载 ompgui Remote v0.7.
|
|
5
|
+
> **Android APK(Android 12+)** — 使用 Kotlin 配套应用连接远程 ompgui 服务器,并查看最新会话的只读离线快照。[下载 ompgui Remote v0.7.4](https://github.com/dbc-hbin/ompgui/releases/download/v0.7.4/ompgui-remote-v0.7.4.apk) · [发行说明](https://github.com/dbc-hbin/ompgui/releases/tag/v0.7.4)
|
|
6
6
|
|
|
7
7
|
> `android/` 中的实验性原生 Compose 客户端使用经过身份验证的 `/relay` WebSocket,提供会话/历史记录控制、带链接的消息、离线 Mermaid 图表与代码语法高亮,以及图片/PDF/音频/HTML/Markdown/DOCX 内联预览。文件仅在界面可见时自动刷新,并保留未保存的编辑;支持浏览允许访问的隐藏文件和搜索归档。模型与设置包括公开的 models.dev 目录、高级 OMP 设置,以及与配置状态分开显示的各会话实际 MCP 运行状态。附件通过流式传输暂存,而不是在手机端打包成一个巨大的 JSON:图片最多 10 个,每个 10 MiB;文本附件独立计数,最多 10 个,每个 256 KiB。OMP 自身的图像规范化处理和各提供商的图片数量限制仍然适用。
|
|
8
8
|
>
|
|
@@ -157,6 +157,9 @@ ompgui 是一个由 Node 托管的 Next.js 应用,驱动你已安装的 `omp`
|
|
|
157
157
|
- **文件访问**:文件浏览与预览仅限于所选项目目录以及会话中出现过的工作目录。
|
|
158
158
|
- **分叉与会话内分支**:分叉会创建新的 `.jsonl` 文件;“从此处编辑”则在同一会话文件内创建另一个分支。
|
|
159
159
|
|
|
160
|
+
- **待发送队列**:网页和当前 Android 客户端共用服务器内存队列。Android 通过 **Session controls → Queue** 主动打开,输入时不会自动出现 Execution/Queue 栏。发送前的条目可连同图片召回输入框、删除,或从后续消息提升为遵守安全发送时机的引导消息。图片原始字节私有保存,快照仅含元数据,并受容量限制。超过 15 MiB 的 Relay 召回在修改前被拒绝,并提示使用网页端。服务器进程重启不会保留队列。
|
|
161
|
+
- **搜索与连接检查**:可选择元数据或正文搜索。私有 Node/SQLite 派生索引仅处理可见对话文本,不索引凭据或隐藏载荷;日期范围包含起点、不包含终点,匹配上下文为只读,不修改历史。配置验证不发起网络请求。实际连接测试需明确批准潜在费用,使用固定提示词、最多 32 个输出 token,每次最多发送一个供应商请求。仅支持使用字面值候选凭据的 OpenAI Chat Completions / Responses 与 Anthropic Messages API,不使用已存储的 OAuth 凭据。
|
|
162
|
+
|
|
160
163
|
## 开发
|
|
161
164
|
|
|
162
165
|
```bash
|
package/bin/ompgui-update.js
CHANGED
|
@@ -18,18 +18,20 @@ async function checkReady({ hostname, port }) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
function normalizePath(value, platform) {
|
|
21
|
-
const
|
|
21
|
+
const paths = platform === "win32" ? path.win32 : path;
|
|
22
|
+
const normalized = paths.normalize(value);
|
|
22
23
|
return platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
function detectInstallMethod(packageDir, env = process.env, homeDir = os.homedir(), platform = process.platform) {
|
|
27
|
+
const paths = platform === "win32" ? path.win32 : path;
|
|
26
28
|
const normalized = normalizePath(packageDir, platform);
|
|
27
29
|
const bunRoots = [
|
|
28
|
-
env.BUN_INSTALL ?
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
].filter(Boolean).map((root) => normalizePath(root, platform));
|
|
32
|
-
return bunRoots.
|
|
30
|
+
env.BUN_INSTALL ? paths.join(env.BUN_INSTALL, "install", "global", "node_modules") : null,
|
|
31
|
+
paths.join(env.USERPROFILE || env.HOME || homeDir, ".bun", "install", "global", "node_modules"),
|
|
32
|
+
paths.join(homeDir, ".bun", "install", "global", "node_modules"),
|
|
33
|
+
].filter(Boolean).map((root) => normalizePath(paths.join(root, "ompgui"), platform));
|
|
34
|
+
return bunRoots.includes(normalized) ? "bun" : "npm";
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
function findNpmCli(nodePath = process.execPath, exists = fs.existsSync) {
|
|
@@ -54,6 +56,9 @@ function getInstallCommand(method, platform = process.platform, nodePath = proce
|
|
|
54
56
|
throw new Error("Cannot safely update this installation layout. Reinstall ompgui with npm or Bun first.");
|
|
55
57
|
}
|
|
56
58
|
if (method === "bun") {
|
|
59
|
+
if (packageDir && (paths.basename(paths.dirname(modules)) !== "global" || paths.basename(paths.resolve(modules, "../..")) !== "install")) {
|
|
60
|
+
throw new Error("Cannot safely update this Bun installation layout. Reinstall ompgui with Bun first.");
|
|
61
|
+
}
|
|
57
62
|
const target = packageDir ? ["--global-dir", paths.dirname(modules), "--global-bin-dir", platform === "win32" ? paths.join(paths.dirname(modules), ".bin") : paths.resolve(modules, "../../../bin")] : [];
|
|
58
63
|
return { command: platform === "win32" ? "bun.exe" : "bun", args: ["add", "--global", ...target, "ompgui@latest"] };
|
|
59
64
|
}
|
package/bin/ompgui.js
CHANGED
|
@@ -49,11 +49,15 @@ const { port, hostname, password, openBrowser } = options;
|
|
|
49
49
|
if (password) { process.env.OMPGUI_PASSWORD = password; process.env.OMP_WEB_PASSWORD = password; }
|
|
50
50
|
const loopback = new Set(["127.0.0.1","localhost","::1"]);
|
|
51
51
|
if (!loopback.has(hostname) && !(typeof password === "string" && password.length)) { console.error(`Refusing to listen on ${hostname} without OMPGUI_PASSWORD (or --password). Set a strong password or bind to 127.0.0.1.`); process.exit(1); }
|
|
52
|
-
if (!fs.existsSync(nextDir)) { console.error("Build artifacts not found. Please report this issue."); process.exit(1); }
|
|
53
52
|
const url = options.baseUrl;
|
|
54
53
|
function openBrowserWindow(target) { const cmd = process.platform === "win32" ? "cmd.exe" : process.platform === "darwin" ? "open" : process.platform === "linux" && (process.env.WSL_DISTRO_NAME || process.env.WSL_INTEROP) ? "wslview" : "xdg-open"; const args = process.platform === "win32" ? ["/c","start","",target] : [target]; try { const p=spawn(cmd,args,{stdio:"ignore",detached:true}); p.on("error",e=>console.warn(`Could not open browser automatically: ${e.message}`)); p.unref(); } catch(e) { console.warn(`Could not open browser automatically: ${e.message}`); } }
|
|
55
54
|
async function main() {
|
|
56
|
-
if (!await isPortAvailable(port, hostname)) {
|
|
55
|
+
if (!await isPortAvailable(port, hostname)) {
|
|
56
|
+
console.error(`Cannot start ompgui: port ${port} on ${hostname} is already in use. The listening process cannot be verified as ompgui. Stop it or choose another port with --port.`);
|
|
57
|
+
process.exitCode = 1;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (!fs.existsSync(nextDir)) { console.error("Build artifacts not found. Please report this issue."); process.exitCode = 1; return; }
|
|
57
61
|
const env={...process.env, OMPGUI_PACKAGE_DIR:pkgDir, OMPGUI_LAUNCHER_PID:String(process.pid), OMPGUI_PORT:port, OMPGUI_HOSTNAME:hostname, OMP_WEB_PACKAGE_DIR:pkgDir, OMP_WEB_LAUNCHER_PID:String(process.pid), OMP_WEB_PORT:port, OMP_WEB_HOSTNAME:hostname};
|
|
58
62
|
const child=spawn(process.execPath,[nextBin,"start","-p",port,"-H",hostname],{cwd:pkgDir,stdio:["inherit","pipe","inherit"],env}); wireChildProcessLifecycle(child);
|
|
59
63
|
let opened=false; const ready=()=>{if(!openBrowser||opened)return; opened=true; openBrowserWindow(url);}; child.stdout.on("data",c=>{process.stdout.write(c);if(/ready|started|local:\s*http|listening/i.test(c.toString()))ready();});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ompgui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Web UI & Browser GUI for the oh-my-pi (omp) coding agent",
|
|
5
5
|
"homepage": "https://github.com/dbc-hbin/ompgui#readme",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dev": "next dev -H 127.0.0.1 -p 30178",
|
|
46
46
|
"build": "next build --webpack",
|
|
47
47
|
"start": "next start -H 127.0.0.1 -p 30177",
|
|
48
|
-
"test": "node --experimental-strip-types --test lib/*.test.mjs lib/omp/*.test.mjs lib/relay/*.test.mjs components/*.test.mjs components/ui/*.test.mjs hooks/*.test.mjs bin/*.test.mjs",
|
|
48
|
+
"test": "node --experimental-strip-types --test lib/*.test.mjs lib/omp/*.test.mjs lib/relay/*.test.mjs lib/i18n/*.test.mjs components/*.test.mjs components/ui/*.test.mjs hooks/*.test.mjs bin/*.test.mjs",
|
|
49
49
|
"typecheck": "tsc --noEmit",
|
|
50
50
|
"lint": "eslint .",
|
|
51
51
|
"prepack": "npm run build",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
exports.id=6209,exports.ids=[6209],exports.modules={20565:(a,b,c)=>{"use strict";function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function e(a){return"string"==typeof a?a:void 0}function f(a){return"number"==typeof a&&Number.isFinite(a)?a:void 0}c.d(b,{i:()=>f,oJ:()=>e,u4:()=>d})},24923:(a,b,c)=>{"use strict";c.d(b,{IL:()=>t,KI:()=>n,P9:()=>p,l:()=>s,xw:()=>r});var d=c(79646),e=c(29021),f=c(33873),g=c(28354),h=c(25252),i=c(58864);let j=(0,g.promisify)(d.execFile);function k(a){try{return(0,e.realpathSync)(a)}catch{return a}}function l(){globalThis.__piProjectCache?.clear()}async function m(a,b){let{stdout:c}=await j("git",["-C",a,...b],{timeout:1e4,maxBuffer:1048576,env:{...process.env,LC_ALL:"C"}});return c.trim()}async function n(a){let b,c=(globalThis.__piProjectCache||(globalThis.__piProjectCache=new Map),globalThis.__piProjectCache),d=c.get(a);if(d&&d.expiresAt>Date.now())return d.info;try{if(!(0,e.existsSync)(a))return b=function(a){let b=(0,f.dirname)(a);if(!b.endsWith("-worktrees"))return null;let c=b.slice(0,-10);return c&&(0,e.existsSync)((0,f.join)(c,".git"))?{projectRoot:k(c),branch:(0,f.basename)(a),isWorktree:!0,isTopLevel:!0}:null}(a)??{projectRoot:a,branch:null,isWorktree:!1,isTopLevel:!1},c.set(a,{info:b,expiresAt:Date.now()+6e4}),b;let[d,g,h,j]=(await m(a,["rev-parse","--path-format=absolute","--git-common-dir","--git-dir","--show-toplevel","--abbrev-ref","HEAD"])).split("\n").map(a=>a.trim()),[l,n,o]=[d,g,h].map(i.gB),p=k(a),q=(0,i.Eb)(o,p),r=!(0,i.Eb)(n,l)&&q,s=r?(0,f.dirname)(l):o;b={projectRoot:q?k(s):k(a),branch:j&&"HEAD"!==j?j:null,isWorktree:r,isTopLevel:q}}catch{b={projectRoot:k(a),branch:null,isWorktree:!1,isTopLevel:!1}}return c.set(a,{info:b,expiresAt:Date.now()+6e4}),b}async function o(a){let b=await m(a,["rev-parse","--path-format=absolute","--git-common-dir"]);return k((0,f.dirname)((0,i.gB)(b)))}async function p(a){let b=await m(a,["worktree","list","--porcelain"]),c=[],d=null,g=()=>{if(d?.path){let a=(0,f.resolve)(d.path);!d.prunable&&(0,e.existsSync)(a)&&c.push({path:a,branch:d.branch??null,isMain:0===c.length})}d=null};for(let a of b.split("\n"))a.startsWith("worktree ")?(g(),d={path:(0,i.gB)(a.slice(9).trim())}):a.startsWith("branch ")&&d?d.branch=a.slice(7).trim().replace(/^refs\/heads\//,""):a.startsWith("prunable")&&d?d.prunable=!0:""===a.trim()&&g();return g(),c}function q(a,b){return a.find(a=>(0,i.Eb)(a.path,b))}function r(a,b){return q(a,k(b))?.path??null}async function s(a,b){let c=b.trim();if(!c)throw Error("Branch name is required");let d=c.replace(/[\/\\:*?"<>|\s]+/g,"-").replace(/^-+|-+$/g,"");if(!d)throw Error(`Invalid branch name: ${b}`);let g=await o(a),i=`${(0,f.resolve)(g)}-worktrees`,j=(0,f.join)(i,d);if((0,e.existsSync)(j))throw Error(`Directory already exists: ${j}`);(0,e.mkdirSync)(i,{recursive:!0});let k=!1;try{await m(g,["rev-parse","--verify","--quiet",`refs/heads/${c}`]),k=!0}catch{k=!1}try{k?await m(g,["worktree","add","--",j,c]):await m(g,["worktree","add","-b",c,"--",j])}catch(a){throw Error(u(a))}return(0,h.wz)(j),l(),{path:j,branch:c}}async function t(a,b,c=!1){let d=q(await p(a),b);if(!d)throw Error(`Not a worktree of this repository: ${b}`);if(d.isMain)throw Error("Cannot remove the main worktree");try{await m(a,["worktree","remove",...c?["--force"]:[],d.path])}catch(a){throw Error(u(a))}l()}function u(a){let b=a.stderr;return"string"==typeof b&&b.trim()?b.trim():a instanceof Error?a.message:String(a)}},25252:(a,b,c)=>{"use strict";function d(a){return a.replace(/\\/g,"/")}function e(){return globalThis.__piAdditionalAllowedRoots||(globalThis.__piAdditionalAllowedRoots=new Set),globalThis.__piAdditionalAllowedRoots}function f(a){if(!a)return;let b=d(a);e().add(b),globalThis.__piAllowedRootsCache?.roots.add(b)}c.d(b,{HM:()=>e,Nw:()=>d,wz:()=>f})},45902:(a,b,c)=>{"use strict";c.d(b,{$:()=>f});var d=c(76760),e=c.n(d);function f(a,b=process.platform){let c="win32"===b?e().win32.normalize(a):e().posix.normalize(a);return"win32"===b?c.toLowerCase():c}},57050:(a,b,c)=>{"use strict";c.d(b,{D$:()=>f,bA:()=>g,tw:()=>e});var d=c(20565);function e(a){if(!(0,d.u4)(a))return;let b=(0,d.u4)(a.cost)?a.cost:void 0;if(!b)return;let c=(0,d.i)(b.total);if(void 0!==c)return c;let e=(0,d.i)(b.input),f=(0,d.i)(b.output);if(void 0!==e&&void 0!==f)return e+f}function f(a,b){if(!(0,d.u4)(a))return;let c=(0,d.i)(a.attempt),e=(0,d.oJ)(a.errorMessage);if(void 0!==c&&void 0!==e)return{attempt:c,errorMessage:b?b(e):e}}function g(a,b){if(!(0,d.u4)(a))return;let c={};for(let e of["source","mode","status","error"]){let f=(0,d.oJ)(a[e]);void 0!==f&&(c[e]=b?b(f):f)}return Object.keys(c).length>0?c:void 0}},58864:(a,b,c)=>{"use strict";c.d(b,{Eb:()=>j,gB:()=>h,uK:()=>g,w:()=>i});var d=c(33873),e=c.n(d);let f=/^[a-zA-Z]:[\\/]/;function g(a){return f.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function h(a){return a&&"win32"===process.platform?(0,d.normalize)(a):a}function i(a,b=process.platform){if(!a)return a;let c="win32"===b?e().win32:e().posix,d="win32"===b?c.normalize(h(a)):a,f=c.normalize(d),g=c.parse(f).root.length,j=f.length;for(;j>g&&f[j-1]===c.sep;)j--;let k=f.slice(0,j);return"win32"===b?k.toLowerCase():k}function j(a,b){return a===b||!!a&&!!b&&i(a)===i(b)}},63945:(a,b,c)=>{"use strict";c.d(b,{Bm:()=>P,De:()=>S,Ee:()=>C,Fy:()=>D,G:()=>t,Hb:()=>F,I3:()=>N,I8:()=>v,L1:()=>M,O0:()=>X,U1:()=>n,Uk:()=>W,XS:()=>Y,a8:()=>R,kT:()=>H,lc:()=>G,mk:()=>L,ni:()=>A,nr:()=>p,qd:()=>z,sv:()=>Q,zW:()=>s});var d=c(55511),e=c(29021),f=c(33873),g=c(41204),h=c(77725),i=c(74075),j=c(20565),k=c(85887);let l=Reflect.get(e,"readdirSync");function m(a,b,c,d){return`${JSON.stringify(b?{type:"title",v:1,title:a,source:b,updatedAt:c,pad:d}:{type:"title",v:1,title:a,updatedAt:c,pad:d})}
|
|
2
|
-
`}function n(a){var b;let c;try{c=JSON.parse(a)}catch{return}if("object"!=typeof c||null===c)return;let d=c;if("title"!==d.type||1!==d.v||"string"!=typeof d.title||"string"!=typeof d.updatedAt||"string"!=typeof d.pad||void 0!==d.source&&"auto"!==(b=d.source)&&"user"!==b)return;let e={type:"title",v:1,title:d.title,updatedAt:d.updatedAt,pad:d.pad};return d.source&&(e.source=d.source),e}function o(a){let b=function(a,b,c){let d=[...a],e=0,f=d.length,g="";for(;e<=f;){let a=e+f>>>1,h=d.slice(0,a).join("");256>=Buffer.byteLength(m(h,b,c,""),"utf8")?(g=h,e=a+1):f=a-1}return g}(a.title??"",a.source,a.updatedAt),c=m(b,a.source,a.updatedAt,""),d=256-Buffer.byteLength(c,"utf8");if(d<0)throw Error("Session title slot metadata exceeds fixed slot size");let e=m(b,a.source,a.updatedAt," ".repeat(d));if(256!==Buffer.byteLength(e,"utf8"))throw Error("Session title slot serialization failed to produce fixed-width output");return e}function p(a){let b=[];for(let c of a.split("\n")){let a=c.trim();if(a)try{let c=JSON.parse(a);(0,j.u4)(c)&&b.push(c)}catch{}}return b}let q="blob:sha256:",r=/^[a-f0-9]{64}$/;function s(a){return a.startsWith(q)}function t(a){if(!a.startsWith(q))return null;let b=a.slice(q.length);return r.test(b)?b:null}function u(a){try{return(0,e.readFileSync)(f.join((0,k.yG)(),a))}catch{return null}}function v(a){try{return(0,e.statSync)(f.join((0,k.yG)(),a)).size}catch{return null}}function w(a){return(0,j.u4)(a)&&"image"===a.type&&"string"==typeof a.data}function x(a,b){if(Array.isArray(a)){for(let c of a)x(c,b);return}if((0,j.u4)(a)){if((0,j.u4)(a)&&"string"==typeof a.data&&(w(a)||"string"==typeof a.mimeType&&a.mimeType.toLowerCase().startsWith("image/"))&&s(a.data)&&("content"===b&&w(a)||"images"===b)){let b=t(a.data);if(!b)return;let c=u(b);c?a.data=c.toString("base64"):(a.type="text",a.text=`[image unavailable: blob ${b.slice(0,12)}… not found]`,delete a.data,delete a.mimeType,delete a.source);return}if("image_generation_call"===a.type&&"string"==typeof a.result&&s(a.result)){let b=t(a.result),c=b?u(b):null;c&&(a.result=c.toString("base64"))}if("string"==typeof a.image_url&&s(a.image_url)){let b=t(a.image_url),c=b?u(b):null;c&&(a.image_url=c.toString("utf8"))}for(let[b,c]of Object.entries(a))x(c,b)}}function y(a){if("string"==typeof a)return s(a);if(Array.isArray(a)){for(let b of a)if(y(b))return!0;return!1}if(!(0,j.u4)(a))return!1;for(let b in a)if(y(a[b]))return!0;return!1}function z(a,b={}){return a.map(a=>{if(b.skipToolResultImages&&"message"===a.type&&"toolResult"===a.message.role||!y(a))return a;let c=structuredClone(a);return x(c,void 0),c})}let A=0x40000000;function B(a,b){let c=(0,e.openSync)(a,"r");try{let a=Buffer.allocUnsafe(1048576),d=new g.StringDecoder("utf8"),f=[],h=!1;for(;;){let g=(0,e.readSync)(c,a,0,a.length,null);if(0===g)break;let i=d.write(a.subarray(0,g));if(h=h||i.includes("\n"),f.push(i),!h)continue;let j=f.join("");f.length=0,h=!1;let k=0,l=j.indexOf("\n",k);for(;-1!==l;){if(!1===b(j.slice(k,l)))return;k=l+1,l=j.indexOf("\n",k)}k<j.length&&f.push(j.slice(k))}let i=d.end();i&&f.push(i),f.length>0&&b(f.join(""))}finally{(0,e.closeSync)(c)}}function C(a,b){let c=!0,d=!1,e=!1,f=!1,g=null;try{B(a,a=>{let h;if(c&&(c=!1,n(a)))return;let i=a.trim();if(i){try{h=JSON.parse(i)}catch{return}if((0,j.u4)(h)){if(!d)return"session"!==h.type||"string"!=typeof h.id?(f=!0,!1):(d=!0,!(e="number"!=typeof h.version||h.version<3)&&void 0);if("session"!==h.type&&h.id===b)return g=h,!1}}})}catch{return null}return f||!d?null:e?D(a).entries.find(a=>a.id===b)??null:g}function D(a,b={}){let c,f,g;try{c=(0,e.statSync)(a).size}catch{return{header:null,entries:[],titleSlot:void 0}}if(c>A)return{header:null,entries:[],titleSlot:void 0,error:"too_large"};let h=[],i=!0;try{B(a,a=>{if(i&&(i=!1,f=n(a)))return;let b=a.trim();if(b)try{let a=JSON.parse(b);(0,j.u4)(a)&&h.push(a)}catch{}})}catch(b){let a=b instanceof RangeError;return{header:null,entries:[],titleSlot:f,...a?{error:"too_large"}:{}}}let k=h[0];if(!k||"session"!==k.type||"string"!=typeof k.id)return{header:null,entries:[],titleSlot:f};let l=h.slice(1).filter(a=>"session"!==a.type);return!((g=k.version??1)>=3)&&(g<2&&function(a,b){a.version=2;let c=new Set,e=null;for(let a of b)if(a.id=function(a){for(let b=0;b<100;b++){let b=(0,d.randomUUID)().slice(-8);if(!a.has(b))return b}return(0,d.randomUUID)()}(c),c.add(a.id),a.parentId=e,e=a.id,"compaction"===a.type&&"number"==typeof a.firstKeptEntryIndex){let c=a.firstKeptEntryIndex>=1?b[a.firstKeptEntryIndex-1]:void 0;c&&(a.firstKeptEntryId=c.id),delete a.firstKeptEntryIndex}}(k,l),g<3&&function(a,b){for(let c of(a.version=3,b))if("message"===c.type){let a=c.message;"hookMessage"===a.role&&(a.role="custom")}}(k,l)),f&&(f.title?(k.title=f.title,f.source?k.titleSource=f.source:delete k.titleSource):(delete k.title,delete k.titleSource)),b.resolveBlobs&&function(a,b={}){for(let c of a)(!b.skipToolResultImages||"message"!==c.type||"toolResult"!==c.message.role)&&y(c)&&x(c,void 0)}(l,{skipToolResultImages:b.skipToolResultImages}),{header:k,entries:l,titleSlot:f}}function E(a,b){let c,d,e=a.indexOf("\n");if(-1===e){if(Buffer.byteLength(a,"utf8")>=b)return null;e=a.length}let f=a.slice(0,e).trim();if(!f)return null;let g=n(f);if(g){let d=a.slice(e+1),f=d.indexOf("\n");if(-1===f&&Buffer.byteLength(d,"utf8")+e>=b)return null;c=(-1===f?d:d.slice(0,f)).trim()}else c=f;if(!c)return null;try{d=JSON.parse(c)}catch{return null}return(0,j.u4)(d)&&"session"===d.type?(g?.title?(d.title=g.title,g.source&&(d.titleSource=g.source)):g&&(delete d.title,delete d.titleSource),d):null}function F(a){let b,c;try{b=(0,e.openSync)(a,"r")}catch{return null}try{let a=Buffer.allocUnsafe(65792),d=(0,e.readSync)(b,a,0,a.length,0);c=a.subarray(0,d).toString("utf8")}finally{(0,e.closeSync)(b)}return E(c,65792)}function G(a){let b=new Map;for(let c of a)"label"===c.type&&(c.label?b.set(c.targetId,c.label):b.delete(c.targetId));let c=new Map,d=[];for(let d of a)c.set(d.id,{entry:d,children:[],label:b.get(d.id)});for(let b of a){let a=c.get(b.id);if(null===b.parentId||b.parentId===b.id){d.push(a);continue}let e=c.get(b.parentId);e?e.children.push(a):d.push(a)}let e=(a,b)=>new Date(a.entry.timestamp).getTime()-new Date(b.entry.timestamp).getTime(),f=[...d];for(;f.length>0;){let a=f.pop();a.children.sort(e),f.push(...a.children)}return d}function H(a){return a.length>0?a[a.length-1].id:null}function I(a){let b=a.endsWith("\\")?a.slice(0,-1):a;try{return JSON.parse(`"${b}"`)}catch{return b.replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}}function J(a,b,c=0){let d=a.indexOf(`"${b}"`,c);if(-1===d)return;let e=a.indexOf(":",d+b.length+2);if(-1===e)return;let f=e+1;for(;f<a.length;){let b=a.charCodeAt(f);if(32!==b&&9!==b&&10!==b&&13!==b)break;f++}if(34!==a.charCodeAt(f))return;let g=f+1,h=!1;for(let b=g;b<a.length;b++){let c=a.charCodeAt(b);if(h){h=!1;continue}if(92===c){h=!0;continue}if(34===c)return I(a.slice(g,b))}return I(a.slice(g))}function K(a){if(void 0!==a)return a.trim()?a:null}function L(a,b=!0){try{let c,[d,f,g,h]=function(a,b){let c=(0,e.statSync)(a),d=(0,e.openSync)(a,"r");try{let a=Math.min(4096,c.size),f=Buffer.allocUnsafe(a),g=a>0?(0,e.readSync)(d,f,0,a,0):0,h=f.subarray(0,g).toString("utf8"),i="";if(b>0&&c.size>0){let a=Math.min(b,c.size),f=Buffer.allocUnsafe(a),g=(0,e.readSync)(d,f,0,a,c.size-a);i=f.subarray(0,g).toString("utf8")}return[h,i,c.size,c.mtime]}finally{(0,e.closeSync)(d)}}(a,32768*!!b),i=p(d),k=function(a,b){let c,d=b[0],e=K(d?.type==="title"&&"string"==typeof d.title?d.title:void 0),f=function(a,b){if(a?.type==="session"&&"string"==typeof a.id)return{id:a.id,cwd:"string"==typeof a.cwd?a.cwd:void 0,title:null===b?void 0:b??("string"==typeof a.title?a.title:void 0),parentSession:"string"==typeof a.parentSession?a.parentSession:void 0,timestamp:"string"==typeof a.timestamp?a.timestamp:void 0}}(b[+(d?.type==="title")],e);if(f)return f;let g=!0;for(let b of a.split(/\r?\n/)){let a=b.trim();if(a){if(g&&"title"===J(a,"type")){c=K(J(a,"title")),g=!1;continue}return function(a,b){if("session"!==J(a,"type"))return;let c=J(a,"id");if(c)return{id:c,cwd:J(a,"cwd"),title:null===b?void 0:b??J(a,"title"),parentSession:J(a,"parentSession"),timestamp:J(a,"timestamp")}}(a,c)}}}(d,i);if(!k)return;let l=0,m="";for(let a=1;a<i.length;a++){let b=i[a];"compaction"===b.type&&"string"==typeof b.shortSummary&&(c=b.shortSummary),"message"===b.type&&b.message&&(l++,"user"!==b.message.role||m||(m=function(a){if("string"==typeof a)return a;if(!Array.isArray(a))return"";let b=[];for(let c of a)(0,j.u4)(c)&&"text"===c.type&&"string"==typeof c.text&&b.push(c.text);return b.join(" ")}(b.message.content)))}m||=function(a){let b,c=a.indexOf('"role"');for(;-1!==c;){let d=J(a,"role",c),e=J(a,"content",c)??J(a,"text",c);if(e){if("user"===d)return e;b||"developer"!==d&&"assistant"!==d||(b=e)}c=a.indexOf('"role"',c+6)}return b}(d)??"";let n=Math.max(l,function(a){let b=0,c=0;for(;c<a.length;){let d=a.indexOf('"type"',c);if(-1===d)break;let e=a.indexOf(":",d+6);if(-1===e)break;"message"===J(a,"type",d)&&b++,c=e+1}return b}(d));return{path:a,id:k.id,cwd:k.cwd??"",title:k.title??c,parentSessionPath:k.parentSession,created:new Date(k.timestamp??""),modified:h,messageCount:n,size:g,firstMessage:m||"(no messages)",status:b?function(a){if(!a)return"unknown";let b=a.split("\n");for(let a=b.length-1;a>=0;a--){let c,d=b[a];if(123===d.charCodeAt(0)){try{c=JSON.parse(d)}catch{continue}if("message"===c.type&&c.message)return function(a){switch(a.role){case"assistant":{switch(a.stopReason){case"error":return"error";case"aborted":return"aborted";case"length":return"interrupted"}let b=a.content;if(Array.isArray(b)&&b.some(a=>(0,j.u4)(a)&&"toolCall"===a.type))return"interrupted";return"complete"}case"toolResult":return"interrupted";case"user":return"pending";default:return"unknown"}}(c.message)}}return"unknown"}(f):void 0}}catch{return}}async function M(){let a=(0,k.tE)(),b=await O(a),c=[];for(let a of b){let b=function(a){let b;try{b=(0,e.statSync)(a)}catch{return}let c=(globalThis.__ompSessionScanCache||(globalThis.__ompSessionScanCache=new Map),globalThis.__ompSessionScanCache),d=c.get(a);if(d&&d.size===b.size&&d.mtimeMs===b.mtimeMs)return c.delete(a),c.set(a,d),d.info;d&&c.delete(a);let f=L(a,!1);if(f)for(c.set(a,{size:b.size,mtimeMs:b.mtimeMs,info:f});c.size>2048;){let a=c.keys().next().value;if(void 0===a)break;c.delete(a)}return f}(a);b&&c.push(b)}return c.sort((a,b)=>b.modified.getTime()-a.modified.getTime()),c}function N(){globalThis.__ompSessionFileListCache?.clear()}async function O(a){let b;try{b=(0,e.statSync)(a)}catch{return[]}globalThis.__ompSessionFileListCache||(globalThis.__ompSessionFileListCache=new Map);let c=globalThis.__ompSessionFileListCache,d=c.get(a);if(d&&d.rootMtimeMs===b.mtimeMs){let b=!1;try{for(let c of l(a,{withFileTypes:!0})){if(!c.isDirectory())continue;let g=f.join(a,c.name);if((0,e.statSync)(g).mtimeMs>d.subMaxMtimeMs){b=!0;break}}}catch{b=!0}if(!b)return d.files}let g=function(a){let b=[];try{for(let c of l(a,{withFileTypes:!0})){let d;if(!c.isDirectory())continue;let e=f.join(a,c.name);try{d=l(e,{withFileTypes:!0})}catch{continue}for(let a of d)a.isFile()&&a.name.endsWith(".jsonl")&&b.push(f.join(e,a.name))}}catch{return[]}return b}(a),h=0;try{for(let b of l(a,{withFileTypes:!0}))b.isDirectory()&&(h=Math.max(h,(0,e.statSync)(f.join(a,b.name)).mtimeMs))}catch{}return c.set(a,{rootMtimeMs:b.mtimeMs,subMaxMtimeMs:h,files:g}),g}function P(a,b,c){let d,f,g=b.replace(/[\u0000-\u001f\u007f-\u009f]/g," ").replace(/ +/g," ").trim();if(!g)return!1;let h={title:g,source:c,updatedAt:new Date().toISOString()};if(function(a){let b;try{b=(0,e.openSync)(a,"r")}catch{return}try{let a=Buffer.allocUnsafe(256),c=(0,e.readSync)(b,a,0,a.length,0),d=a.subarray(0,c).toString("utf8"),f=d.indexOf("\n");if(f<0)return;return n(d.slice(0,f))}finally{(0,e.closeSync)(b)}}(a)){let b=Buffer.from(o(h),"utf8"),c=(0,e.openSync)(a,"r+");try{let a=0;for(;a<b.length;){let d=(0,e.writeSync)(c,b,a,b.length-a,a);if(0===d)throw Error("Short write while updating session title slot");a+=d}}finally{(0,e.closeSync)(c)}return!0}try{d=(0,e.statSync)(a).size}catch{return!1}if(d>A)return!1;let i=(0,e.readFileSync)(a,"utf8").split("\n"),j=i.findIndex(a=>a.trim().length>0);if(-1===j)throw Error("Cannot rename an empty session file");try{f=JSON.parse(i[j])}catch{throw Error("Cannot rename a session file with a malformed header")}if("session"!==f.type)throw Error("Not a session file");return f.title=g,f.titleSource=c,i[j]=JSON.stringify(f),Q(a,o(h)+i.join("\n"),"title"),!0}function Q(a,b,c="rewrite"){let d=f.dirname(a),g=(0,e.mkdtempSync)(f.join(d,`.ompgui-${c}-`)),h=f.join(g,f.basename(a));try{(0,e.writeFileSync)(h,b,"utf8"),(0,e.renameSync)(h,a)}finally{try{(0,e.rmdirSync)(g)}catch{(0,e.rmSync)(g,{recursive:!0,force:!0})}}}function R(a,b={}){let c=f.resolve(b.sessionsRoot??(0,k.tE)()),d=f.resolve(a),g=f.relative(c,d);if(!g||g.startsWith(".."+f.sep)||f.isAbsolute(g)||!g.endsWith(".jsonl"))throw Error("Session path is outside the active OMP sessions directory");if(!(0,e.lstatSync)(d).isFile())throw Error("Session path is not a regular file");let h=f.resolve(b.archiveRoot??(0,k.ny)()),j=f.join(h,`${g}.gz`),l=j.slice(0,-3);if((0,e.existsSync)(j)||(0,e.existsSync)(l))throw Error("Archived session destination already exists");let m=d.slice(0,-6),n=j.slice(0,-3);(0,e.mkdirSync)(f.dirname(j),{recursive:!0});let o=(0,e.mkdtempSync)(f.join(f.dirname(j),".ompgui-archive-")),p=f.join(o,f.basename(j)),q=f.join(o,f.basename(d)),r=!1,s=!1,t=!1;try{if((0,e.writeFileSync)(p,(0,i.gzipSync)((0,e.readFileSync)(d),{level:9})),(0,e.renameSync)(p,j),r=!0,(0,e.unlinkSync)(d),s=!0,(0,e.existsSync)(m)){if((0,e.existsSync)(n))throw Error("Archived session artifacts destination already exists");(0,e.mkdirSync)(f.dirname(n),{recursive:!0}),(0,e.renameSync)(m,n),t=!0}return j}catch(b){if(t)try{(0,e.renameSync)(n,m)}catch{}let a=!0;if(s&&r){a=!1;try{(0,e.writeFileSync)(q,(0,i.gunzipSync)((0,e.readFileSync)(j))),(0,e.mkdirSync)(f.dirname(d),{recursive:!0}),(0,e.renameSync)(q,d),a=!0}catch{}}if(r&&a)try{(0,e.unlinkSync)(j)}catch{}throw b}finally{try{(0,e.rmSync)(o,{recursive:!0,force:!0})}catch{}}}class S extends Error{constructor(a,b){super(b),this.name="SessionArchiveError",this.code=a}}function T(a){try{return(0,e.lstatSync)(a),!0}catch{return!1}}function U(a,b){let c=f.relative(a,b),d=a;for(let a of c.split(f.sep))if(a){d=f.join(d,a);try{if((0,e.lstatSync)(d).isSymbolicLink())throw new S("invalid_key","Archive path contains a symbolic-link escape")}catch(a){if(a instanceof S)throw a;break}}}async function V(a,b){return new Promise((c,d)=>{let f=(0,e.createReadStream)(a),g=(0,i.createGunzip)(),h=[],j=0,k=!1,l=a=>{k||(k=!0,f.destroy(),g.destroy(),d(a))},m=()=>{k||(k=!0,f.destroy(),g.destroy(),c(Buffer.concat(h,j)))};f.on("error",l),g.on("error",l),g.on("data",a=>{if(k)return;let c=b-j;if(c<=0)return void m();let d=a.subarray(0,c);h.push(d),(j+=d.length)>=b&&m()}),g.on("end",m),f.pipe(g)})}async function W(a={}){let b=f.resolve(a.archiveRoot??(0,k.ny)()),c=function(a){let b,c=[];try{b=l(a,{withFileTypes:!0})}catch{return c}for(let d of b){let b;if(c.length>=500)break;let e=f.join(a,d.name);if(d.isFile()&&d.name.endsWith(".jsonl.gz")){c.push(e);continue}if(d.isDirectory()){try{b=l(e,{withFileTypes:!0})}catch{continue}for(let a of b){if(c.length>=500)break;a.isFile()&&a.name.endsWith(".jsonl.gz")&&c.push(f.join(e,a.name))}}}return c}(b);return(await Promise.all(c.map(async a=>{let c;try{if(!(0,e.lstatSync)(a).isFile())return;c=(0,e.statSync)(a);let d=await V(a,65792),g=E(d.toString("utf8"),65792);if(!g||"string"!=typeof g.id||0===g.id.length)return;let h=f.relative(b,a),i=a.slice(0,-3);return{key:h.split(f.sep).join("/"),id:g.id,..."string"==typeof g.title&&g.title?{name:g.title}:{},..."string"==typeof g.cwd&&g.cwd?{cwd:g.cwd}:{},created:function(a,b){if("string"==typeof a){let b=new Date(a);if(!Number.isNaN(b.getTime()))return b.toISOString()}return b.toISOString()}(g.timestamp,c.mtime),modified:c.mtime.toISOString(),size:c.size,hasArtifacts:T(i)&&(0,e.lstatSync)(i).isDirectory()}}catch{return}}))).filter(a=>!!a).sort((a,b)=>b.modified.localeCompare(a.modified))}async function X(a,b={}){let c,d=f.resolve(b.archiveRoot??(0,k.ny)()),g=f.resolve(b.sessionsRoot??(0,k.tE)()),j=function(a,b){if("string"!=typeof a||0===a.length||a.length>1024||a.includes("\\")||a.includes("\0")||a.startsWith("/")||f.isAbsolute(a)||f.win32.isAbsolute(a)||/^[A-Za-z]:/.test(a)||!a.endsWith(".jsonl.gz"))throw new S("invalid_key","Invalid archived session key");let c=a.split("/");if(c.some(a=>0===a.length||"."===a||".."===a))throw new S("invalid_key","Invalid archived session key");let d=f.resolve(b,...c),e=f.relative(b,d);if(!e||e.startsWith(".."+f.sep)||f.isAbsolute(e))throw new S("invalid_key","Invalid archived session key");return U(b,d),d}(a,d);try{c=(0,e.lstatSync)(j)}catch{throw new S("not_found","Archived session was not found")}if(!c.isFile())throw new S("not_found","Archived session was not found");let l=f.relative(d,j).slice(0,-3),m=f.resolve(g,l);U(g,m);let n=j.slice(0,-3),o=m.slice(0,-6);if(T(m)||T(o))throw new S("destination_conflict","Active session destination already exists");if(T(n)&&!(0,e.lstatSync)(n).isDirectory())throw new S("invalid_archive","Archived session artifacts are not a directory");(0,e.mkdirSync)(f.dirname(m),{recursive:!0});let p=(0,e.mkdtempSync)(f.join(f.dirname(m),".ompgui-restore-")),q=f.join(p,f.basename(m)),r=!1,s=!1,t=null;try{if(await (0,h.pipeline)((0,e.createReadStream)(j),(0,i.createGunzip)(),(0,e.createWriteStream)(q,{flags:"wx"})),!(t=F(q))||"string"!=typeof t.id||0===t.id.length)throw new S("invalid_session_header","Restored archive has an invalid session header");if((0,e.renameSync)(q,m),r=!0,T(n)){if(T(o))throw new S("destination_conflict","Active session artifacts destination already exists");(0,e.renameSync)(n,o),s=!0}return(0,e.unlinkSync)(j),{path:m,id:t.id,header:t}}catch(a){if(s)try{(0,e.renameSync)(o,n)}catch{}if(r)try{(0,e.unlinkSync)(m)}catch{}if(a instanceof S)throw a;throw new S("restore_failed",a instanceof Error?a.message:String(a))}finally{try{(0,e.rmSync)(p,{recursive:!0,force:!0})}catch{}}}function Y(a){if((0,e.unlinkSync)(a),!a.endsWith(".jsonl"))return;let b=a.slice(0,-6);try{(0,e.rmSync)(b,{recursive:!0,force:!0})}catch{}}},74244:(a,b,c)=>{"use strict";c.d(b,{z:()=>e});var d=c(58864);function e(a,b=process.platform){return(0,d.w)(a,b)}},78335:()=>{},78573:(a,b,c)=>{"use strict";c.d(b,{Uv:()=>H,O8:()=>w,HA:()=>N,cr:()=>C,DK:()=>D,td:()=>E,mD:()=>q,BR:()=>x,dQ:()=>o,eP:()=>y,UB:()=>v,u1:()=>u,os:()=>t});var d=c(55511),e=c(29021),f=c(33873);c(85887);var g=c(63945),h=c(78970),i=c(20565),j=c(57050),k=c(45902),l=c(24923),m=c(74244);async function n(){let a=await (0,g.L1)(),b=new Map,c=new Set;for(let d of a)b.set((0,k.$)(d.path),d.id),c.add(d.id);let d=[...new Set(a.map(a=>a.cwd).filter(Boolean))],e=new Map;for(let a=0;a<d.length;a+=6){let b=d.slice(a,a+6);await Promise.all(b.map(async a=>{e.set(a,await (0,l.KI)(a))}))}return a.map(a=>{var d;let f;w(a.id,a.path);let g=a.cwd?e.get(a.cwd):void 0;return{path:a.path,id:a.id,cwd:a.cwd,name:a.title,created:a.created instanceof Date&&!Number.isNaN(a.created.getTime())?a.created.toISOString():a.modified.toISOString(),modified:a.modified.toISOString(),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?(d=a.parentSessionPath,(f=b.get((0,k.$)(d)))||(c.has(d)?d:void 0)):void 0,projectRoot:g?.projectRoot??a.cwd,projectKey:(0,m.z)(g?.projectRoot??a.cwd),...g?.isWorktree&&g.branch?{worktreeBranch:g.branch}:{}}})}async function o(){let a=globalThis.__piSessionListGeneration??0;if(globalThis.__piSessionListCache&&Date.now()-globalThis.__piSessionListCache.ts<p)return globalThis.__piSessionListCache.data;if(globalThis.__piSessionListPromise&&globalThis.__piSessionListPromiseGeneration===a)return globalThis.__piSessionListPromise;let b=n().then(b=>((globalThis.__piSessionListGeneration??0)===a&&(globalThis.__piSessionListCache={data:b,ts:Date.now()}),b)).finally(()=>{globalThis.__piSessionListPromise===b&&(globalThis.__piSessionListPromise=void 0,globalThis.__piSessionListPromiseGeneration=void 0)});return globalThis.__piSessionListPromise=b,globalThis.__piSessionListPromiseGeneration=a,b}let p=3e4;function q(){globalThis.__piSessionListGeneration=(globalThis.__piSessionListGeneration??0)+1,globalThis.__piSessionListCache=void 0,(0,g.I3)(),globalThis.__ompSessionDocumentCache?.clear()}function r(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}function s(){return globalThis.__piPathToSessionIdCache||(globalThis.__piPathToSessionIdCache=new Map),globalThis.__piPathToSessionIdCache}async function t(a){let b=r().get(a);if(b){if((0,e.existsSync)(b))return b;x(a),q()}await o();let c=r().get(a);return c?(0,e.existsSync)(c)?c:(x(a),null):null}async function u(a){let b=(0,k.$)(a),c=s().get(b);return c||(await o(),s().get(b))}async function v(a){if(!a)return;let b=await u(a);return b||(await t(a)?a:void 0)}function w(a,b){let c=(0,f.normalize)(b),d=(0,k.$)(c),e=r(),g=s(),h=e.get(a),i=h?(0,k.$)(h):void 0,j=g.get(d),l=j?e.get(j):void 0;i&&i!==d&&g.get(i)===a&&g.delete(i),j&&j!==a&&l&&(0,k.$)(l)===d&&e.delete(j),e.set(a,c),g.set(d,a)}function x(a){let b=r(),c=s(),d=b.get(a);b.delete(a);let e=d?(0,k.$)(d):void 0;e&&c.get(e)===a&&c.delete(e)}function y(a){return(0,g.Hb)(a)}function z(a){try{let b=(0,e.statSync)(a);return{dev:b.dev,ino:b.ino,size:b.size,mtimeMs:b.mtimeMs,ctimeMs:b.ctimeMs}}catch{return null}}function A(a,b){return a.dev===b.dev&&a.ino===b.ino&&a.size===b.size&&a.mtimeMs===b.mtimeMs&&a.ctimeMs===b.ctimeMs}function B(a){let b=[a];for(;b.length>0;){let a=b.pop();if(!(!a||Object.isFrozen(a))){for(let c of Object.values(a))"object"!=typeof c||null===c||Object.isFrozen(c)||b.push(c);Object.freeze(a)}}return a}function C(a){let b;try{b=e.realpathSync.native(a)}catch{return B((0,g.Fy)(a))}let c=z(b);if(!c)return B((0,g.Fy)(b));let d=(globalThis.__ompSessionDocumentCache||(globalThis.__ompSessionDocumentCache=new Map),globalThis.__ompSessionDocumentCache),f=d.get(b);if(f&&A(f.identity,c))return d.delete(b),d.set(b,f),f.document;let h=B((0,g.Fy)(b)),i=z(b);if(i&&A(c,i)&&i.size<=0x4000000){d.set(b,{identity:i,sourceBytes:i.size,document:h});let a=0;for(let b of d.values())a+=b.sourceBytes;for(;d.size>32||a>0x4000000;){let b=d.keys().next().value;if(void 0===b)break;let c=d.get(b);d.delete(b),a-=c?.sourceBytes??0}}return h}function D(a){return C(a).entries}function E(a,b){let c=(0,g.Ee)(a,b);if(!c||"message"!==c.type||!(0,i.u4)(c.message))return null;let e=c.message;if("toolResult"!==e.role)return null;let f="content"in e?e.content:void 0,j="details"in e?e.details:void 0,k=function(a,b){let c=new Set,e=[],f=!1,i=(a,b)=>{f=!0;let g=(0,h.Si)(a),i=null===g?null:(0,d.createHash)("sha256").update(a,"base64").digest("hex"),j=null===i?`inline:${b}\0${a}`:`image:${b}\0${i}`;c.has(j)||(c.add(j),e.push(g??(0,h.x)(a)))},j=(a,b)=>{f=!0;let d=`image:${b}\0${a}`;c.has(d)||(c.add(d),e.push((0,g.I8)(a)??0))},k=(a,b)=>{if("object"!=typeof a||null===a||Array.isArray(a)||b&&"image"!==a.type)return;let c=a.source;if("object"==typeof c&&null!==c&&!Array.isArray(c)&&"base64"===c.type&&"string"==typeof c.data){let a="string"==typeof c.media_type?c.media_type:"";if(!a.toLowerCase().startsWith("image/"))return;let b=c.data;if("string"!=typeof b)return;if((0,g.zW)(b)){let c=(0,g.G)(b);c&&j(c,a);return}i(b,a);return}if("string"==typeof a.data&&"string"==typeof a.mimeType){if(!a.mimeType.toLowerCase().startsWith("image/"))return;if((0,g.zW)(a.data)){let b=(0,g.G)(a.data);b&&j(b,a.mimeType);return}i(a.data,a.mimeType)}};try{if(Array.isArray(a))for(let b of a)k(b,!0);if("object"==typeof b&&null!==b&&!Array.isArray(b)){let a=b.images;if(Array.isArray(a))for(let b of a)k(b,!1)}}catch{}return f?e:null}(f,j);if(!k)return null;(0,h.gy)(k);let l=Array.isArray(f)?f.filter(a=>(0,i.u4)(a)&&"image"===a.type):[],m={type:"message",id:c.id,parentId:c.parentId,timestamp:c.timestamp,message:{role:"toolResult",toolCallId:"media",content:l,details:(0,i.u4)(j)&&Array.isArray(j.images)?{images:j.images}:void 0}},n=(0,g.qd)([m])[0],o=n?.type==="message"&&(0,i.u4)(n.message)?n.message:null;if(!o||"toolResult"!==o.role)return null;let p=(0,h.K8)({content:"content"in o?o.content:void 0,details:"details"in o?o.details:void 0}),q=Math.max(0,k.length-p.length);return p.length>0||q>0?{images:p,missingCount:q}:null}function F(a){if("message"!==a.type||!(0,i.u4)(a.message)||"string"!=typeof a.message.role)return null;let b=a.message;return"assistant"!==b.role||(void 0===b.provider||"string"==typeof b.provider)&&(void 0===b.model||"string"==typeof b.model)&&("string"==typeof b.content||Array.isArray(b.content))?b:null}function G(a){if(!Array.isArray(a))return null;let b=new Set(["pending","in_progress","completed","blocked","abandoned"]),c=[];for(let d of a){if(!(0,i.u4)(d)||"string"!=typeof d.name||!Array.isArray(d.tasks))return null;let a=[];for(let c of d.tasks){if(!(0,i.u4)(c)||"string"!=typeof c.content||"string"!=typeof c.status||!b.has(c.status)||void 0!==c.blocker&&"string"!=typeof c.blocker)return null;a.push({content:c.content,status:c.status,..."string"==typeof c.blocker?{blocker:c.blocker}:{}})}c.push({name:d.name,tasks:a})}return c}function H(a,b,c={}){let d,e={messages:[],entryIds:[],thinkingLevel:"off",model:null,todoPhases:[]},f=new Map;for(let b of a)f.set(b.id,b);if(null===b||(b&&(d=f.get(b)),d||(d=a[a.length-1]),!d))return e;let g=[],h=new Set,j=d;for(;j&&!h.has(j.id);)h.add(j.id),g.push(j),j=j.parentId?f.get(j.parentId):void 0;g.reverse();let k="off",l={},m=!1,n=null;for(let a of g)if("thinking_level_change"===a.type)k=a.configured??a.thinkingLevel??"off";else if("model_change"===a.type)if(a.model){let b=a.role??"default";l[b]=a.model,"default"===b&&(m=!0)}else a.provider&&a.modelId&&(l.default=`${a.provider}/${a.modelId}`,m=!0);else if("message"===a.type){let b=F(a);b?.role==="assistant"&&!m&&"string"==typeof b.provider&&b.provider.length>0&&"string"==typeof b.model&&b.model.length>0&&(l.default=`${b.provider}/${b.model}`)}else"compaction"===a.type&&(n=a);let o=[],p=[],q=a=>{var b;let d="compaction"===a.type?(b=a,{role:"custom",customType:"compaction",content:a.id===n?.id?b.summary:"[Superseded compaction summary elided after a newer compaction]",display:!0,details:{tokensBefore:b.tokensBefore,firstKeptEntryId:b.firstKeptEntryId},timestamp:I(b.timestamp)}):N(a,c);d&&(o.push(d),p.push(a.id))};if(n){let a=n;q(a);let b=g.findIndex(b=>"compaction"===b.type&&b.id===a.id),c=!1;for(let d=0;d<b;d++){let b=g[d];b.id===a.firstKeptEntryId&&(c=!0),c&&q(b)}for(let a=b+1;a<g.length;a++)q(g[a])}else for(let a of g)q(a);let r=null,s=l.default;if(s){let a=s.indexOf("/");r=a>0?{provider:s.slice(0,a),modelId:s.slice(a+1)}:{provider:"",modelId:s}}return{messages:o,entryIds:p,thinkingLevel:k,model:r,todoPhases:function(a,b){if(null===b||0===a.length)return[];let c=new Map(a.map(a=>[a.id,a])),d=b?c.get(b):a[a.length-1],e=new Set;for(;d&&!e.has(d.id);){let a=d;if(e.add(a.id),d=a.parentId?c.get(a.parentId):void 0,"custom"===a.type&&"user_todo_edit"===a.customType){let b=(0,i.u4)(a.data)?G(a.data.phases):null;if(b)return b}let b=F(a);if(b?.role==="toolResult"){if("todo"!==b.toolName||b.isError)continue;let a=(0,i.u4)(b.details)?G(b.details.phases):null;if(a)return a}}return[]}(a,b)}}function I(a){let b=Date.parse(a);return Number.isNaN(b)?void 0:b}function J(a){return a.length<=240?a:`${[...a].slice(0,240).join("")}…`}let K=["index","id","agent","agentSource","status","task","assignment","lastIntent","toolCount","requests","tokens","contextTokens","contextWindow","cost","durationMs","modelRole","resolvedModel","resolvedModelIsFallback","retryFailure"],L=["index","id","agent","agentSource","status","task","assignment","exitCode","truncated","structuredOutput","durationMs","tokens","requests","contextTokens","contextWindow","modelRole","resolvedModel","resolvedModelIsFallback","error","aborted","abortReason","outputPath","patchPath","branchName","retryFailure"];function M(a,b=!1){if("toolResult"!==a.role||void 0===a.details)return a;let{details:c,...d}=a;if((0,i.u4)(c)){let d=b?(0,h.K8)({content:[],details:c}):[],e={};if("string"==typeof c.patch&&(e.patch=c.patch),"string"==typeof c.diff&&(e.diff=c.diff),"task"===a.toolName){let a=function(a){let b={},c=Array.isArray(a.results)?a.results:[],d=Array.isArray(a.progress)?a.progress:[];if(0===c.length&&0===d.length&&!(0,i.u4)(a.async))return null;if("number"==typeof a.totalDurationMs&&(b.totalDurationMs=a.totalDurationMs),(0,i.u4)(a.async)){let c=function(a){if(!(0,i.u4)(a))return;let b={};for(let c of["state","jobId","type"])"string"==typeof a[c]&&(b[c]=J(a[c]));return Object.keys(b).length>0?b:void 0}(a.async);c&&(b.async=c)}let e=(a,b)=>{if(!(0,i.u4)(a))return null;let c={};for(let d of b)void 0!==a[d]&&(c[d]=a[d]);for(let a of["task","assignment","error","abortReason","lastIntent","agent","modelRole","resolvedModel","outputPath","patchPath","branchName"])"string"==typeof c[a]&&(c[a]=J(c[a]));if("number"!=typeof c.cost){let b=(0,j.tw)(a.usage);void 0!==b&&(c.cost=b)}if(void 0!==a.retryFailure){let b=(0,j.D$)(a.retryFailure,J);b?c.retryFailure=b:delete c.retryFailure}if(void 0!==a.structuredOutput){let b=(0,j.bA)(a.structuredOutput,J);b?c.structuredOutput=b:delete c.structuredOutput}return c};return d.length>0&&(b.progress=d.slice(0,50).map(a=>e(a,K)).filter(a=>null!==a)),c.length>0&&(b.results=c.slice(0,50).map(a=>e(a,L)).filter(a=>null!==a)),Object.keys(b).length>0?b:null}(c);a&&Object.assign(e,a)}let f=a;if(d.length>0&&Array.isArray(a.content)&&(f=function(a,b){if(!Array.isArray(a.content))return a;let c=new Set;for(let b of a.content){if(!(0,i.u4)(b)||"image"!==b.type)continue;let a=(0,h.K8)({content:[b],details:{}})[0];a&&"string"==typeof a.data&&"string"==typeof a.mimeType&&c.add(`${a.mimeType}\0${a.data}`)}let d=b.filter(a=>{if("string"!=typeof a.data||"string"!=typeof a.mimeType)return!1;let b=`${a.mimeType}\0${a.data}`;return!c.has(b)&&(c.add(b),!0)});return 0===d.length?a:{...a,content:[...a.content,...d]}}(a,d)),Object.keys(e).length>0)return{...f,details:e};let{details:g,...k}=f;return k}return d}function N(a,b){switch(a.type){case"message":{let c=F(a);if(!c)return null;if("developer"===c.role)return{role:"custom",customType:"developer",content:c.content,display:!0,timestamp:c.timestamp};if("pythonExecution"===c.role){let a=c.output?`
|
|
3
|
-
\`\`\`
|
|
4
|
-
${c.output}
|
|
5
|
-
\`\`\``:"\n(no output)",b=c.cancelled?"\n(execution cancelled)":c.exitCode?`
|
|
6
|
-
Execution failed with code ${c.exitCode}`:"";return{role:"custom",customType:"python-execution",content:`Ran Python:
|
|
7
|
-
\`\`\`python
|
|
8
|
-
${c.code}
|
|
9
|
-
\`\`\`${a}${b}`,display:!0,timestamp:c.timestamp}}if("fileMention"===c.role){let a=Array.isArray(c.files)?c.files.filter(a=>!!a&&"object"==typeof a&&"string"==typeof a.path):[];return{role:"custom",customType:"file-mention",content:`Attached file${1===a.length?"":"s"}:
|
|
10
|
-
${a.map(a=>`- ${a.path}`).join("\n")}`,display:!0,timestamp:c.timestamp}}if("toolResult"===c.role){let d=!0===b.deferToolResultImages,e=(0,i.u4)(c.details)?c.details:void 0,f=(0,h.K8)({content:c.content,details:e}).length;if(d){let b=M(function(a){if("toolResult"!==a.role||!Array.isArray(a.content))return a;let b=0,c=0,d=new Set,e=a.content.filter(a=>{let e=function(a){let b,c;if(!(0,i.u4)(a)||"image"!==a.type||("string"==typeof a.data?(b=a.data,c="string"==typeof a.mimeType?a.mimeType:void 0):(0,i.u4)(a.source)&&"base64"===a.source.type&&"string"==typeof a.source.data&&(b=a.source.data,c="string"==typeof a.source.media_type?a.source.media_type:void 0),!b))return null;let d=b.endsWith("==")?2:+!!b.endsWith("=");return{bytes:Math.max(0,Math.floor(3*b.length/4)-d),mime:c}}(a);return!e||(b+=1,c+=e.bytes,e.mime&&d.add(e.mime),!1)});if(0===b)return a;let f=d.size>0?`: ${[...d].join(", ")}`:"";return e.push({type:"text",text:`[${b} tool result image${1===b?"":"s"} omitted from initial history payload${f}, ~${c} bytes]`}),{...a,content:e}}(c));return f>0&&"toolResult"===b.role?{...b,deferredImages:{entryId:a.id,count:f}}:b}return M(c,!0)}let d=M(function(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>((0,i.u4)(a)&&"toolCall"===a.type?{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input}:null)??a);return{...a,content:c}}(c));if(!b.deferThinking||"assistant"!==d.role||!Array.isArray(d.content))return d;return{...d,content:d.content.map(a=>"thinking"===a.type&&"string"==typeof a.thinking&&""!==a.thinking.trim()?{...a,thinking:"",deferred:!0}:a)}}case"branch_summary":if(!a.summary)return null;return{role:"user",content:`*The conversation briefly explored another branch and returned with this summary:*
|
|
11
|
-
|
|
12
|
-
${a.summary}`,timestamp:I(a.timestamp)};case"custom_message":return{role:"custom",customType:a.customType,content:a.content,display:a.display,details:a.details,timestamp:I(a.timestamp)};default:return null}}},78970:(a,b,c)=>{"use strict";function d(a){if(!a||a.length%4!=0)return null;let b=a.endsWith("==")?2:+!!a.endsWith("="),c=a.length-b;for(let b=0;b<c;b+=1){var d;if(!((d=a.charCodeAt(b))>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||43===d||47===d))return null}for(let b=c;b<a.length;b+=1)if("="!==a[b])return null;return a.length/4*3-b}function e(a){if(void 0===a)return null;if(!Array.isArray(a))return"images must be an array";if(a.length>10)return"A message can include at most 10 images";for(let b of a){if(!b||"object"!=typeof b||"image"!==b.type)return"Each attachment must be an image";if(!function(a){if(!a||"object"!=typeof a||"string"!=typeof a.data||"string"!=typeof a.mimeType||!a.mimeType.startsWith("image/"))return!1;let b=d(a.data);return null!==b&&b<=0xa00000}(b))return"Each image must be valid base64 image data of 10MB or smaller"}return null}function f(a){if("object"!=typeof a||null===a||Array.isArray(a))return null;let b=a.source;if("object"==typeof b&&null!==b&&!Array.isArray(b)&&"base64"===b.type&&"string"==typeof b.data){let a="string"==typeof b.media_type?b.media_type:"";return a.toLowerCase().startsWith("image/")?{type:"image",data:b.data,mimeType:a}:null}return"string"==typeof a.data&&"string"==typeof a.mimeType?a.mimeType.toLowerCase().startsWith("image/")?{type:"image",data:a.data,mimeType:a.mimeType}:null:null}c.d(b,{K8:()=>j,Si:()=>d,gy:()=>i,kc:()=>e,x:()=>h,zJ:()=>g});class g extends Error{constructor(a){super("count"===a?"Tool result images exceed the limit of 10 images":"per_image"===a?"Tool result image exceeds the per-image limit of 10MB":"Tool result images exceed the total limit of 25MB"),this.code="tool_result_images_too_large",this.name="ToolResultImagesTooLargeError",this.reason=a}}function h(a){return d(a)??Math.floor(3*a.length/4)}function i(a){if(a.length>10)throw new g("count");for(let b of a)if(b>0xa00000)throw new g("per_image");let b=0;for(let c of a)b+=c;if(b>0x1900000)throw new g("total")}function j(a){let b=new Set,c=[],d=a=>{if(!a||"string"!=typeof a.data||"string"!=typeof a.mimeType)return;let d=`${a.mimeType}\0${a.data}`;b.has(d)||(b.add(d),c.push(a))};try{if(a&&"object"==typeof a&&Array.isArray(a.content))for(let b of a.content)"object"!=typeof b||null===b||Array.isArray(b)||"image"===b.type&&d(f(b));let b=a&&"object"==typeof a?a.details:void 0;if("object"==typeof b&&null!==b&&!Array.isArray(b)){let a=b.images;if(Array.isArray(a))for(let b of a)d(f(b))}}catch{}return c}},85887:(a,b,c)=>{"use strict";c.d(b,{$M:()=>l,OK:()=>r,_8:()=>u,ny:()=>o,pA:()=>q,tE:()=>n,yG:()=>p});var d=c(29021),e=c(21820),f=c(33873);let g=/^[a-z0-9][a-z0-9._-]{0,63}$/,h=/^(?:CON|PRN|AUX|NUL|COM[0-9]|LPT[0-9])(?:\..*)?$/i;function i(a){let b=a?.trim();if(b&&"default"!==b){if("."===b||".."===b||b.endsWith(".")||!g.test(b)||h.test(b))throw Error(`Invalid OMP profile "${a}". Profile names must match ${g.source}, cannot be "." or "..", cannot end with ".", and cannot be a Windows reserved device name (CON, PRN, AUX, NUL, COM0-9, LPT0-9, or any of those with an extension).`);return b}}function j(){return void 0!==process.env.OMP_PROFILE?i(process.env.OMP_PROFILE):i(process.env.PI_PROFILE)}function k(){let a=f.join((0,e.homedir)(),process.env.PI_CONFIG_DIR||".omp"),b=j();return b?f.join(a,"profiles",b):a}function l(){let a=j(),b=process.env.PI_CODING_AGENT_DIR;return b&&!a?f.resolve(b):f.join(k(),"agent")}function m(a){let b=function(){let a,b;if("linux"!==process.platform&&"darwin"!==process.platform||(a=j(),(b=process.env.PI_CODING_AGENT_DIR)&&!a&&f.resolve(b)!==f.join(k(),"agent")))return;let c=process.env.XDG_DATA_HOME;if(c)try{let a=f.join(c,"omp"),b=j();if(b){let c=f.join(a,"profiles",b);return(0,d.existsSync)(c)?c:void 0}return(0,d.existsSync)(a)?a:void 0}catch{return}}();return f.join(b??l(),a)}function n(){return m("sessions")}function o(){return f.join(f.dirname(n()),"archive","sessions")}function p(){return m("blobs")}function q(){let a=l(),b=f.join(a,"config.yml");if((0,d.existsSync)(b))return b;let c=f.join(a,"config.yaml");return(0,d.existsSync)(c)?c:b}function r(){let a=l(),b=f.join(a,"models.yml");if((0,d.existsSync)(b))return b;let c=f.join(a,"models.yaml");return(0,d.existsSync)(c)?c:b}function s(a){try{return d.realpathSync.native(a)}catch{return a}}function t(a,b){let c=b.replace(/[/\\:]/g,"-");return c?a.endsWith("-")?`${a}${c}`:`${a}-${c}`:a}function u(a){let b,c=s(f.resolve(a)),d=s((0,e.homedir)()),g=s((0,e.tmpdir)()),h=f.relative(d,c),i=f.relative(g,c);return""!==h&&(h.startsWith("..")||f.isAbsolute(h))?""!==i&&(i.startsWith("..")||f.isAbsolute(i))?(b=f.resolve(c),`--${b.replace(/^[/\\]/,"").replace(/[/\\:]/g,"-")}--`):t("-tmp",i):t("-",h)}},96487:()=>{}};
|