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,159 +1,159 @@
|
|
|
1
|
-
import { posix, win32 } from "node:path";
|
|
2
|
-
import type { ExtensionAPI, ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
3
|
-
import { MEMORY_SECRET_PATTERN } from "./lib/memory-excerpt";
|
|
4
|
-
import { onSessionLifecycle } from "./lib/session-identity";
|
|
5
|
-
|
|
6
|
-
// 2026-10-17: 저장 교훈은 첫 턴 recall(`<memories>`)과 요청별 docmap-route로만 닿는다. 파일 경로에 묶인 교훈
|
|
7
|
-
// (예: `setup.ps1 -ValidateOnly`는 배포 전에 먼저 돌린다)은 그 파일을 고치는 순간에 필요한데, 그때는 어디서도 다시 오르지 않는다
|
|
8
|
-
// (doc/history/2026/10/05-memory-application, 10/04-memory-followup). 그래서 `edit`·`write`가 호출될 때 대상 경로로 기억을 찾아
|
|
9
|
-
// 그 도구 호출 직후 다음 모델 요청에 단서로 붙인다(tool_call `additionalContext`, 비차단).
|
|
10
|
-
// 안내는 단서일 뿐이다. 도구를 막지 않고, 기억 검색이 없거나 실패하거나 제한 시간을 넘으면 아무것도 붙이지 않는다.
|
|
11
|
-
//
|
|
12
|
-
// 질의·필터 근거(doc/history/2026/10/17-edit-lessons, 은행 사본 실측): 경로를 담은 교훈 123건·파일 81개에서 질의는 상대 경로 그대로가
|
|
13
|
-
// basename만이나 둘을 이은 것보다 낫거나 같았다(상위 8개 안 91/80/92쌍). 검색 결과의 content는 Mnemopi 회상 미리보기라 500자에서 잘려 오므로
|
|
14
|
-
// 파일명이 뒤쪽에 있는 교훈은 basename 필터에서 빠진다(상위 8의 91쌍 중 35쌍). 그 필터를 풀면 그 경로를 가리키지 않는 교훈이 대부분이 되어
|
|
15
|
-
// (보인 243건 중 169건) 단서가 묻히므로 필터는 유지한다. 본문은 공백만 정리해 미리보기 그대로 싣는다(`<memories>`도 원문을 싣는다).
|
|
16
|
-
|
|
17
|
-
export interface EditLessonsDeps {
|
|
18
|
-
/** 기억 검색 대기 상한. 테스트만 짧게 준다. 기본은 EDIT_LESSONS_SEARCH_TIMEOUT_MS다. */
|
|
19
|
-
searchTimeoutMs?: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** 한 호출의 기억 검색 대기 상한. 넘으면 아무것도 붙이지 않고 도구는 그대로 진행한다. */
|
|
23
|
-
export const EDIT_LESSONS_SEARCH_TIMEOUT_MS = 1_500;
|
|
24
|
-
/** 경로 하나에 붙이는 기억 상한. */
|
|
25
|
-
export const EDIT_LESSONS_PER_PATH = 3;
|
|
26
|
-
const SEARCH_LIMIT = 8;
|
|
27
|
-
const LESSON_SOURCES = new Set(["coding-agent-learn", "coding-agent-retain"]);
|
|
28
|
-
|
|
29
|
-
interface MemoryItem {
|
|
30
|
-
id?: string;
|
|
31
|
-
content: string;
|
|
32
|
-
source?: string;
|
|
33
|
-
timestamp?: string;
|
|
34
|
-
score?: number;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** 입력의 `paths`(문자열 배열)와 `path`를 입력 순서대로 모은다. */
|
|
38
|
-
function inputPaths(input: unknown): string[] {
|
|
39
|
-
if (!input || typeof input !== "object") return [];
|
|
40
|
-
const record = input as Record<string, unknown>;
|
|
41
|
-
const raw: unknown[] = [...(Array.isArray(record.paths) ? record.paths : []), record.path];
|
|
42
|
-
const paths: string[] = [];
|
|
43
|
-
for (const value of raw) {
|
|
44
|
-
if (typeof value !== "string") continue;
|
|
45
|
-
const trimmed = value.trim();
|
|
46
|
-
if (trimmed && !paths.includes(trimmed)) paths.push(trimmed);
|
|
47
|
-
}
|
|
48
|
-
return paths;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* 입력 경로를 cwd 기준으로 정규화한다(역슬래시→`/`, `.`·`..` 정리). cwd 아래면 cwd 기준 `/` 경로, 밖이면 정규화한 절대 경로(`/` 구분).
|
|
53
|
-
* cwd가 없으면 준 문자열을 posix로 정규화만 한다. 같은 파일을 가리키는 다른 표기가 같은 검색·중복 키가 되게 한다.
|
|
54
|
-
*/
|
|
55
|
-
export function relativeTarget(cwd: string | undefined, path: string): string {
|
|
56
|
-
// 호스트 플랫폼이 아니라 cwd(없으면 입력)의 모양으로 경로 규칙을 고른다. Windows 러너에서 POSIX 입력에 드라이브가 붙지 않게 한다.
|
|
57
|
-
const p = /^[A-Za-z]:[\\/]/.test(cwd ?? path) ? win32 : posix;
|
|
58
|
-
const slashed = path.replace(/\\/g, "/");
|
|
59
|
-
if (!cwd) return p.normalize(slashed).replace(/\\/g, "/");
|
|
60
|
-
const abs = p.resolve(cwd, slashed);
|
|
61
|
-
const rel = p.relative(cwd, abs);
|
|
62
|
-
if (!rel || rel === ".." || rel.startsWith(`..${p.sep}`) || p.isAbsolute(rel)) return abs.replace(/\\/g, "/");
|
|
63
|
-
return rel.split(p.sep).join("/");
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/** 검색 결과에서 이 경로에 묶인 교훈 후보만 남긴다(출처·basename 일치·id 필요). 같은 id는 처음 것만 둔다. */
|
|
67
|
-
function lessonItems(items: readonly MemoryItem[], base: string): MemoryItem[] {
|
|
68
|
-
const seen = new Set<string>();
|
|
69
|
-
return items.filter((item) => {
|
|
70
|
-
if (typeof item?.id !== "string" || item.id.length === 0 || seen.has(item.id)) return false;
|
|
71
|
-
if (typeof item.content !== "string" || typeof item.source !== "string" || !LESSON_SOURCES.has(item.source) || !item.content.includes(base)) return false;
|
|
72
|
-
seen.add(item.id);
|
|
73
|
-
return true;
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function createEditLessons(deps: EditLessonsDeps = {}) {
|
|
78
|
-
const searchTimeoutMs = deps.searchTimeoutMs ?? EDIT_LESSONS_SEARCH_TIMEOUT_MS;
|
|
79
|
-
|
|
80
|
-
return function editLessons(pi: ExtensionAPI): void {
|
|
81
|
-
/** 이 세션에서 이미 찾아 본 경로와 이미 붙인(또는 비밀 패턴으로 가린) 기억 id. */
|
|
82
|
-
const lookedUp = new Set<string>();
|
|
83
|
-
const attached = new Set<string>();
|
|
84
|
-
let sessionGeneration = 0;
|
|
85
|
-
const reset = (): void => {
|
|
86
|
-
sessionGeneration++;
|
|
87
|
-
lookedUp.clear();
|
|
88
|
-
attached.clear();
|
|
89
|
-
};
|
|
90
|
-
onSessionLifecycle(pi, { start: reset });
|
|
91
|
-
pi.on("session_shutdown", reset);
|
|
92
|
-
|
|
93
|
-
/** 경로 하나의 후보 기억. 검색 없음·오류·제한 시간·빈 결과는 undefined. */
|
|
94
|
-
const search = async (ctx: ExtensionContext, path: string): Promise<MemoryItem[] | undefined> => {
|
|
95
|
-
const memory = ctx.memory;
|
|
96
|
-
if (!memory) return undefined;
|
|
97
|
-
const controller = new AbortController();
|
|
98
|
-
const { promise: timeout, resolve: expire } = Promise.withResolvers<undefined>();
|
|
99
|
-
const timer = setTimeout(() => {
|
|
100
|
-
controller.abort();
|
|
101
|
-
expire(undefined);
|
|
102
|
-
}, searchTimeoutMs);
|
|
103
|
-
try {
|
|
104
|
-
const result = await Promise.race([memory.search(path, { limit: SEARCH_LIMIT, signal: controller.signal }), timeout]);
|
|
105
|
-
return result?.items?.length ? (result.items as MemoryItem[]) : undefined;
|
|
106
|
-
} catch (error) {
|
|
107
|
-
pi.logger.debug("edit-lessons: 기억 검색 없이 진행", { path, error: error instanceof Error ? error.message : String(error) });
|
|
108
|
-
return undefined;
|
|
109
|
-
} finally {
|
|
110
|
-
clearTimeout(timer);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
pi.on("tool_call", async (event, ctx) => {
|
|
115
|
-
if (event.toolName !== "edit" && event.toolName !== "write") return;
|
|
116
|
-
try {
|
|
117
|
-
// 같은 경로·같은 id는 병렬 호출에서도 한 번만 다루도록 await 전에 표시한다.
|
|
118
|
-
const targets: string[] = [];
|
|
119
|
-
for (const path of inputPaths(event.input)) {
|
|
120
|
-
const target = relativeTarget(ctx.cwd, path);
|
|
121
|
-
if (!target || lookedUp.has(target)) continue;
|
|
122
|
-
lookedUp.add(target);
|
|
123
|
-
targets.push(target);
|
|
124
|
-
}
|
|
125
|
-
if (targets.length === 0) return;
|
|
126
|
-
const generation = sessionGeneration;
|
|
127
|
-
const found = await Promise.all(targets.map((target) => search(ctx, target)));
|
|
128
|
-
// 기다리는 사이 세션이 바뀌었으면(session_start·session_shutdown) 이 결과는 옛 세션 것이라 집합을 건드리지 않고 버린다.
|
|
129
|
-
if (generation !== sessionGeneration) return;
|
|
130
|
-
const sections: string[] = [];
|
|
131
|
-
for (const [index, target] of targets.entries()) {
|
|
132
|
-
const items = found[index];
|
|
133
|
-
if (!items) continue;
|
|
134
|
-
const fresh = lessonItems(items, target.slice(target.lastIndexOf("/") + 1)).filter((item) => !attached.has(item.id!));
|
|
135
|
-
const withheld = fresh.filter((item) => MEMORY_SECRET_PATTERN.test(item.content));
|
|
136
|
-
const shown = fresh.filter((item) => !MEMORY_SECRET_PATTERN.test(item.content))
|
|
137
|
-
.sort((a, b) => (b.score ?? 0) - (a.score ?? 0))
|
|
138
|
-
.slice(0, EDIT_LESSONS_PER_PATH);
|
|
139
|
-
if (shown.length + withheld.length === 0) continue;
|
|
140
|
-
for (const item of [...shown, ...withheld]) attached.add(item.id!);
|
|
141
|
-
const lines = [`[edit-lessons] ${target}에 묶인 기억 ${shown.length + withheld.length}건. 단서일 뿐이며 현재 지시·정본·승인이 우선한다. 원문은 memory://<id>로 읽는다.`];
|
|
142
|
-
for (const item of shown) {
|
|
143
|
-
const date = item.timestamp?.match(/^\d{4}-\d{2}-\d{2}/)?.[0];
|
|
144
|
-
lines.push(`- ${item.content.replace(/\s+/g, " ").trim()} (id: ${item.id}${date ? `, ${date}` : ""})`);
|
|
145
|
-
}
|
|
146
|
-
if (withheld.length > 0) lines.push(`- 비밀 패턴이 있어 보이지 않음: ${withheld.map((item) => item.id).join(", ")}`);
|
|
147
|
-
sections.push(lines.join("\n"));
|
|
148
|
-
}
|
|
149
|
-
if (sections.length === 0) return;
|
|
150
|
-
return { additionalContext: sections.join("\n\n") };
|
|
151
|
-
} catch (error) {
|
|
152
|
-
pi.logger.debug("edit-lessons: 안내 없이 진행", { error: error instanceof Error ? error.message : String(error) });
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export default createEditLessons();
|
|
1
|
+
import { posix, win32 } from "node:path";
|
|
2
|
+
import type { ExtensionAPI, ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
3
|
+
import { MEMORY_SECRET_PATTERN } from "./lib/memory-excerpt";
|
|
4
|
+
import { onSessionLifecycle } from "./lib/session-identity";
|
|
5
|
+
|
|
6
|
+
// 2026-10-17: 저장 교훈은 첫 턴 recall(`<memories>`)과 요청별 docmap-route로만 닿는다. 파일 경로에 묶인 교훈
|
|
7
|
+
// (예: `setup.ps1 -ValidateOnly`는 배포 전에 먼저 돌린다)은 그 파일을 고치는 순간에 필요한데, 그때는 어디서도 다시 오르지 않는다
|
|
8
|
+
// (doc/history/2026/10/05-memory-application, 10/04-memory-followup). 그래서 `edit`·`write`가 호출될 때 대상 경로로 기억을 찾아
|
|
9
|
+
// 그 도구 호출 직후 다음 모델 요청에 단서로 붙인다(tool_call `additionalContext`, 비차단).
|
|
10
|
+
// 안내는 단서일 뿐이다. 도구를 막지 않고, 기억 검색이 없거나 실패하거나 제한 시간을 넘으면 아무것도 붙이지 않는다.
|
|
11
|
+
//
|
|
12
|
+
// 질의·필터 근거(doc/history/2026/10/17-edit-lessons, 은행 사본 실측): 경로를 담은 교훈 123건·파일 81개에서 질의는 상대 경로 그대로가
|
|
13
|
+
// basename만이나 둘을 이은 것보다 낫거나 같았다(상위 8개 안 91/80/92쌍). 검색 결과의 content는 Mnemopi 회상 미리보기라 500자에서 잘려 오므로
|
|
14
|
+
// 파일명이 뒤쪽에 있는 교훈은 basename 필터에서 빠진다(상위 8의 91쌍 중 35쌍). 그 필터를 풀면 그 경로를 가리키지 않는 교훈이 대부분이 되어
|
|
15
|
+
// (보인 243건 중 169건) 단서가 묻히므로 필터는 유지한다. 본문은 공백만 정리해 미리보기 그대로 싣는다(`<memories>`도 원문을 싣는다).
|
|
16
|
+
|
|
17
|
+
export interface EditLessonsDeps {
|
|
18
|
+
/** 기억 검색 대기 상한. 테스트만 짧게 준다. 기본은 EDIT_LESSONS_SEARCH_TIMEOUT_MS다. */
|
|
19
|
+
searchTimeoutMs?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** 한 호출의 기억 검색 대기 상한. 넘으면 아무것도 붙이지 않고 도구는 그대로 진행한다. */
|
|
23
|
+
export const EDIT_LESSONS_SEARCH_TIMEOUT_MS = 1_500;
|
|
24
|
+
/** 경로 하나에 붙이는 기억 상한. */
|
|
25
|
+
export const EDIT_LESSONS_PER_PATH = 3;
|
|
26
|
+
const SEARCH_LIMIT = 8;
|
|
27
|
+
const LESSON_SOURCES = new Set(["coding-agent-learn", "coding-agent-retain"]);
|
|
28
|
+
|
|
29
|
+
interface MemoryItem {
|
|
30
|
+
id?: string;
|
|
31
|
+
content: string;
|
|
32
|
+
source?: string;
|
|
33
|
+
timestamp?: string;
|
|
34
|
+
score?: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** 입력의 `paths`(문자열 배열)와 `path`를 입력 순서대로 모은다. */
|
|
38
|
+
function inputPaths(input: unknown): string[] {
|
|
39
|
+
if (!input || typeof input !== "object") return [];
|
|
40
|
+
const record = input as Record<string, unknown>;
|
|
41
|
+
const raw: unknown[] = [...(Array.isArray(record.paths) ? record.paths : []), record.path];
|
|
42
|
+
const paths: string[] = [];
|
|
43
|
+
for (const value of raw) {
|
|
44
|
+
if (typeof value !== "string") continue;
|
|
45
|
+
const trimmed = value.trim();
|
|
46
|
+
if (trimmed && !paths.includes(trimmed)) paths.push(trimmed);
|
|
47
|
+
}
|
|
48
|
+
return paths;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 입력 경로를 cwd 기준으로 정규화한다(역슬래시→`/`, `.`·`..` 정리). cwd 아래면 cwd 기준 `/` 경로, 밖이면 정규화한 절대 경로(`/` 구분).
|
|
53
|
+
* cwd가 없으면 준 문자열을 posix로 정규화만 한다. 같은 파일을 가리키는 다른 표기가 같은 검색·중복 키가 되게 한다.
|
|
54
|
+
*/
|
|
55
|
+
export function relativeTarget(cwd: string | undefined, path: string): string {
|
|
56
|
+
// 호스트 플랫폼이 아니라 cwd(없으면 입력)의 모양으로 경로 규칙을 고른다. Windows 러너에서 POSIX 입력에 드라이브가 붙지 않게 한다.
|
|
57
|
+
const p = /^[A-Za-z]:[\\/]/.test(cwd ?? path) ? win32 : posix;
|
|
58
|
+
const slashed = path.replace(/\\/g, "/");
|
|
59
|
+
if (!cwd) return p.normalize(slashed).replace(/\\/g, "/");
|
|
60
|
+
const abs = p.resolve(cwd, slashed);
|
|
61
|
+
const rel = p.relative(cwd, abs);
|
|
62
|
+
if (!rel || rel === ".." || rel.startsWith(`..${p.sep}`) || p.isAbsolute(rel)) return abs.replace(/\\/g, "/");
|
|
63
|
+
return rel.split(p.sep).join("/");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** 검색 결과에서 이 경로에 묶인 교훈 후보만 남긴다(출처·basename 일치·id 필요). 같은 id는 처음 것만 둔다. */
|
|
67
|
+
function lessonItems(items: readonly MemoryItem[], base: string): MemoryItem[] {
|
|
68
|
+
const seen = new Set<string>();
|
|
69
|
+
return items.filter((item) => {
|
|
70
|
+
if (typeof item?.id !== "string" || item.id.length === 0 || seen.has(item.id)) return false;
|
|
71
|
+
if (typeof item.content !== "string" || typeof item.source !== "string" || !LESSON_SOURCES.has(item.source) || !item.content.includes(base)) return false;
|
|
72
|
+
seen.add(item.id);
|
|
73
|
+
return true;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function createEditLessons(deps: EditLessonsDeps = {}) {
|
|
78
|
+
const searchTimeoutMs = deps.searchTimeoutMs ?? EDIT_LESSONS_SEARCH_TIMEOUT_MS;
|
|
79
|
+
|
|
80
|
+
return function editLessons(pi: ExtensionAPI): void {
|
|
81
|
+
/** 이 세션에서 이미 찾아 본 경로와 이미 붙인(또는 비밀 패턴으로 가린) 기억 id. */
|
|
82
|
+
const lookedUp = new Set<string>();
|
|
83
|
+
const attached = new Set<string>();
|
|
84
|
+
let sessionGeneration = 0;
|
|
85
|
+
const reset = (): void => {
|
|
86
|
+
sessionGeneration++;
|
|
87
|
+
lookedUp.clear();
|
|
88
|
+
attached.clear();
|
|
89
|
+
};
|
|
90
|
+
onSessionLifecycle(pi, { start: reset });
|
|
91
|
+
pi.on("session_shutdown", reset);
|
|
92
|
+
|
|
93
|
+
/** 경로 하나의 후보 기억. 검색 없음·오류·제한 시간·빈 결과는 undefined. */
|
|
94
|
+
const search = async (ctx: ExtensionContext, path: string): Promise<MemoryItem[] | undefined> => {
|
|
95
|
+
const memory = ctx.memory;
|
|
96
|
+
if (!memory) return undefined;
|
|
97
|
+
const controller = new AbortController();
|
|
98
|
+
const { promise: timeout, resolve: expire } = Promise.withResolvers<undefined>();
|
|
99
|
+
const timer = setTimeout(() => {
|
|
100
|
+
controller.abort();
|
|
101
|
+
expire(undefined);
|
|
102
|
+
}, searchTimeoutMs);
|
|
103
|
+
try {
|
|
104
|
+
const result = await Promise.race([memory.search(path, { limit: SEARCH_LIMIT, signal: controller.signal }), timeout]);
|
|
105
|
+
return result?.items?.length ? (result.items as MemoryItem[]) : undefined;
|
|
106
|
+
} catch (error) {
|
|
107
|
+
pi.logger.debug("edit-lessons: 기억 검색 없이 진행", { path, error: error instanceof Error ? error.message : String(error) });
|
|
108
|
+
return undefined;
|
|
109
|
+
} finally {
|
|
110
|
+
clearTimeout(timer);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
pi.on("tool_call", async (event, ctx) => {
|
|
115
|
+
if (event.toolName !== "edit" && event.toolName !== "write") return;
|
|
116
|
+
try {
|
|
117
|
+
// 같은 경로·같은 id는 병렬 호출에서도 한 번만 다루도록 await 전에 표시한다.
|
|
118
|
+
const targets: string[] = [];
|
|
119
|
+
for (const path of inputPaths(event.input)) {
|
|
120
|
+
const target = relativeTarget(ctx.cwd, path);
|
|
121
|
+
if (!target || lookedUp.has(target)) continue;
|
|
122
|
+
lookedUp.add(target);
|
|
123
|
+
targets.push(target);
|
|
124
|
+
}
|
|
125
|
+
if (targets.length === 0) return;
|
|
126
|
+
const generation = sessionGeneration;
|
|
127
|
+
const found = await Promise.all(targets.map((target) => search(ctx, target)));
|
|
128
|
+
// 기다리는 사이 세션이 바뀌었으면(session_start·session_shutdown) 이 결과는 옛 세션 것이라 집합을 건드리지 않고 버린다.
|
|
129
|
+
if (generation !== sessionGeneration) return;
|
|
130
|
+
const sections: string[] = [];
|
|
131
|
+
for (const [index, target] of targets.entries()) {
|
|
132
|
+
const items = found[index];
|
|
133
|
+
if (!items) continue;
|
|
134
|
+
const fresh = lessonItems(items, target.slice(target.lastIndexOf("/") + 1)).filter((item) => !attached.has(item.id!));
|
|
135
|
+
const withheld = fresh.filter((item) => MEMORY_SECRET_PATTERN.test(item.content));
|
|
136
|
+
const shown = fresh.filter((item) => !MEMORY_SECRET_PATTERN.test(item.content))
|
|
137
|
+
.sort((a, b) => (b.score ?? 0) - (a.score ?? 0))
|
|
138
|
+
.slice(0, EDIT_LESSONS_PER_PATH);
|
|
139
|
+
if (shown.length + withheld.length === 0) continue;
|
|
140
|
+
for (const item of [...shown, ...withheld]) attached.add(item.id!);
|
|
141
|
+
const lines = [`[edit-lessons] ${target}에 묶인 기억 ${shown.length + withheld.length}건. 단서일 뿐이며 현재 지시·정본·승인이 우선한다. 원문은 memory://<id>로 읽는다.`];
|
|
142
|
+
for (const item of shown) {
|
|
143
|
+
const date = item.timestamp?.match(/^\d{4}-\d{2}-\d{2}/)?.[0];
|
|
144
|
+
lines.push(`- ${item.content.replace(/\s+/g, " ").trim()} (id: ${item.id}${date ? `, ${date}` : ""})`);
|
|
145
|
+
}
|
|
146
|
+
if (withheld.length > 0) lines.push(`- 비밀 패턴이 있어 보이지 않음: ${withheld.map((item) => item.id).join(", ")}`);
|
|
147
|
+
sections.push(lines.join("\n"));
|
|
148
|
+
}
|
|
149
|
+
if (sections.length === 0) return;
|
|
150
|
+
return { additionalContext: sections.join("\n\n") };
|
|
151
|
+
} catch (error) {
|
|
152
|
+
pi.logger.debug("edit-lessons: 안내 없이 진행", { error: error instanceof Error ? error.message : String(error) });
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export default createEditLessons();
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent";
|
|
2
|
-
import { onSessionLifecycle } from "./lib/session-identity";
|
|
3
|
-
|
|
4
|
-
// 2026-10-08 사용자 결정: 주장 분류용 JEV 호출과 그 대기(최대 2.5초)를 두지 않는다.
|
|
5
|
-
// 결정론 감지에서 기본 검증 지시만 그 prompt에 붙이고, 사용자 원문은 다시 싣지 않는다.
|
|
6
|
-
const SOURCE = /(?:ChatGPT|GPT(?:[- ]?\d+(?:\.\d+)?)?|6\s*Pro|SHION|샤이온)/i;
|
|
7
|
-
const VERIFY = /(?:맞[어아나](?:요)?\s*[??]?|검증|확인해|사실이야|사실인가|verify|fact.?check)/i;
|
|
8
|
-
const INSTRUCTION =
|
|
9
|
-
"외부 조언은 증거가 아니다. 붙여 넣은 답의 주장을 하나씩 나눠 실제 파일·테스트 결과·CI run·버전·실행 동작을 도구로 확인하고 확인/반박/미확인으로 답하라. 의견·제안은 사실 판정과 구분하라. 이 안내는 승인이나 도구 차단이 아니다.";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* 안내는 그 사용자 prompt의 `before_agent_start` 메시지로만 붙는다. idle 세션에 aside를 보내면
|
|
13
|
-
* 안내만으로 자율 턴이 먼저 열리고, 뒤따르는 사용자 prompt는 실행 중 턴과 부딪혀 거절된다.
|
|
14
|
-
*/
|
|
15
|
-
export default function externalAdviceCheck(pi: ExtensionAPI): void {
|
|
16
|
-
let pendingText: string | undefined;
|
|
17
|
-
onSessionLifecycle(pi, { start: () => { pendingText = undefined; } });
|
|
18
|
-
pi.on("session_shutdown", () => { pendingText = undefined; });
|
|
19
|
-
pi.on("input", (event) => {
|
|
20
|
-
pendingText = undefined;
|
|
21
|
-
if (event.source !== "interactive" && event.source !== "rpc") return;
|
|
22
|
-
const text = event.text;
|
|
23
|
-
if (!VERIFY.test(text)) return;
|
|
24
|
-
const hasSource = SOURCE.test(text);
|
|
25
|
-
const hasStructure = /^\s*(?:#{1,6}\s+|[-*+]\s+|\d+[.)]\s+)/m.test(text);
|
|
26
|
-
const hasSeveralSentences = (text.match(/[.!?。!?](?:\s|$)/g)?.length ?? 0) >= 3;
|
|
27
|
-
if (text.length < 180 || (!hasStructure && !(hasSource && hasSeveralSentences))) return;
|
|
28
|
-
pendingText = text.trim();
|
|
29
|
-
});
|
|
30
|
-
// 정책 경합으로 같은 prompt의 준비가 다시 불릴 수 있으므로 다음 입력 전까지 지우지 않는다.
|
|
31
|
-
// 입력 뒤에 prompt가 열리지 않았으면 이후 내부 prompt는 본문이 달라 안내를 받지 않는다.
|
|
32
|
-
pi.on("before_agent_start", (event) => {
|
|
33
|
-
if (!pendingText || !event.prompt.includes(pendingText)) return;
|
|
34
|
-
return { message: { customType: "external-advice-check", content: INSTRUCTION, display: false, attribution: "agent" } };
|
|
35
|
-
});
|
|
36
|
-
}
|
|
1
|
+
import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent";
|
|
2
|
+
import { onSessionLifecycle } from "./lib/session-identity";
|
|
3
|
+
|
|
4
|
+
// 2026-10-08 사용자 결정: 주장 분류용 JEV 호출과 그 대기(최대 2.5초)를 두지 않는다.
|
|
5
|
+
// 결정론 감지에서 기본 검증 지시만 그 prompt에 붙이고, 사용자 원문은 다시 싣지 않는다.
|
|
6
|
+
const SOURCE = /(?:ChatGPT|GPT(?:[- ]?\d+(?:\.\d+)?)?|6\s*Pro|SHION|샤이온)/i;
|
|
7
|
+
const VERIFY = /(?:맞[어아나](?:요)?\s*[??]?|검증|확인해|사실이야|사실인가|verify|fact.?check)/i;
|
|
8
|
+
const INSTRUCTION =
|
|
9
|
+
"외부 조언은 증거가 아니다. 붙여 넣은 답의 주장을 하나씩 나눠 실제 파일·테스트 결과·CI run·버전·실행 동작을 도구로 확인하고 확인/반박/미확인으로 답하라. 의견·제안은 사실 판정과 구분하라. 이 안내는 승인이나 도구 차단이 아니다.";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 안내는 그 사용자 prompt의 `before_agent_start` 메시지로만 붙는다. idle 세션에 aside를 보내면
|
|
13
|
+
* 안내만으로 자율 턴이 먼저 열리고, 뒤따르는 사용자 prompt는 실행 중 턴과 부딪혀 거절된다.
|
|
14
|
+
*/
|
|
15
|
+
export default function externalAdviceCheck(pi: ExtensionAPI): void {
|
|
16
|
+
let pendingText: string | undefined;
|
|
17
|
+
onSessionLifecycle(pi, { start: () => { pendingText = undefined; } });
|
|
18
|
+
pi.on("session_shutdown", () => { pendingText = undefined; });
|
|
19
|
+
pi.on("input", (event) => {
|
|
20
|
+
pendingText = undefined;
|
|
21
|
+
if (event.source !== "interactive" && event.source !== "rpc") return;
|
|
22
|
+
const text = event.text;
|
|
23
|
+
if (!VERIFY.test(text)) return;
|
|
24
|
+
const hasSource = SOURCE.test(text);
|
|
25
|
+
const hasStructure = /^\s*(?:#{1,6}\s+|[-*+]\s+|\d+[.)]\s+)/m.test(text);
|
|
26
|
+
const hasSeveralSentences = (text.match(/[.!?。!?](?:\s|$)/g)?.length ?? 0) >= 3;
|
|
27
|
+
if (text.length < 180 || (!hasStructure && !(hasSource && hasSeveralSentences))) return;
|
|
28
|
+
pendingText = text.trim();
|
|
29
|
+
});
|
|
30
|
+
// 정책 경합으로 같은 prompt의 준비가 다시 불릴 수 있으므로 다음 입력 전까지 지우지 않는다.
|
|
31
|
+
// 입력 뒤에 prompt가 열리지 않았으면 이후 내부 prompt는 본문이 달라 안내를 받지 않는다.
|
|
32
|
+
pi.on("before_agent_start", (event) => {
|
|
33
|
+
if (!pendingText || !event.prompt.includes(pendingText)) return;
|
|
34
|
+
return { message: { customType: "external-advice-check", content: INSTRUCTION, display: false, attribution: "agent" } };
|
|
35
|
+
});
|
|
36
|
+
}
|