cc-viewer 1.7.23 → 1.8.0
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/README.md +19 -0
- package/cli.js +92 -11
- package/concepts/ar/GlobalSettings.md +2 -2
- package/concepts/da/GlobalSettings.md +2 -2
- package/concepts/de/GlobalSettings.md +2 -2
- package/concepts/en/GlobalSettings.md +2 -2
- package/concepts/es/GlobalSettings.md +2 -2
- package/concepts/fr/GlobalSettings.md +2 -2
- package/concepts/it/GlobalSettings.md +2 -2
- package/concepts/ja/GlobalSettings.md +2 -2
- package/concepts/ko/GlobalSettings.md +2 -2
- package/concepts/no/GlobalSettings.md +2 -2
- package/concepts/pl/GlobalSettings.md +2 -2
- package/concepts/pt-BR/GlobalSettings.md +2 -2
- package/concepts/ru/GlobalSettings.md +2 -2
- package/concepts/th/GlobalSettings.md +2 -2
- package/concepts/tr/GlobalSettings.md +2 -2
- package/concepts/uk/GlobalSettings.md +2 -2
- package/concepts/zh/GlobalSettings.md +2 -2
- package/concepts/zh-TW/GlobalSettings.md +2 -2
- package/dist/assets/{App-CusqoEAB.js → App-CCu0y2Cq.js} +2 -2
- package/dist/assets/{MdxEditorPanel-e5DlfcqJ.js → MdxEditorPanel-BBhgTmDk.js} +1 -1
- package/dist/assets/{Mobile-B8xwCLgr.js → Mobile-vN4lyiaz.js} +1 -1
- package/dist/assets/{ProxyStatsModal-_w677xPM.js → ProxyStatsModal-BOflqr0R.js} +1 -1
- package/dist/assets/index-C3BRHDVF.js +2 -0
- package/dist/assets/seqResourceLoaders-DI0G5nu1.css +41 -0
- package/dist/assets/seqResourceLoaders-DpYqp6SP.js +2 -0
- package/dist/index.html +1 -1
- package/findcc.js +17 -8
- package/node_modules/@ccv/core/package.json +13 -0
- package/{server/lib → node_modules/@ccv/core/src}/approval-modal-prefs.js +1 -1
- package/node_modules/@ccv/core/src/clearCheckpoint.js +7 -0
- package/{src/utils → node_modules/@ccv/core/src}/contentFilter.js +207 -141
- package/{server/lib → node_modules/@ccv/core/src}/context-rules.js +2 -2
- package/{server/lib → node_modules/@ccv/core/src}/delta-reconstructor.js +60 -4
- package/{server/lib → node_modules/@ccv/core/src}/error-report.js +5 -4
- package/{server/lib → node_modules/@ccv/core/src}/session-boundary.js +3 -3
- package/{src/utils → node_modules/@ccv/core/src}/teammateDetector.js +9 -0
- package/{server/lib → node_modules/@ccv/core/src}/tools-xml-formatter.js +3 -3
- package/{server/lib → node_modules/@ccv/core/src}/v2-transcript-normalizer.js +1 -1
- package/{server/lib → node_modules/@ccv/core/src}/voice-pack-events.js +2 -2
- package/package.json +11 -97
- package/server/_paths.js +28 -7
- package/server/i18n.js +60 -0
- package/server/interceptor.js +36 -11
- package/server/lib/adapters/dingtalk-adapter.js +2 -2
- package/server/lib/adapters/discord-adapter.js +2 -2
- package/server/lib/adapters/feishu-adapter.js +2 -2
- package/server/lib/adapters/wecom-adapter.js +2 -2
- package/server/lib/approval-policy.js +29 -0
- package/server/lib/{ask-store.js → ask/ask-store.js} +3 -3
- package/server/lib/{perm-bridge.js → ask/perm-bridge.js} +5 -5
- package/server/lib/chat-queue.js +341 -0
- package/server/lib/cli-inject.js +1 -1
- package/server/lib/context-watcher.js +3 -3
- package/server/lib/create_system_prompt.js +0 -9
- package/server/lib/enrich-plan-input.js +1 -1
- package/server/lib/ensure-hooks.js +2 -2
- package/server/lib/file-access-policy.js +6 -1
- package/server/lib/file-api.js +17 -1
- package/server/lib/{dingtalk-bridge.js → im/dingtalk-bridge.js} +1 -1
- package/server/lib/{im-append-system.js → im/im-append-system.js} +5 -13
- package/server/lib/{im-bridge-core.js → im/im-bridge-core.js} +12 -6
- package/server/lib/{im-config.js → im/im-config.js} +1 -1
- package/server/lib/im/im-deny.js +4 -0
- package/server/lib/{im-lang.js → im/im-lang.js} +1 -1
- package/server/lib/{im-lock.js → im/im-lock.js} +2 -2
- package/server/lib/{im-process-manager.js → im/im-process-manager.js} +1 -1
- package/server/lib/{im-senders.js → im/im-senders.js} +1 -1
- package/server/lib/{im-skills.js → im/im-skills.js} +2 -2
- package/server/lib/interceptor-core.js +8 -5
- package/server/lib/kv-cache-analyzer.js +6 -5
- package/server/lib/launch-config.js +321 -0
- package/server/lib/log-file-utils.js +21 -0
- package/server/lib/log-management.js +6 -17
- package/server/lib/log-stream.js +1 -1
- package/server/lib/log-watcher.js +1 -1
- package/server/lib/model-system-prompts.js +1 -1
- package/server/lib/prefs-store.js +2 -2
- package/server/lib/project-prefs.js +6 -6
- package/server/lib/project-state.js +15 -0
- package/server/lib/{proxy-retry.js → proxy/proxy-retry.js} +2 -2
- package/server/lib/{proxy-stats.js → proxy/proxy-stats.js} +3 -3
- package/server/lib/sdk-adapter.js +6 -74
- package/server/lib/sdk-manager.js +383 -278
- package/server/lib/skills-api.js +1 -1
- package/server/lib/spawn-model-resolver.js +21 -6
- package/server/lib/stats-worker.js +2 -2
- package/server/lib/system-prompt-files.js +11 -10
- package/server/lib/system-prompt-render.js +23 -7
- package/server/lib/system-prompt-snapshots.js +452 -0
- package/server/lib/updater.js +63 -3
- package/server/lib/user-prompt-extract.js +5 -5
- package/server/lib/v2/adapter.js +3 -3
- package/server/lib/v2/conversation-store.js +1 -1
- package/server/lib/v2/convert.js +3 -3
- package/server/lib/v2/jsonl-read.js +1 -1
- package/server/lib/v2/live-feed.js +3 -3
- package/server/lib/v2/meta-rows.js +3 -3
- package/server/lib/v2/replay.js +1 -1
- package/server/lib/v2/session-list.js +1 -1
- package/server/lib/v2/session-owner.js +1 -1
- package/server/lib/v2/v2-writer.js +26 -1
- package/server/lib/v2/verify.js +1 -1
- package/server/lib/voice-pack-manager.js +4 -5
- package/server/lib/wire-compress.js +1 -1
- package/server/proxy.js +5 -5
- package/server/pty-manager.js +282 -184
- package/server/routes/ask-perm.js +1 -1
- package/server/routes/dingtalk.js +3 -3
- package/server/routes/events.js +2 -2
- package/server/routes/im.js +5 -5
- package/server/routes/preferences.js +3 -3
- package/server/routes/workspaces.js +1 -1
- package/server/server.js +207 -58
- package/server/system-prompt-templates/systemPromptModel.md +0 -8
- package/server/system-prompt-templates/systemPromptVariables.ar.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.da.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.de.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.es.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.fr.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.it.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.ja.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.ko.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.no.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.pl.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.pt-BR.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.ru.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.th.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.tr.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.uk.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.zh-TW.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.zh.md +0 -7
- package/dist/assets/index-D6FmFsIz.js +0 -2
- package/dist/assets/seqResourceLoaders-3K77Znll.js +0 -2
- package/dist/assets/seqResourceLoaders-BgD_Rwvc.css +0 -41
- package/src/utils/apiUrl.js +0 -26
- package/src/utils/askFallback.js +0 -21
- package/src/utils/askOptionDesc.js +0 -55
- package/src/utils/askPortalMatcher.js +0 -54
- package/src/utils/autoApproveOptions.js +0 -27
- package/src/utils/avatarAnimationPostPass.js +0 -49
- package/src/utils/builtinPresets.js +0 -18
- package/src/utils/clearCheckpoint.js +0 -7
- package/src/utils/commandValidator.js +0 -45
- package/src/utils/contextRaw.js +0 -18
- package/src/utils/contextSidebarNavigation.js +0 -16
- package/src/utils/contextTurns.js +0 -117
- package/src/utils/displayScaleHelper.js +0 -47
- package/src/utils/effectiveModel.js +0 -17
- package/src/utils/entry-slim.js +0 -563
- package/src/utils/entryCache.js +0 -144
- package/src/utils/errorReport.js +0 -6
- package/src/utils/fileExpandedPathsStorage.js +0 -70
- package/src/utils/fileIcons.jsx +0 -36
- package/src/utils/fileOpen.js +0 -37
- package/src/utils/formatters.js +0 -48
- package/src/utils/gitApi.js +0 -50
- package/src/utils/gitTreeBuilder.js +0 -19
- package/src/utils/helpers.js +0 -854
- package/src/utils/identityHeal.js +0 -108
- package/src/utils/imConnState.js +0 -59
- package/src/utils/imOrigin.js +0 -24
- package/src/utils/imTr.js +0 -7
- package/src/utils/imageCompress.js +0 -83
- package/src/utils/imageDownscale.js +0 -28
- package/src/utils/imageResize.js +0 -112
- package/src/utils/ingestPipeline.js +0 -47
- package/src/utils/isProxyMode.js +0 -11
- package/src/utils/lazyWithReload.js +0 -53
- package/src/utils/markdown.js +0 -30
- package/src/utils/markdownIncremental.js +0 -39
- package/src/utils/markdownProfiler.js +0 -113
- package/src/utils/mdExtensionDetect.js +0 -64
- package/src/utils/memoryLinkParser.js +0 -44
- package/src/utils/modalMask.js +0 -15
- package/src/utils/modelSuggestions.js +0 -48
- package/src/utils/monotime.js +0 -6
- package/src/utils/pinnedMenu.js +0 -55
- package/src/utils/presetShortcuts.js +0 -14
- package/src/utils/projectAlias.js +0 -135
- package/src/utils/promptClassifier.js +0 -112
- package/src/utils/promptDetect.js +0 -196
- package/src/utils/promptNav.js +0 -60
- package/src/utils/ptyChunkBuilder.js +0 -251
- package/src/utils/quickMenuHoverIntent.js +0 -35
- package/src/utils/rateLimitParser.js +0 -119
- package/src/utils/readResultPool.js +0 -106
- package/src/utils/refreshCachedItemProp.js +0 -30
- package/src/utils/resizeCalc.js +0 -21
- package/src/utils/resolveLocalized.js +0 -17
- package/src/utils/searchApi.js +0 -47
- package/src/utils/searchReplace.js +0 -51
- package/src/utils/seqResourceLoaders.js +0 -79
- package/src/utils/sessionManager.js +0 -482
- package/src/utils/sessionMerge.js +0 -239
- package/src/utils/skillModalController.js +0 -111
- package/src/utils/skillsParser.js +0 -116
- package/src/utils/slashCommandLabels.js +0 -80
- package/src/utils/splitDragCalc.js +0 -73
- package/src/utils/stickyBottomController.js +0 -643
- package/src/utils/svgSanitize.js +0 -48
- package/src/utils/systemTags.js +0 -47
- package/src/utils/tClaude.js +0 -20
- package/src/utils/teamModalBuilder.js +0 -351
- package/src/utils/teamSessionParser.js +0 -190
- package/src/utils/teammateAvatars.js +0 -194
- package/src/utils/termDiag.js +0 -114
- package/src/utils/terminalClipboard.js +0 -117
- package/src/utils/terminalWriteQueue.js +0 -398
- package/src/utils/thinkingMerge.js +0 -49
- package/src/utils/toolCatalog.js +0 -30
- package/src/utils/toolResultBuilder.js +0 -411
- package/src/utils/toolResultClassifier.js +0 -16
- package/src/utils/toolResultCore.js +0 -194
- package/src/utils/toolsDiff.js +0 -44
- package/src/utils/toolsXmlFormatter.js +0 -3
- package/src/utils/ultraplanController.js +0 -109
- package/src/utils/ultraplanExperts.js +0 -86
- package/src/utils/ultraplanTemplates.js +0 -154
- package/src/utils/userImageRefs.js +0 -49
- package/src/utils/v3Assembler.js +0 -125
- package/src/utils/v3Rows.js +0 -49
- package/src/utils/voicePackPlayer.js +0 -233
- package/src/utils/webSearchGrouping.js +0 -111
- package/src/utils/workflowFormat.js +0 -52
- package/src/utils/workflowRuns.js +0 -118
- package/src/utils/workflowStore.js +0 -94
- /package/{src/utils → node_modules/@ccv/core/src}/requestType.js +0 -0
- /package/server/lib/{ask-bridge.js → ask/ask-bridge.js} +0 -0
- /package/server/lib/{ask-constants.js → ask/ask-constants.js} +0 -0
- /package/server/lib/{ask-reaper.js → ask/ask-reaper.js} +0 -0
- /package/server/lib/{dingtalk-config.js → im/dingtalk-config.js} +0 -0
- /package/server/lib/{im-log-watcher.js → im/im-log-watcher.js} +0 -0
- /package/server/lib/{proxy-env.js → proxy/proxy-env.js} +0 -0
- /package/server/lib/{proxy-errors.js → proxy/proxy-errors.js} +0 -0
package/dist/index.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
// 整体显示大小已弃用 CSS zoom:Electron 改用 webFrame.setZoomFactor(首屏抢占见
|
|
22
22
|
// electron/tab-content-preload.js),纯浏览器交由用户用浏览器自带快捷键缩放,故此处不再设 zoom。
|
|
23
23
|
</script>
|
|
24
|
-
<script type="module" crossorigin src="./assets/index-
|
|
24
|
+
<script type="module" crossorigin src="./assets/index-C3BRHDVF.js"></script>
|
|
25
25
|
<link rel="modulepreload" crossorigin href="./assets/vendor-antd-CSjy2pdD.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="./assets/vendor-codemirror-Clv6kvI5.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="./assets/vendor-mdxeditor-CtujsSUV.js">
|
package/findcc.js
CHANGED
|
@@ -4,6 +4,7 @@ import { existsSync, realpathSync, readFileSync, readdirSync, statSync, accessSy
|
|
|
4
4
|
import { homedir, tmpdir, arch } from 'node:os';
|
|
5
5
|
import { execSync, execFileSync, spawnSync } from 'node:child_process';
|
|
6
6
|
import { threadId } from 'node:worker_threads';
|
|
7
|
+
import { reportSwallowed } from '@ccv/core/error-report';
|
|
7
8
|
|
|
8
9
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
9
10
|
|
|
@@ -67,7 +68,7 @@ export function getClaudeConfigDir() {
|
|
|
67
68
|
// settings.json, ensure-hooks, ~/.claude/* expansion all derive from this function — when in
|
|
68
69
|
// test mode (node:test injects NODE_TEST_CONTEXT) without an explicit CLAUDE_CONFIG_DIR, always
|
|
69
70
|
// use a process-private temp directory; never resolve to the real ~/.claude.
|
|
70
|
-
// Unit test: test/logdir-test-guard.test.js.
|
|
71
|
+
// Unit test: packages/app/test/logdir-test-guard.test.js.
|
|
71
72
|
if (process.env.NODE_TEST_CONTEXT) {
|
|
72
73
|
return join(tmpdir(), 'cc-viewer-test', `guard-cfg-${process.pid}-${threadId}`);
|
|
73
74
|
}
|
|
@@ -108,7 +109,7 @@ function resolveLogDir() {
|
|
|
108
109
|
// real user data — test cleanup then deleted it (2026-07-12: the user's global system_prompt/
|
|
109
110
|
// entries were wiped this way, twice). Tests may only target disposable temp dirs: anything
|
|
110
111
|
// outside the OS temp root is forced to the private guard dir. Use CCV_LOG_DIR=tmp or a
|
|
111
|
-
// mkdtemp path in tests. Unit test: test/logdir-test-guard.test.js.
|
|
112
|
+
// mkdtemp path in tests. Unit test: packages/app/test/logdir-test-guard.test.js.
|
|
112
113
|
if (process.env.NODE_TEST_CONTEXT && !isDisposableTmpPath(resolved)) {
|
|
113
114
|
console.warn(`[findcc] L1c test-isolation barrier: CCV_LOG_DIR="${raw}" is not under the OS temp dir — forcing a private guard LOG_DIR (tests may only target disposable temp dirs; use CCV_LOG_DIR=tmp or a mkdtemp path)`);
|
|
114
115
|
return join(tmpdir(), 'cc-viewer-test', `guard-${process.pid}-${threadId}`);
|
|
@@ -132,6 +133,15 @@ function resolveLogDir() {
|
|
|
132
133
|
// Uses `let` to support runtime modification via setLogDir() (ES module live binding)
|
|
133
134
|
export let LOG_DIR = resolveLogDir();
|
|
134
135
|
|
|
136
|
+
// Listeners notified synchronously after LOG_DIR changes. findcc is a leaf
|
|
137
|
+
// module and must not import its consumers — dependents (e.g.
|
|
138
|
+
// server/lib/file-access-policy.js) register here instead of findcc importing
|
|
139
|
+
// them (which used to be a lazy dynamic import to dodge the cycle).
|
|
140
|
+
const _logDirListeners = [];
|
|
141
|
+
export function onLogDirChange(listener) {
|
|
142
|
+
if (typeof listener === 'function') _logDirListeners.push(listener);
|
|
143
|
+
}
|
|
144
|
+
|
|
135
145
|
/**
|
|
136
146
|
* Runtime modification of the log storage root directory.
|
|
137
147
|
* Supports ~/... expansion. All modules that reference `LOG_DIR` via `import { LOG_DIR }`
|
|
@@ -146,12 +156,11 @@ export function setLogDir(dir) {
|
|
|
146
156
|
const home = homedir();
|
|
147
157
|
if (!resolved.startsWith(home) && !resolved.startsWith('/tmp/')) return false;
|
|
148
158
|
LOG_DIR = resolved;
|
|
149
|
-
// workspace registry file location changes with LOG_DIR;
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
.catch(() => { /* CLI-only entry points may not have the policy module loaded; side-effect free */ });
|
|
159
|
+
// workspace registry file location changes with LOG_DIR; registered listeners
|
|
160
|
+
// (the allowlist cache in file-access-policy) invalidate their caches.
|
|
161
|
+
for (const listener of _logDirListeners) {
|
|
162
|
+
try { listener(resolved); } catch (err) { reportSwallowed('findcc.logdir-listener', err); }
|
|
163
|
+
}
|
|
155
164
|
return true;
|
|
156
165
|
}
|
|
157
166
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ccv/core",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Shared isomorphic judgment/classification modules for cc-viewer (server + web). Private workspace package; rides into the npm tarball via cc-viewer's bundledDependencies.",
|
|
7
|
+
"exports": {
|
|
8
|
+
"./*": "./src/*.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src/"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// CLIENT-SAFE: no node deps.
|
|
1
|
+
// CLIENT-SAFE: no node deps. Home: @ccv/core (approval-modal-prefs.js) — consumed by apps/web + packages/app. Do not add fs/process/node: imports.
|
|
2
2
|
// Approval-modal preferences merge logic.
|
|
3
3
|
//
|
|
4
4
|
// Lives here (not in voice-pack-manager) because it merges *generic* approvalModal
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Re-export shell — the implementations live in the sibling client-safe module
|
|
2
|
+
// session-boundary.js (wire-v2 step S1) so the server-side conversation router
|
|
3
|
+
// (S2+) and the client use ONE source of truth for session boundaries
|
|
4
|
+
// (docs/refactor/WIRE_FORMAT_V2_PLAN.md). Existing client imports of
|
|
5
|
+
// '@ccv/core/clearCheckpoint' keep working through this shell; new code should
|
|
6
|
+
// import from '@ccv/core/session-boundary' directly.
|
|
7
|
+
export { isPostClearCheckpoint, isCompactContinuation, isSessionBoundary } from './session-boundary.js';
|