cuelo 0.10.52 → 0.10.53
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 +35 -35
- package/.next/build-manifest.json +4 -4
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +549 -561
- package/.next/required-server-files.js +25 -25
- package/.next/required-server-files.json +25 -25
- package/.next/server/app/_global-error/page.js +3 -3
- 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 +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- 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/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/agent/[id]/account/route.js +1 -1
- package/.next/server/app/api/agent/[id]/account/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/agent/running/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/attachment-settings/route.js +1 -1
- package/.next/server/app/api/attachment-settings/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/attachments/[id]/transcription/route.js +2 -2
- package/.next/server/app/api/attachments/[id]/transcription/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/attachments/draft/route.js +1 -1
- package/.next/server/app/api/attachments/draft/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/attachments/route.js +2 -2
- package/.next/server/app/api/attachments/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/character-mode/route.js +1 -2
- package/.next/server/app/api/character-mode/route.js.nft.json +1 -1
- package/.next/server/app/api/character-mode/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/display-settings/route.js +1 -1
- package/.next/server/app/api/display-settings/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/document-text/route.js +2 -2
- package/.next/server/app/api/document-text/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/experiments/route.js +1 -1
- package/.next/server/app/api/experiments/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/file-index/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/git/diff/route.js +1 -1
- package/.next/server/app/api/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/git/status/route.js +2 -2
- package/.next/server/app/api/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/github/projects/route.js +1 -1
- package/.next/server/app/api/github/projects/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/gpt6/handles/route.js +1 -1
- package/.next/server/app/api/gpt6/handles/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/gpt6/reply/route.js +1 -1
- package/.next/server/app/api/gpt6/reply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/gpt6/token/route.js +1 -1
- package/.next/server/app/api/gpt6/token/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
- package/.next/server/app/api/gpt6/web6-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/live/call/[callId]/route.js +2 -2
- package/.next/server/app/api/live/call/[callId]/route.js.nft.json +1 -1
- package/.next/server/app/api/live/call/[callId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/live/events/route.js +2 -2
- package/.next/server/app/api/live/events/route.js.nft.json +1 -1
- package/.next/server/app/api/live/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/live/interpret/route.js +2 -2
- package/.next/server/app/api/live/interpret/route.js.nft.json +1 -1
- package/.next/server/app/api/live/interpret/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/live/offer/route.js +1 -1
- package/.next/server/app/api/live/offer/route.js.nft.json +1 -1
- package/.next/server/app/api/live/offer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/live/voices/route.js +1 -1
- package/.next/server/app/api/live/voices/route.js.nft.json +1 -1
- package/.next/server/app/api/live/voices/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/route.js +2 -2
- package/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/model-roles/route.js +1 -1
- package/.next/server/app/api/model-roles/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/catalog/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/route.js +3 -3
- package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/office-characters/[...path]/route.js +1 -2
- package/.next/server/app/api/office-characters/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/office-characters/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/plugins/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/project-docs/route.js +1 -1
- package/.next/server/app/api/project-docs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/project-trust/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/projects/route.js +2 -2
- package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/runs/[runId]/prelude/route.js +1 -1
- package/.next/server/app/api/runs/[runId]/prelude/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/runs/[runId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/runs/[runId]/turns/route.js +1 -1
- package/.next/server/app/api/runs/[runId]/turns/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/runs/route.js +1 -1
- package/.next/server/app/api/runs/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/search/route.js +1 -1
- package/.next/server/app/api/sessions/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/route.js +1 -1
- package/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidecars/[service]/[...path]/route.js +1 -1
- package/.next/server/app/api/sidecars/[service]/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/install/route.js +2 -2
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/skills/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/subagents/eta/route.js +1 -1
- package/.next/server/app/api/subagents/eta/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/theme/route.js +1 -1
- package/.next/server/app/api/theme/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tool-image/route.js +1 -1
- package/.next/server/app/api/tool-image/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/update-maintenance/route.js +2 -2
- package/.next/server/app/api/update-maintenance/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/updates/route.js +1 -1
- package/.next/server/app/api/updates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/web-access/recovery/route.js +1 -1
- package/.next/server/app/api/web-access/recovery/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/web-access/route.js +1 -1
- package/.next/server/app/api/web-access/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/web6/consults/route.js +1 -1
- package/.next/server/app/api/web6/consults/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +4 -4
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +5 -5
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover/page.js +2 -2
- package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover.html +1 -1
- package/.next/server/app/recover.rsc +3 -3
- package/.next/server/app/recover.segments/_full.segment.rsc +3 -3
- package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
- package/.next/server/app/recover.segments/_index.segment.rsc +2 -2
- package/.next/server/app/recover.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +35 -35
- package/.next/server/chunks/1008.js +2 -2
- package/.next/server/chunks/1966.js +2 -0
- package/.next/server/chunks/319.js +3 -3
- package/.next/server/chunks/6429.js +2 -2
- package/.next/server/chunks/6775.js +7 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +9 -9
- 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/app/_not-found/page-041b64675adcdf82.js +1 -0
- package/.next/static/chunks/app/layout-3b1f8b74c7fc5e77.js +1 -0
- package/.next/static/chunks/app/{page-3640086c732eb87d.js → page-efae4fdcf84b7a14.js} +4 -4
- package/.next/static/chunks/app/recover/{page-c0c40b3c215078a4.js → page-2bcd6a351f3eda3d.js} +1 -1
- package/.next/static/chunks/{main-app-fbc4aa3c15d48613.js → main-app-ca46ab75db2b4e4b.js} +1 -1
- package/.next/static/chunks/main-dd4c9daba44bef88.js +5 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-dac2a58a3b9eb28e.js +1 -0
- package/.next/static/chunks/webpack-546c8221d1906945.js +1 -0
- package/.next/trace +107 -107
- package/.next/trace-build +1 -1
- package/.next/types/app/api/agent/[id]/account/route.ts +1 -1
- package/.next/types/app/api/agent/[id]/bash-output/route.ts +1 -1
- package/.next/types/app/api/agent/[id]/events/route.ts +1 -1
- package/.next/types/app/api/agent/[id]/route.ts +1 -1
- package/.next/types/app/api/agent/new/route.ts +1 -1
- package/.next/types/app/api/agent/running/route.ts +1 -1
- package/.next/types/app/api/attachment-settings/route.ts +1 -1
- package/.next/types/app/api/attachments/[id]/transcription/route.ts +1 -1
- package/.next/types/app/api/attachments/draft/route.ts +1 -1
- package/.next/types/app/api/attachments/route.ts +1 -1
- package/.next/types/app/api/auth/all-providers/route.ts +1 -1
- package/.next/types/app/api/auth/api-key/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/login/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/logout/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/providers/route.ts +1 -1
- package/.next/types/app/api/character-mode/route.ts +1 -1
- package/.next/types/app/api/cwd/browse/route.ts +1 -1
- package/.next/types/app/api/cwd/validate/route.ts +1 -1
- package/.next/types/app/api/default-cwd/route.ts +1 -1
- package/.next/types/app/api/display-settings/route.ts +1 -1
- package/.next/types/app/api/document-text/route.ts +1 -1
- package/.next/types/app/api/experiments/route.ts +1 -1
- package/.next/types/app/api/file-index/route.ts +1 -1
- package/.next/types/app/api/files/[...path]/route.ts +1 -1
- package/.next/types/app/api/git/diff/route.ts +1 -1
- package/.next/types/app/api/git/status/route.ts +1 -1
- package/.next/types/app/api/github/projects/route.ts +1 -1
- package/.next/types/app/api/gpt6/handles/route.ts +1 -1
- package/.next/types/app/api/gpt6/reply/route.ts +1 -1
- package/.next/types/app/api/gpt6/token/route.ts +1 -1
- package/.next/types/app/api/gpt6/web6-session/route.ts +1 -1
- package/.next/types/app/api/home/route.ts +1 -1
- package/.next/types/app/api/live/call/[callId]/route.ts +1 -1
- package/.next/types/app/api/live/events/route.ts +1 -1
- package/.next/types/app/api/live/interpret/route.ts +1 -1
- package/.next/types/app/api/live/offer/route.ts +1 -1
- package/.next/types/app/api/live/voices/route.ts +1 -1
- package/.next/types/app/api/mcp/route.ts +1 -1
- package/.next/types/app/api/model-roles/route.ts +1 -1
- package/.next/types/app/api/models/route.ts +1 -1
- package/.next/types/app/api/models-config/catalog/route.ts +1 -1
- package/.next/types/app/api/models-config/discover/route.ts +1 -1
- package/.next/types/app/api/models-config/route.ts +1 -1
- package/.next/types/app/api/models-config/test/route.ts +1 -1
- package/.next/types/app/api/office-characters/[...path]/route.ts +1 -1
- package/.next/types/app/api/plugins/route.ts +1 -1
- package/.next/types/app/api/project-docs/route.ts +1 -1
- package/.next/types/app/api/project-trust/route.ts +1 -1
- package/.next/types/app/api/projects/route.ts +1 -1
- package/.next/types/app/api/runs/[runId]/prelude/route.ts +1 -1
- package/.next/types/app/api/runs/[runId]/route.ts +1 -1
- package/.next/types/app/api/runs/[runId]/turns/route.ts +1 -1
- package/.next/types/app/api/runs/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/auto-name/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/context/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/entries/[entryId]/thinking/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/export/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/state/route.ts +1 -1
- package/.next/types/app/api/sessions/route.ts +1 -1
- package/.next/types/app/api/sessions/search/route.ts +1 -1
- package/.next/types/app/api/settings/route.ts +1 -1
- package/.next/types/app/api/sidecars/[service]/[...path]/route.ts +1 -1
- package/.next/types/app/api/skills/check/route.ts +1 -1
- package/.next/types/app/api/skills/install/route.ts +1 -1
- package/.next/types/app/api/skills/route.ts +1 -1
- package/.next/types/app/api/skills/search/route.ts +1 -1
- package/.next/types/app/api/skills/update/route.ts +1 -1
- package/.next/types/app/api/subagents/eta/route.ts +1 -1
- package/.next/types/app/api/theme/route.ts +1 -1
- package/.next/types/app/api/tool-image/route.ts +1 -1
- package/.next/types/app/api/update-maintenance/route.ts +1 -1
- package/.next/types/app/api/updates/route.ts +1 -1
- package/.next/types/app/api/web-access/recovery/route.ts +1 -1
- package/.next/types/app/api/web-access/route.ts +1 -1
- package/.next/types/app/api/web6/consults/route.ts +1 -1
- package/.next/types/app/api/worktrees/route.ts +1 -1
- package/.next/types/app/layout.ts +1 -1
- package/.next/types/app/page.ts +1 -1
- package/.next/types/app/recover/page.ts +1 -1
- package/LICENSE +22 -22
- package/README.md +273 -271
- package/Tools/CUELO_Setup/files/btw-server.js +346 -346
- package/Tools/CUELO_Setup/files/native-runtime-patch.js +238 -238
- package/Tools/CUELO_Setup/files/subagent-server.js +587 -587
- package/Tools/CUELO_Setup/files/usage-server.js +1057 -1057
- package/Tools/OMP_Global_Config/agent/AGENTS.md +144 -144
- package/Tools/OMP_Global_Config/agent/RULES.md +140 -140
- package/Tools/OMP_Global_Config/agent/TITLE_SYSTEM.md +17 -17
- package/Tools/OMP_Global_Config/agent/WATCHDOG.md +55 -55
- package/Tools/OMP_Global_Config/agent/agents/maker.md +413 -413
- package/Tools/OMP_Global_Config/agent/extensions/character-voice.ts +1035 -1035
- package/Tools/OMP_Global_Config/agent/extensions/command-guard/index.ts +1110 -1110
- package/Tools/OMP_Global_Config/agent/extensions/command-guard/interop-hint.ts +133 -133
- package/Tools/OMP_Global_Config/agent/extensions/command-guard/matcher.ts +2258 -2258
- package/Tools/OMP_Global_Config/agent/extensions/command-guard/powershell-syntax.ts +210 -210
- package/Tools/OMP_Global_Config/agent/extensions/command-guard/task-guard.ts +1137 -1121
- package/Tools/OMP_Global_Config/agent/extensions/cross-review.ts +132 -132
- package/Tools/OMP_Global_Config/agent/extensions/docmap-route.ts +133 -133
- package/Tools/OMP_Global_Config/agent/extensions/draft/markdown.ts +226 -226
- package/Tools/OMP_Global_Config/agent/extensions/draft/ooxml.ts +222 -222
- package/Tools/OMP_Global_Config/agent/extensions/draft/pdf.ts +63 -63
- package/Tools/OMP_Global_Config/agent/extensions/draft/zip.ts +73 -73
- package/Tools/OMP_Global_Config/agent/extensions/draft.ts +204 -204
- package/Tools/OMP_Global_Config/agent/extensions/edit-lessons.ts +159 -159
- package/Tools/OMP_Global_Config/agent/extensions/external-advice-check.ts +36 -36
- package/Tools/OMP_Global_Config/agent/extensions/gitnexus-autosync.ts +406 -406
- package/Tools/OMP_Global_Config/agent/extensions/image-question-router.ts +55 -55
- package/Tools/OMP_Global_Config/agent/extensions/jev-runtime.ts +2700 -2700
- package/Tools/OMP_Global_Config/agent/extensions/korean-reply-guard.ts +190 -190
- package/Tools/OMP_Global_Config/agent/extensions/lib/cross-review.ts +1208 -1208
- package/Tools/OMP_Global_Config/agent/extensions/lib/docmap-search.ts +612 -612
- package/Tools/OMP_Global_Config/agent/extensions/lib/job-observation.ts +182 -182
- package/Tools/OMP_Global_Config/agent/extensions/lib/maker-routing.ts +1332 -1332
- package/Tools/OMP_Global_Config/agent/extensions/lib/mcp-selection.ts +361 -361
- package/Tools/OMP_Global_Config/agent/extensions/lib/memory-excerpt.ts +5 -5
- package/Tools/OMP_Global_Config/agent/extensions/lib/native-judge.ts +113 -113
- package/Tools/OMP_Global_Config/agent/extensions/lib/prepared-task.ts +211 -211
- package/Tools/OMP_Global_Config/agent/extensions/lib/routing-ledger.ts +538 -538
- package/Tools/OMP_Global_Config/agent/extensions/lib/session-identity.ts +34 -34
- package/Tools/OMP_Global_Config/agent/extensions/lib/task-progress.ts +492 -492
- package/Tools/OMP_Global_Config/agent/extensions/mcp-selection.ts +301 -301
- package/Tools/OMP_Global_Config/agent/extensions/prompt-compact.ts +67 -67
- package/Tools/OMP_Global_Config/agent/extensions/report-chart-guard.ts +102 -102
- package/Tools/OMP_Global_Config/agent/extensions/skim.ts +332 -332
- package/Tools/OMP_Global_Config/agent/extensions/steering-reply-gate.ts +207 -207
- package/Tools/OMP_Global_Config/agent/extensions/todo-nudge.ts +80 -80
- package/Tools/OMP_Global_Config/agent/extensions/turn-end-guard.ts +421 -421
- package/Tools/OMP_Global_Config/agent/prompt-copies/AGENTS.en.md +147 -147
- package/Tools/OMP_Global_Config/agent/prompt-copies/RULES.en.md +49 -49
- package/Tools/OMP_Global_Config/agent/rules/docs-handoff.md +39 -39
- package/Tools/OMP_Global_Config/agent/rules/frontend.md +74 -74
- package/Tools/OMP_Global_Config/agent/rules/harness-policy.json +1224 -1224
- package/Tools/OMP_Global_Config/agent/rules/legacy-encoding.md +21 -21
- package/Tools/OMP_Global_Config/agent/rules/meta-harness.md +45 -45
- package/Tools/OMP_Global_Config/agent/rules/omp-harness.md +151 -151
- package/Tools/OMP_Global_Config/agent/rules/subagent.md +750 -750
- package/Tools/OMP_Global_Config/agent/rules/task-guard.md +62 -62
- package/Tools/OMP_Global_Config/agent/rules/verdict.md +210 -210
- package/Tools/OMP_Global_Config/agent/rules/web6-consult.md +83 -83
- package/Tools/OMP_Global_Config/agent/sop/_common.md +136 -136
- package/Tools/OMP_Global_Config/agent/sop/_writer.md +259 -259
- package/Tools/OMP_Global_Config/agent/sop/maker.md +9 -9
- package/Tools/OMP_Global_Config/agent/tools/git-finalizer/finalizer.ps1 +409 -409
- package/Tools/OMP_Global_Config/agent/tools/git-finalizer/index.ts +303 -303
- package/Tools/OMP_Global_Config/agent/tools/git-finalizer/sync-checkout.ts +184 -184
- package/Tools/OMP_Global_Config/agent/tools/git-finalizer/wsl-git.ts +96 -96
- package/Tools/OMP_Global_Config/agent/tools/windows-build/index.ts +387 -387
- package/Tools/OMP_Global_Config/agent/tools/windows-control/control.ps1 +200 -200
- package/Tools/OMP_Global_Config/agent/tools/windows-control/index.ts +255 -255
- package/Tools/OMP_Global_Config/notices/orchestrate.md +26 -26
- package/Tools/OMP_Global_Config/notices/ultrathink.md +9 -9
- package/Tools/OMP_Global_Config/notices/workflow.md +16 -16
- package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +18339 -18304
- package/Tools/OMP_Global_Config/patches/apply-notices.mjs +135 -135
- package/bin/cuelo-options.js +38 -38
- package/bin/cuelo.js +273 -273
- package/bin/docker-entrypoint.mjs +19 -19
- package/bin/password-prompt.js +100 -100
- package/bin/prepare-runtime.js +112 -112
- package/bin/runtime.js +134 -134
- package/bin/web-auth-store.d.ts +104 -104
- package/bin/web-auth-store.js +593 -593
- package/install.mjs +427 -427
- package/next.config.ts +104 -104
- package/package.json +141 -141
- package/public/audio/completion/voices.json +1393 -1393
- package/public/fonts/cuelo-display/NOTICE.txt +15 -15
- package/public/fonts/fonts.css +288 -288
- package/public/fonts/jetbrains-mono/OFL.txt +93 -93
- package/public/fonts/wanted-sans/OFL.txt +93 -93
- package/public/icons/catppuccin/LICENSE +22 -22
- package/public/icons/catppuccin/README.md +8 -8
- package/public/icons/catppuccin/latte/_file.svg +3 -3
- package/public/icons/catppuccin/latte/_folder.svg +3 -3
- package/public/icons/catppuccin/latte/_folder_open.svg +3 -3
- package/public/icons/catppuccin/latte/bash.svg +7 -7
- package/public/icons/catppuccin/latte/bun-lock.svg +8 -8
- package/public/icons/catppuccin/latte/config.svg +3 -3
- package/public/icons/catppuccin/latte/css.svg +6 -6
- package/public/icons/catppuccin/latte/database.svg +3 -3
- package/public/icons/catppuccin/latte/docker.svg +3 -3
- package/public/icons/catppuccin/latte/env.svg +3 -3
- package/public/icons/catppuccin/latte/eslint.svg +6 -6
- package/public/icons/catppuccin/latte/git.svg +6 -6
- package/public/icons/catppuccin/latte/go.svg +3 -3
- package/public/icons/catppuccin/latte/graphql.svg +3 -3
- package/public/icons/catppuccin/latte/html.svg +6 -6
- package/public/icons/catppuccin/latte/javascript-react.svg +8 -8
- package/public/icons/catppuccin/latte/javascript.svg +6 -6
- package/public/icons/catppuccin/latte/json.svg +3 -3
- package/public/icons/catppuccin/latte/lock.svg +3 -3
- package/public/icons/catppuccin/latte/markdown.svg +3 -3
- package/public/icons/catppuccin/latte/ms-word.svg +6 -6
- package/public/icons/catppuccin/latte/next.svg +6 -6
- package/public/icons/catppuccin/latte/npm-lock.svg +7 -7
- package/public/icons/catppuccin/latte/pdf.svg +3 -3
- package/public/icons/catppuccin/latte/python.svg +8 -8
- package/public/icons/catppuccin/latte/rust.svg +6 -6
- package/public/icons/catppuccin/latte/sass.svg +3 -3
- package/public/icons/catppuccin/latte/terraform.svg +3 -3
- package/public/icons/catppuccin/latte/toml.svg +3 -3
- package/public/icons/catppuccin/latte/typescript-react.svg +8 -8
- package/public/icons/catppuccin/latte/typescript.svg +6 -6
- package/public/icons/catppuccin/latte/yaml.svg +3 -3
- package/public/icons/catppuccin/mocha/_file.svg +3 -3
- package/public/icons/catppuccin/mocha/_folder.svg +3 -3
- package/public/icons/catppuccin/mocha/_folder_open.svg +3 -3
- package/public/icons/catppuccin/mocha/bash.svg +7 -7
- package/public/icons/catppuccin/mocha/bun-lock.svg +8 -8
- package/public/icons/catppuccin/mocha/config.svg +3 -3
- package/public/icons/catppuccin/mocha/css.svg +6 -6
- package/public/icons/catppuccin/mocha/database.svg +3 -3
- package/public/icons/catppuccin/mocha/docker.svg +3 -3
- package/public/icons/catppuccin/mocha/env.svg +3 -3
- package/public/icons/catppuccin/mocha/eslint.svg +6 -6
- package/public/icons/catppuccin/mocha/git.svg +6 -6
- package/public/icons/catppuccin/mocha/go.svg +3 -3
- package/public/icons/catppuccin/mocha/graphql.svg +3 -3
- package/public/icons/catppuccin/mocha/html.svg +6 -6
- package/public/icons/catppuccin/mocha/javascript-react.svg +8 -8
- package/public/icons/catppuccin/mocha/javascript.svg +6 -6
- package/public/icons/catppuccin/mocha/json.svg +3 -3
- package/public/icons/catppuccin/mocha/lock.svg +3 -3
- package/public/icons/catppuccin/mocha/markdown.svg +3 -3
- package/public/icons/catppuccin/mocha/ms-word.svg +6 -6
- package/public/icons/catppuccin/mocha/next.svg +6 -6
- package/public/icons/catppuccin/mocha/npm-lock.svg +7 -7
- package/public/icons/catppuccin/mocha/pdf.svg +3 -3
- package/public/icons/catppuccin/mocha/python.svg +8 -8
- package/public/icons/catppuccin/mocha/rust.svg +6 -6
- package/public/icons/catppuccin/mocha/sass.svg +3 -3
- package/public/icons/catppuccin/mocha/terraform.svg +3 -3
- package/public/icons/catppuccin/mocha/toml.svg +3 -3
- package/public/icons/catppuccin/mocha/typescript-react.svg +8 -8
- package/public/icons/catppuccin/mocha/typescript.svg +6 -6
- package/public/icons/catppuccin/mocha/yaml.svg +3 -3
- package/public/icons/cuelo-icon.svg +8 -8
- package/public/offline.html +145 -145
- package/public/sw.js +135 -135
- package/.next/server/chunks/205.js +0 -7
- package/.next/server/chunks/7738.js +0 -1
- package/.next/static/chunks/1966.b8f83f7ba376c962.js +0 -1
- package/.next/static/chunks/3899.3f761f7e3a944e8c.js +0 -1
- package/.next/static/chunks/app/_not-found/page-9e5295df095e2e41.js +0 -1
- package/.next/static/chunks/app/layout-8b29ba206a96135e.js +0 -1
- package/.next/static/chunks/main-1ddb405481ce21f6.js +0 -5
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-50782c8c9c06c8b5.js +0 -1
- package/.next/static/chunks/webpack-7b514b9855bd748c.js +0 -1
- /package/.next/static/{dQA--5NX6NZt_A6pLZUde → -mDQEyWQ8VQsAfLpiACIP}/_buildManifest.js +0 -0
- /package/.next/static/{dQA--5NX6NZt_A6pLZUde → -mDQEyWQ8VQsAfLpiACIP}/_ssgManifest.js +0 -0
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WSL bash에서 Windows/Linux 차이로 생기는 실패를 다룬다.
|
|
3
|
-
*
|
|
4
|
-
* 근거(2026-10-14 세션 기록 집계, WSL 이관 10-07 이후):
|
|
5
|
-
* - Windows 실행 파일 출력의 CP949 한글이 U+FFFD로 깨진 호출 66건. pi-natives가 bash 출력을 UTF-8로
|
|
6
|
-
* 손실 해석하므로 결과 쪽에서는 되살릴 수 없다. 그래서 실행 전에 출력이 UTF-8이 되도록 명령을 감싼다
|
|
7
|
-
* ({@link windowsOutputCommand}). 감싸지 못한 명령이 깨지면 다시 실행할 방법을 안내한다.
|
|
8
|
-
* - 시스템 `python3`에 PyMuPDF·openpyxl·Pillow·ezdxf·python-docx가 없어 실패한 호출 28건.
|
|
9
|
-
* 관리 Python 환경(`~/.omp/python-env`, eval이 자동으로 고르는 환경)에는 설치돼 있다.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { invokedCommands } from "./matcher";
|
|
13
|
-
|
|
14
|
-
const MOJIBAKE = /\uFFFD{2,}/;
|
|
15
|
-
const MISSING_PYTHON_MODULE = /ModuleNotFoundError: No module named '([\w.]+)'/;
|
|
16
|
-
// `python3`, `python3.12`, `/usr/bin/python3`, `"/usr/bin/python3"`처럼 경로·따옴표를 붙인 호출도 잡는다.
|
|
17
|
-
const PYTHON_COMMAND = /(?:^|[\s;&|(/"'])python3?(?:\.\d+)?(?=["'\s;&|)]|$)/m;
|
|
18
|
-
|
|
19
|
-
export interface InteropHintContext {
|
|
20
|
-
/** 관리 Python 환경의 python 실행 파일. 없으면 Python 안내를 내지 않는다. */
|
|
21
|
-
managedPython?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// 출력 줄이 UTF-8로 읽히면 그대로 두고, 아니면 CP949로 읽어 UTF-8로 낸다. Windows의 UTF-8 출력
|
|
25
|
-
// (`git.exe`, `WSL_UTF8`을 받은 `wsl.exe`, BOM `.ps1`)과 Linux 출력은 바뀌지 않는다.
|
|
26
|
-
const DECODER = [
|
|
27
|
-
"import sys",
|
|
28
|
-
"w = sys.stdout.buffer",
|
|
29
|
-
"for b in iter(sys.stdin.buffer.readline, b''):",
|
|
30
|
-
" try:",
|
|
31
|
-
" t = b.decode('utf-8')",
|
|
32
|
-
" except UnicodeDecodeError:",
|
|
33
|
-
" t = b.decode('cp949', 'replace')",
|
|
34
|
-
" w.write(t.encode('utf-8'))",
|
|
35
|
-
" w.flush()",
|
|
36
|
-
].join("\n");
|
|
37
|
-
// 출력이 변환기 하나를 거치도록 원래 명령을 실제 bash 한 번으로 돌리고, 그 종료 코드를 그대로 돌려준다.
|
|
38
|
-
// 원문과 변환기는 base64로 넘겨 따옴표·heredoc이 어떤 모양이든 그대로 실행된다.
|
|
39
|
-
const RUNNER =
|
|
40
|
-
'c=$(printf %s "$1" | base64 -d) && p=$(printf %s "$2" | base64 -d) || exit 2; ' +
|
|
41
|
-
'bash -c "$c" 2>&1 | python3 -u -c "$p"; exit "${PIPESTATUS[0]}"';
|
|
42
|
-
/**
|
|
43
|
-
* 명령이 실제로 부르는 Windows 프로그램의 파일 이름(소문자). `*.exe`와 낱말 하나인 `powershell`·`pwsh`만 센다.
|
|
44
|
-
* 따옴표 안 언급·주석·heredoc 본문의 글자(`echo "tasklist.exe"`, `cat <<'EOF' … pwsh … EOF`)는 부르는 것이 아니므로 세지 않고,
|
|
45
|
-
* `bash -c '…'`·`$(…)`·`xargs`·`for … do` 안의 호출은 센다.
|
|
46
|
-
*/
|
|
47
|
-
function windowsPrograms(command: string): string[] {
|
|
48
|
-
const programs: string[] = [];
|
|
49
|
-
for (const invoked of invokedCommands(command)) {
|
|
50
|
-
const name = (invoked.replace(/\\/g, "/").split("/").pop() ?? "").toLowerCase();
|
|
51
|
-
if (name.endsWith(".exe") || name === "powershell" || name === "pwsh") programs.push(name);
|
|
52
|
-
}
|
|
53
|
-
return programs;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* bash 따옴표·이스케이프를 따라가며 따옴표 밖의 백그라운드 `&`가 있는지 본다(`&&`·`&>`·`>&`·`<&`·`|&` 제외).
|
|
58
|
-
* 백그라운드 자식이 출력 파이프를 붙잡으면 감싼 호출이 끝나지 않으므로 그런 명령은 감싸지 않는다.
|
|
59
|
-
* 따옴표 안의 `&`(PowerShell 호출 연산자 등)와 `\&`는 bash 연산자가 아니다.
|
|
60
|
-
*/
|
|
61
|
-
function hasBackgroundAmpersand(command: string): boolean {
|
|
62
|
-
let quote: string | undefined;
|
|
63
|
-
for (let index = 0; index < command.length; index++) {
|
|
64
|
-
const char = command[index];
|
|
65
|
-
if (quote === "'") {
|
|
66
|
-
if (char === "'") quote = undefined;
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
if (char === "\\") {
|
|
70
|
-
index++;
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
if (quote === '"') {
|
|
74
|
-
if (char === '"') quote = undefined;
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
if (char === "'" || char === '"') {
|
|
78
|
-
quote = char;
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
if (char !== "&") continue;
|
|
82
|
-
const previous = command[index - 1] ?? "";
|
|
83
|
-
const next = command[index + 1] ?? "";
|
|
84
|
-
if (next === "&") {
|
|
85
|
-
index++;
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
if (next === ">" || previous === ">" || previous === "<" || previous === "|") continue;
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface WindowsOutputContext {
|
|
95
|
-
/** WSL에서 Windows 실행 파일을 부를 수 있을 때만 감싼다. */
|
|
96
|
-
wsl: boolean;
|
|
97
|
-
/** 대화형 pty 실행은 감싸지 않는다. */
|
|
98
|
-
pty?: boolean;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Windows 실행 파일을 부르는 bash 명령을, 출력을 UTF-8로 바꿔 내는 명령으로 감싼다. 감쌀 필요가 없거나
|
|
103
|
-
* 감싸면 동작이 달라질 수 있는 명령은 `undefined`를 돌려준다.
|
|
104
|
-
*
|
|
105
|
-
* 감싼 명령은 지속 셸이 아니라 새 bash에서 돌므로, 그 안의 `cd`·변수 대입은 다음 호출로 이어지지 않는다
|
|
106
|
-
* (export된 환경과 작업 폴더는 물려받는다).
|
|
107
|
-
*/
|
|
108
|
-
export function windowsOutputCommand(command: string, context: WindowsOutputContext): string | undefined {
|
|
109
|
-
if (!context.wsl || context.pty) return undefined;
|
|
110
|
-
if (/\biconv\b/.test(command) || hasBackgroundAmpersand(command)) return undefined;
|
|
111
|
-
// `git.exe`는 UTF-8로 내고 /mnt 저장소에서 가장 자주 부르므로, Windows 프로그램이 그것뿐이면 감싸지 않는다.
|
|
112
|
-
const programs = windowsPrograms(command);
|
|
113
|
-
if (programs.every((program) => program === "git.exe")) return undefined;
|
|
114
|
-
const encodedCommand = Buffer.from(command, "utf8").toString("base64");
|
|
115
|
-
const encodedDecoder = Buffer.from(DECODER, "utf8").toString("base64");
|
|
116
|
-
return `bash -c '${RUNNER}' cuelo-windows-output '${encodedCommand}' '${encodedDecoder}'`;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export function interopHint(command: string, output: string, context: InteropHintContext = {}): string | undefined {
|
|
120
|
-
const hints: string[] = [];
|
|
121
|
-
if (windowsPrograms(command).length > 0 && !/\biconv\b/.test(command) && MOJIBAKE.test(output)) {
|
|
122
|
-
hints.push(
|
|
123
|
-
"[WSL interop] Windows 프로그램 출력의 한글이 CP949라 깨졌다(�). 자동 UTF-8 변환은 `&` 백그라운드·pty·`iconv`가 든 명령을 감싸지 않는다. 이 결과는 복구할 수 없으니 `| iconv -f cp949 -t utf-8`을 붙여 다시 실행한다. `wsl.exe`는 `WSL_UTF8=1 WSLENV=WSL_UTF8`을 쓴다.",
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
const missing = MISSING_PYTHON_MODULE.exec(output);
|
|
127
|
-
if (missing && context.managedPython && PYTHON_COMMAND.test(command) && !command.includes("python-env/bin/python")) {
|
|
128
|
-
hints.push(
|
|
129
|
-
`[WSL interop] 시스템 python3에는 '${missing[1]}'이 없다. 관리 Python 환경 \`${context.managedPython}\`(eval도 이 환경을 쓴다)으로 다시 실행하고, 그래도 없으면 그 환경에 \`-m pip install\`로 넣는다.`,
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
return hints.length > 0 ? hints.join("\n") : undefined;
|
|
133
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* WSL bash에서 Windows/Linux 차이로 생기는 실패를 다룬다.
|
|
3
|
+
*
|
|
4
|
+
* 근거(2026-10-14 세션 기록 집계, WSL 이관 10-07 이후):
|
|
5
|
+
* - Windows 실행 파일 출력의 CP949 한글이 U+FFFD로 깨진 호출 66건. pi-natives가 bash 출력을 UTF-8로
|
|
6
|
+
* 손실 해석하므로 결과 쪽에서는 되살릴 수 없다. 그래서 실행 전에 출력이 UTF-8이 되도록 명령을 감싼다
|
|
7
|
+
* ({@link windowsOutputCommand}). 감싸지 못한 명령이 깨지면 다시 실행할 방법을 안내한다.
|
|
8
|
+
* - 시스템 `python3`에 PyMuPDF·openpyxl·Pillow·ezdxf·python-docx가 없어 실패한 호출 28건.
|
|
9
|
+
* 관리 Python 환경(`~/.omp/python-env`, eval이 자동으로 고르는 환경)에는 설치돼 있다.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { invokedCommands } from "./matcher";
|
|
13
|
+
|
|
14
|
+
const MOJIBAKE = /\uFFFD{2,}/;
|
|
15
|
+
const MISSING_PYTHON_MODULE = /ModuleNotFoundError: No module named '([\w.]+)'/;
|
|
16
|
+
// `python3`, `python3.12`, `/usr/bin/python3`, `"/usr/bin/python3"`처럼 경로·따옴표를 붙인 호출도 잡는다.
|
|
17
|
+
const PYTHON_COMMAND = /(?:^|[\s;&|(/"'])python3?(?:\.\d+)?(?=["'\s;&|)]|$)/m;
|
|
18
|
+
|
|
19
|
+
export interface InteropHintContext {
|
|
20
|
+
/** 관리 Python 환경의 python 실행 파일. 없으면 Python 안내를 내지 않는다. */
|
|
21
|
+
managedPython?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 출력 줄이 UTF-8로 읽히면 그대로 두고, 아니면 CP949로 읽어 UTF-8로 낸다. Windows의 UTF-8 출력
|
|
25
|
+
// (`git.exe`, `WSL_UTF8`을 받은 `wsl.exe`, BOM `.ps1`)과 Linux 출력은 바뀌지 않는다.
|
|
26
|
+
const DECODER = [
|
|
27
|
+
"import sys",
|
|
28
|
+
"w = sys.stdout.buffer",
|
|
29
|
+
"for b in iter(sys.stdin.buffer.readline, b''):",
|
|
30
|
+
" try:",
|
|
31
|
+
" t = b.decode('utf-8')",
|
|
32
|
+
" except UnicodeDecodeError:",
|
|
33
|
+
" t = b.decode('cp949', 'replace')",
|
|
34
|
+
" w.write(t.encode('utf-8'))",
|
|
35
|
+
" w.flush()",
|
|
36
|
+
].join("\n");
|
|
37
|
+
// 출력이 변환기 하나를 거치도록 원래 명령을 실제 bash 한 번으로 돌리고, 그 종료 코드를 그대로 돌려준다.
|
|
38
|
+
// 원문과 변환기는 base64로 넘겨 따옴표·heredoc이 어떤 모양이든 그대로 실행된다.
|
|
39
|
+
const RUNNER =
|
|
40
|
+
'c=$(printf %s "$1" | base64 -d) && p=$(printf %s "$2" | base64 -d) || exit 2; ' +
|
|
41
|
+
'bash -c "$c" 2>&1 | python3 -u -c "$p"; exit "${PIPESTATUS[0]}"';
|
|
42
|
+
/**
|
|
43
|
+
* 명령이 실제로 부르는 Windows 프로그램의 파일 이름(소문자). `*.exe`와 낱말 하나인 `powershell`·`pwsh`만 센다.
|
|
44
|
+
* 따옴표 안 언급·주석·heredoc 본문의 글자(`echo "tasklist.exe"`, `cat <<'EOF' … pwsh … EOF`)는 부르는 것이 아니므로 세지 않고,
|
|
45
|
+
* `bash -c '…'`·`$(…)`·`xargs`·`for … do` 안의 호출은 센다.
|
|
46
|
+
*/
|
|
47
|
+
function windowsPrograms(command: string): string[] {
|
|
48
|
+
const programs: string[] = [];
|
|
49
|
+
for (const invoked of invokedCommands(command)) {
|
|
50
|
+
const name = (invoked.replace(/\\/g, "/").split("/").pop() ?? "").toLowerCase();
|
|
51
|
+
if (name.endsWith(".exe") || name === "powershell" || name === "pwsh") programs.push(name);
|
|
52
|
+
}
|
|
53
|
+
return programs;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* bash 따옴표·이스케이프를 따라가며 따옴표 밖의 백그라운드 `&`가 있는지 본다(`&&`·`&>`·`>&`·`<&`·`|&` 제외).
|
|
58
|
+
* 백그라운드 자식이 출력 파이프를 붙잡으면 감싼 호출이 끝나지 않으므로 그런 명령은 감싸지 않는다.
|
|
59
|
+
* 따옴표 안의 `&`(PowerShell 호출 연산자 등)와 `\&`는 bash 연산자가 아니다.
|
|
60
|
+
*/
|
|
61
|
+
function hasBackgroundAmpersand(command: string): boolean {
|
|
62
|
+
let quote: string | undefined;
|
|
63
|
+
for (let index = 0; index < command.length; index++) {
|
|
64
|
+
const char = command[index];
|
|
65
|
+
if (quote === "'") {
|
|
66
|
+
if (char === "'") quote = undefined;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (char === "\\") {
|
|
70
|
+
index++;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (quote === '"') {
|
|
74
|
+
if (char === '"') quote = undefined;
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if (char === "'" || char === '"') {
|
|
78
|
+
quote = char;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (char !== "&") continue;
|
|
82
|
+
const previous = command[index - 1] ?? "";
|
|
83
|
+
const next = command[index + 1] ?? "";
|
|
84
|
+
if (next === "&") {
|
|
85
|
+
index++;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (next === ">" || previous === ">" || previous === "<" || previous === "|") continue;
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface WindowsOutputContext {
|
|
95
|
+
/** WSL에서 Windows 실행 파일을 부를 수 있을 때만 감싼다. */
|
|
96
|
+
wsl: boolean;
|
|
97
|
+
/** 대화형 pty 실행은 감싸지 않는다. */
|
|
98
|
+
pty?: boolean;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Windows 실행 파일을 부르는 bash 명령을, 출력을 UTF-8로 바꿔 내는 명령으로 감싼다. 감쌀 필요가 없거나
|
|
103
|
+
* 감싸면 동작이 달라질 수 있는 명령은 `undefined`를 돌려준다.
|
|
104
|
+
*
|
|
105
|
+
* 감싼 명령은 지속 셸이 아니라 새 bash에서 돌므로, 그 안의 `cd`·변수 대입은 다음 호출로 이어지지 않는다
|
|
106
|
+
* (export된 환경과 작업 폴더는 물려받는다).
|
|
107
|
+
*/
|
|
108
|
+
export function windowsOutputCommand(command: string, context: WindowsOutputContext): string | undefined {
|
|
109
|
+
if (!context.wsl || context.pty) return undefined;
|
|
110
|
+
if (/\biconv\b/.test(command) || hasBackgroundAmpersand(command)) return undefined;
|
|
111
|
+
// `git.exe`는 UTF-8로 내고 /mnt 저장소에서 가장 자주 부르므로, Windows 프로그램이 그것뿐이면 감싸지 않는다.
|
|
112
|
+
const programs = windowsPrograms(command);
|
|
113
|
+
if (programs.every((program) => program === "git.exe")) return undefined;
|
|
114
|
+
const encodedCommand = Buffer.from(command, "utf8").toString("base64");
|
|
115
|
+
const encodedDecoder = Buffer.from(DECODER, "utf8").toString("base64");
|
|
116
|
+
return `bash -c '${RUNNER}' cuelo-windows-output '${encodedCommand}' '${encodedDecoder}'`;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function interopHint(command: string, output: string, context: InteropHintContext = {}): string | undefined {
|
|
120
|
+
const hints: string[] = [];
|
|
121
|
+
if (windowsPrograms(command).length > 0 && !/\biconv\b/.test(command) && MOJIBAKE.test(output)) {
|
|
122
|
+
hints.push(
|
|
123
|
+
"[WSL interop] Windows 프로그램 출력의 한글이 CP949라 깨졌다(�). 자동 UTF-8 변환은 `&` 백그라운드·pty·`iconv`가 든 명령을 감싸지 않는다. 이 결과는 복구할 수 없으니 `| iconv -f cp949 -t utf-8`을 붙여 다시 실행한다. `wsl.exe`는 `WSL_UTF8=1 WSLENV=WSL_UTF8`을 쓴다.",
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
const missing = MISSING_PYTHON_MODULE.exec(output);
|
|
127
|
+
if (missing && context.managedPython && PYTHON_COMMAND.test(command) && !command.includes("python-env/bin/python")) {
|
|
128
|
+
hints.push(
|
|
129
|
+
`[WSL interop] 시스템 python3에는 '${missing[1]}'이 없다. 관리 Python 환경 \`${context.managedPython}\`(eval도 이 환경을 쓴다)으로 다시 실행하고, 그래도 없으면 그 환경에 \`-m pip install\`로 넣는다.`,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
return hints.length > 0 ? hints.join("\n") : undefined;
|
|
133
|
+
}
|