ccjk 13.3.23 → 13.5.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/dist/chunks/auto-bootstrap.mjs +2 -2
- package/dist/chunks/auto-fix.mjs +52 -1
- package/dist/chunks/ccjk-agents.mjs +1 -1
- package/dist/chunks/ccjk-all.mjs +5 -5
- package/dist/chunks/ccjk-hooks.mjs +4 -3
- package/dist/chunks/ccjk-mcp.mjs +1 -1
- package/dist/chunks/ccjk-setup.mjs +3 -3
- package/dist/chunks/ccjk-skills.mjs +3 -2
- package/dist/chunks/ccr.mjs +1 -1
- package/dist/chunks/claude-code-config-manager.mjs +76 -25
- package/dist/chunks/claude-code-incremental-manager.mjs +7 -4
- package/dist/chunks/config2.mjs +33 -16
- package/dist/chunks/constants.mjs +2 -2
- package/dist/chunks/doctor.mjs +1 -1
- package/dist/chunks/init.mjs +2 -2
- package/dist/chunks/mcp.mjs +2 -2
- package/dist/chunks/menu-hierarchical.mjs +1 -1
- package/dist/chunks/notification.mjs +5 -5
- package/dist/chunks/onboarding-wizard.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/plugin.mjs +2 -2
- package/dist/chunks/quick-provider.mjs +6 -1
- package/dist/chunks/remote.mjs +2 -2
- package/dist/chunks/skills-sync.mjs +3 -3
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/status.mjs +26 -0
- package/dist/index.d.mts +241 -60
- package/dist/index.d.ts +241 -60
- package/dist/index.mjs +15 -354
- package/dist/shared/{ccjk.eIn-g1yI.mjs → ccjk.BBizCO6_.mjs} +3 -2
- package/dist/shared/{ccjk.CLUL0pAV.mjs → ccjk.C3YuTovw.mjs} +177 -16
- package/dist/shared/{ccjk.BtB1e5jm.mjs → ccjk.D0g2ABGg.mjs} +3 -3
- package/dist/shared/{ccjk.DRfdq6yl.mjs → ccjk.DypYla6I.mjs} +2 -1
- package/package.json +1 -1
package/dist/chunks/plugin.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import process__default from 'node:process';
|
|
|
2
2
|
import a from './index2.mjs';
|
|
3
3
|
import { Buffer } from 'node:buffer';
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, unlinkSync, readdirSync, statSync, rmSync } from 'node:fs';
|
|
5
|
-
import { CCJK_CLOUD_PLUGINS_DIR, CCJK_CLOUD_PLUGINS_CACHE_DIR, CCJK_CLOUD_PLUGINS_INSTALLED_DIR } from './constants.mjs';
|
|
5
|
+
import { CLOUD_ENDPOINTS, CCJK_CLOUD_PLUGINS_DIR, CCJK_CLOUD_PLUGINS_CACHE_DIR, CCJK_CLOUD_PLUGINS_INSTALLED_DIR } from './constants.mjs';
|
|
6
6
|
import { i18n } from './index5.mjs';
|
|
7
7
|
import { writeFileAtomic } from './fs-operations.mjs';
|
|
8
8
|
import { homedir } from 'node:os';
|
|
@@ -318,7 +318,7 @@ class LocalPluginCache {
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
const DEFAULT_CLOUD_API_URL =
|
|
321
|
+
const DEFAULT_CLOUD_API_URL = `${CLOUD_ENDPOINTS.MAIN.BASE_URL}${CLOUD_ENDPOINTS.MAIN.API_VERSION}/skills`;
|
|
322
322
|
const REQUEST_TIMEOUT = 3e4;
|
|
323
323
|
const MAX_RETRY_ATTEMPTS = 3;
|
|
324
324
|
const RETRY_DELAY = 1e3;
|
|
@@ -2,6 +2,7 @@ import a from './index2.mjs';
|
|
|
2
2
|
import { i as inquirer } from './index3.mjs';
|
|
3
3
|
import ora from './index7.mjs';
|
|
4
4
|
import { c as createApiClient } from '../shared/ccjk.D6ycHbak.mjs';
|
|
5
|
+
import { CLOUD_ENDPOINTS } from './constants.mjs';
|
|
5
6
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
6
7
|
import 'node:readline';
|
|
7
8
|
import 'stream';
|
|
@@ -19,8 +20,12 @@ import 'node:crypto';
|
|
|
19
20
|
import 'buffer';
|
|
20
21
|
import 'string_decoder';
|
|
21
22
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
23
|
+
import './index5.mjs';
|
|
24
|
+
import 'node:fs';
|
|
25
|
+
import 'node:url';
|
|
26
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
22
27
|
|
|
23
|
-
const CLOUD_API_BASE_URL =
|
|
28
|
+
const CLOUD_API_BASE_URL = `${CLOUD_ENDPOINTS.MAIN.BASE_URL}${CLOUD_ENDPOINTS.MAIN.API_VERSION}`;
|
|
24
29
|
const REQUEST_TIMEOUT = 1e4;
|
|
25
30
|
const BUILTIN_PROVIDERS = {
|
|
26
31
|
302: {
|
package/dist/chunks/remote.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { join } from 'node:path';
|
|
|
5
5
|
import { i as inquirer } from './index3.mjs';
|
|
6
6
|
import ora from './index7.mjs';
|
|
7
7
|
import { i18n } from './index5.mjs';
|
|
8
|
-
import { i as isDeviceBound, g as getBindingStatus, b as bindDevice } from '../shared/ccjk.
|
|
8
|
+
import { i as isDeviceBound, g as getBindingStatus, b as bindDevice } from '../shared/ccjk.BBizCO6_.mjs';
|
|
9
9
|
import { l as logger } from '../shared/ccjk.BJMRY2Ra.mjs';
|
|
10
10
|
import 'node:readline';
|
|
11
11
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
@@ -24,7 +24,7 @@ import 'string_decoder';
|
|
|
24
24
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
25
25
|
import 'node:url';
|
|
26
26
|
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
27
|
-
import '../shared/ccjk.
|
|
27
|
+
import '../shared/ccjk.D0g2ABGg.mjs';
|
|
28
28
|
import './constants.mjs';
|
|
29
29
|
import '../shared/ccjk.D6ycHbak.mjs';
|
|
30
30
|
import './fs-operations.mjs';
|
|
@@ -4,8 +4,8 @@ import { getTranslation } from './index5.mjs';
|
|
|
4
4
|
import { createHash } from 'node:crypto';
|
|
5
5
|
import { existsSync, readdirSync, readFileSync, mkdirSync } from 'node:fs';
|
|
6
6
|
import process__default from 'node:process';
|
|
7
|
-
import { a as createGateway } from '../shared/ccjk.
|
|
8
|
-
import { CCJK_SKILLS_DIR, CCJK_CONFIG_DIR } from './constants.mjs';
|
|
7
|
+
import { a as createGateway } from '../shared/ccjk.D0g2ABGg.mjs';
|
|
8
|
+
import { CCJK_SKILLS_DIR, CCJK_CONFIG_DIR, CLOUD_ENDPOINTS } from './constants.mjs';
|
|
9
9
|
import { writeFileAtomic } from './fs-operations.mjs';
|
|
10
10
|
import { readFile, stat } from 'node:fs/promises';
|
|
11
11
|
import { g as getDefaultExportFromCjs } from '../shared/ccjk.BAGoDD49.mjs';
|
|
@@ -5625,7 +5625,7 @@ function extractMetadata(data, filePath) {
|
|
|
5625
5625
|
return metadata;
|
|
5626
5626
|
}
|
|
5627
5627
|
|
|
5628
|
-
process__default.env.CCJK_CLOUD_API_URL ||
|
|
5628
|
+
process__default.env.CCJK_CLOUD_API_URL || `${CLOUD_ENDPOINTS.MAIN.BASE_URL}${CLOUD_ENDPOINTS.MAIN.API_VERSION}`;
|
|
5629
5629
|
const SYNC_STATE_FILE = join(CCJK_CONFIG_DIR, "skills-sync-state.json");
|
|
5630
5630
|
const DEFAULT_TIMEOUT = 3e4;
|
|
5631
5631
|
function loadSyncState() {
|
|
@@ -122,7 +122,7 @@ function getSlashCommands() {
|
|
|
122
122
|
descriptionZh: "\u521B\u5EFA\u914D\u7F6E\u5907\u4EFD",
|
|
123
123
|
category: "system",
|
|
124
124
|
handler: async () => {
|
|
125
|
-
const { backupExistingConfig } = await import('./config2.mjs').then(function (n) { return n.
|
|
125
|
+
const { backupExistingConfig } = await import('./config2.mjs').then(function (n) { return n.j; });
|
|
126
126
|
const backupPath = backupExistingConfig();
|
|
127
127
|
if (backupPath) {
|
|
128
128
|
console.log(a.green(`\u2705 Backup created: ${backupPath}`));
|
package/dist/chunks/status.mjs
CHANGED
|
@@ -207,6 +207,32 @@ function renderClaudeCodeSection(defaults) {
|
|
|
207
207
|
lines.push(` ${label("Features:".padEnd(14))} ${val(features.join(", "))}`);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
+
try {
|
|
211
|
+
const settingsPath = join(homedir(), ".claude", "settings.json");
|
|
212
|
+
if (existsSync(settingsPath)) {
|
|
213
|
+
const data = JSON.parse(readFileSync(settingsPath, "utf-8"));
|
|
214
|
+
const env = data.env || {};
|
|
215
|
+
const haiku = env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
|
|
216
|
+
const sonnet = env.ANTHROPIC_DEFAULT_SONNET_MODEL;
|
|
217
|
+
const opus = env.ANTHROPIC_DEFAULT_OPUS_MODEL;
|
|
218
|
+
const hasAdaptive = Boolean(haiku || sonnet || opus);
|
|
219
|
+
if (data.model && hasAdaptive) {
|
|
220
|
+
lines.push(` ${label("Model:".padEnd(14))} ${a.red(data.model)} ${a.red("(overrides adaptive routing!)")}`);
|
|
221
|
+
lines.push(` ${label("".padEnd(14))} ${a.yellow("Run: ccjk boost --fix-model")}`);
|
|
222
|
+
} else if (hasAdaptive) {
|
|
223
|
+
lines.push(` ${label("Routing:".padEnd(14))} ${a.green("adaptive")}`);
|
|
224
|
+
if (haiku)
|
|
225
|
+
lines.push(` ${label(" Quick:".padEnd(14))} ${val(haiku)}`);
|
|
226
|
+
if (sonnet)
|
|
227
|
+
lines.push(` ${label(" Standard:".padEnd(14))} ${val(sonnet)}`);
|
|
228
|
+
if (opus)
|
|
229
|
+
lines.push(` ${label(" Complex:".padEnd(14))} ${val(opus)}`);
|
|
230
|
+
} else if (data.model) {
|
|
231
|
+
lines.push(` ${label("Model:".padEnd(14))} ${val(data.model)}`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
} catch {
|
|
235
|
+
}
|
|
210
236
|
return lines;
|
|
211
237
|
}
|
|
212
238
|
function renderCompressionMetricsSection(projectHash) {
|
package/dist/index.d.mts
CHANGED
|
@@ -219,7 +219,7 @@ declare function batchAnalyze(projectPaths: string[], config?: Partial<DetectorC
|
|
|
219
219
|
/**
|
|
220
220
|
* MCP Server Configuration
|
|
221
221
|
*/
|
|
222
|
-
interface McpServerConfig {
|
|
222
|
+
interface McpServerConfig$1 {
|
|
223
223
|
type?: 'stdio' | 'http' | 'websocket';
|
|
224
224
|
command?: string;
|
|
225
225
|
args?: string[];
|
|
@@ -267,7 +267,7 @@ interface WorkflowConfig {
|
|
|
267
267
|
/**
|
|
268
268
|
* Union type for all config types
|
|
269
269
|
*/
|
|
270
|
-
type RecommendationConfig = McpServerConfig | SkillConfig | AgentConfig | HookConfig | WorkflowConfig;
|
|
270
|
+
type RecommendationConfig = McpServerConfig$1 | SkillConfig | AgentConfig | HookConfig | WorkflowConfig;
|
|
271
271
|
/**
|
|
272
272
|
* Allowed template parameter default values
|
|
273
273
|
*/
|
|
@@ -579,7 +579,7 @@ interface BatchTemplateResponse$1 {
|
|
|
579
579
|
/**
|
|
580
580
|
* Usage metric type
|
|
581
581
|
*/
|
|
582
|
-
type MetricType = 'template_download' | 'recommendation_shown' | 'recommendation_accepted' | 'analysis_completed' | 'error_occurred';
|
|
582
|
+
type MetricType = 'template_download' | 'recommendation_shown' | 'recommendation_accepted' | 'analysis_completed' | 'error_occurred' | 'command_run' | (string & {});
|
|
583
583
|
/**
|
|
584
584
|
* Usage report payload
|
|
585
585
|
*/
|
|
@@ -596,6 +596,10 @@ interface UsageReport {
|
|
|
596
596
|
nodeVersion: string;
|
|
597
597
|
/** Operating system */
|
|
598
598
|
platform: string;
|
|
599
|
+
/** Stable device identifier */
|
|
600
|
+
deviceId?: string;
|
|
601
|
+
/** Client version reported to analytics endpoints */
|
|
602
|
+
clientVersion?: string;
|
|
599
603
|
/** Project language if applicable */
|
|
600
604
|
language?: string;
|
|
601
605
|
/** Additional context data - use TelemetryEventData from dto.ts for strict typing */
|
|
@@ -679,10 +683,22 @@ interface CloudClientConfig {
|
|
|
679
683
|
maxRetries?: number;
|
|
680
684
|
/** Enable telemetry reporting */
|
|
681
685
|
enableTelemetry?: boolean;
|
|
686
|
+
/** Enable client usage analytics endpoints */
|
|
687
|
+
enableUsageAnalytics?: boolean;
|
|
682
688
|
/** API key if required */
|
|
683
689
|
apiKey?: string;
|
|
684
690
|
/** Language for API responses */
|
|
685
691
|
language?: string;
|
|
692
|
+
/** Stable device token for analytics/auth headers */
|
|
693
|
+
deviceToken?: string;
|
|
694
|
+
/** Stable device ID for usage analytics dedupe */
|
|
695
|
+
deviceId?: string;
|
|
696
|
+
/** Stable anonymous installation/user ID */
|
|
697
|
+
anonymousUserId?: string;
|
|
698
|
+
/** Override analytics platform label */
|
|
699
|
+
platform?: string;
|
|
700
|
+
/** Automatically send startup handshake on initialization */
|
|
701
|
+
autoHandshake?: boolean;
|
|
686
702
|
}
|
|
687
703
|
/**
|
|
688
704
|
* Cache entry metadata
|
|
@@ -723,6 +739,43 @@ interface TelemetryConfig {
|
|
|
723
739
|
/** Anonymous user ID */
|
|
724
740
|
userId?: string;
|
|
725
741
|
}
|
|
742
|
+
interface ClientIdentity {
|
|
743
|
+
deviceId: string;
|
|
744
|
+
anonymousUserId: string;
|
|
745
|
+
clientVersion: string;
|
|
746
|
+
platform: string;
|
|
747
|
+
deviceToken?: string;
|
|
748
|
+
}
|
|
749
|
+
interface DeviceRegistrationRequest {
|
|
750
|
+
deviceId: string;
|
|
751
|
+
platform: string;
|
|
752
|
+
clientVersion: string;
|
|
753
|
+
}
|
|
754
|
+
interface DeviceRegistrationResponse {
|
|
755
|
+
success: boolean;
|
|
756
|
+
requestId?: string;
|
|
757
|
+
message?: string;
|
|
758
|
+
}
|
|
759
|
+
interface HandshakeRequest {
|
|
760
|
+
deviceId: string;
|
|
761
|
+
platform: string;
|
|
762
|
+
clientVersion: string;
|
|
763
|
+
}
|
|
764
|
+
interface HandshakeResponse {
|
|
765
|
+
success: boolean;
|
|
766
|
+
requestId?: string;
|
|
767
|
+
message?: string;
|
|
768
|
+
}
|
|
769
|
+
interface SyncRequest {
|
|
770
|
+
deviceId: string;
|
|
771
|
+
platform: string;
|
|
772
|
+
clientVersion: string;
|
|
773
|
+
}
|
|
774
|
+
interface SyncResponse {
|
|
775
|
+
success: boolean;
|
|
776
|
+
requestId?: string;
|
|
777
|
+
message?: string;
|
|
778
|
+
}
|
|
726
779
|
|
|
727
780
|
/**
|
|
728
781
|
* Cloud Client Implementation
|
|
@@ -739,7 +792,14 @@ interface TelemetryConfig {
|
|
|
739
792
|
declare class CloudClient {
|
|
740
793
|
private fetch;
|
|
741
794
|
private config;
|
|
795
|
+
private identity;
|
|
742
796
|
constructor(config: CloudClientConfig);
|
|
797
|
+
private getDefaultHeaders;
|
|
798
|
+
private resolveIdentity;
|
|
799
|
+
private loadOrCreateStoredIdentity;
|
|
800
|
+
private buildAnalyticsPayload;
|
|
801
|
+
private canSendUsageAnalytics;
|
|
802
|
+
getIdentity(): ClientIdentity;
|
|
743
803
|
/**
|
|
744
804
|
* Calculate retry delay with exponential backoff
|
|
745
805
|
*/
|
|
@@ -812,6 +872,9 @@ declare class CloudClient {
|
|
|
812
872
|
* Get current configuration
|
|
813
873
|
*/
|
|
814
874
|
getConfig(): CloudClientConfig;
|
|
875
|
+
registerDevice(payload?: Partial<DeviceRegistrationRequest>): Promise<DeviceRegistrationResponse>;
|
|
876
|
+
handshake(payload?: Partial<HandshakeRequest>): Promise<HandshakeResponse>;
|
|
877
|
+
syncClientUsage(payload?: Partial<SyncRequest>): Promise<SyncResponse>;
|
|
815
878
|
}
|
|
816
879
|
/**
|
|
817
880
|
* Create a default cloud client instance
|
|
@@ -929,59 +992,6 @@ declare class CachedCloudClient {
|
|
|
929
992
|
getClient(): CloudClient;
|
|
930
993
|
}
|
|
931
994
|
|
|
932
|
-
type HookType = 'pre-commit' | 'post-commit' | 'pre-push' | 'post-push' | 'pre-test' | 'post-test' | 'pre-build' | 'post-build' | 'pre-install' | 'post-install' | 'pre-start' | 'post-start' | 'custom';
|
|
933
|
-
type HookCategory = 'pre-commit' | 'post-test' | 'lifecycle' | 'custom';
|
|
934
|
-
interface HookTrigger {
|
|
935
|
-
matcher: string;
|
|
936
|
-
condition?: string;
|
|
937
|
-
parameters?: Record<string, any>;
|
|
938
|
-
}
|
|
939
|
-
interface HookAction {
|
|
940
|
-
command: string;
|
|
941
|
-
args?: string[];
|
|
942
|
-
workingDirectory?: string;
|
|
943
|
-
environment?: Record<string, string>;
|
|
944
|
-
timeout?: number;
|
|
945
|
-
}
|
|
946
|
-
interface HookMetadata {
|
|
947
|
-
version?: string;
|
|
948
|
-
author?: string;
|
|
949
|
-
tags?: string[];
|
|
950
|
-
projectTypes?: string[];
|
|
951
|
-
created?: string;
|
|
952
|
-
updated?: string;
|
|
953
|
-
ccjkVersion?: string;
|
|
954
|
-
}
|
|
955
|
-
interface HookTemplate {
|
|
956
|
-
name: string;
|
|
957
|
-
description: string;
|
|
958
|
-
type: HookType;
|
|
959
|
-
category: HookCategory;
|
|
960
|
-
projectTypes: string[];
|
|
961
|
-
trigger: HookTrigger;
|
|
962
|
-
action: HookAction;
|
|
963
|
-
enabled: boolean;
|
|
964
|
-
priority: number;
|
|
965
|
-
metadata?: HookMetadata;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/**
|
|
969
|
-
* Get hook recommendations from cloud service
|
|
970
|
-
*/
|
|
971
|
-
declare function getCloudRecommendedHooks(projectInfo: ProjectAnalysis, options?: {
|
|
972
|
-
includeCommunity?: boolean;
|
|
973
|
-
includePremium?: boolean;
|
|
974
|
-
limit?: number;
|
|
975
|
-
}): Promise<HookTemplate[]>;
|
|
976
|
-
/**
|
|
977
|
-
* Submit hook usage analytics
|
|
978
|
-
*/
|
|
979
|
-
declare function submitHookAnalytics(hookName: string, projectInfo: ProjectAnalysis, result: 'installed' | 'skipped' | 'error'): Promise<void>;
|
|
980
|
-
/**
|
|
981
|
-
* Get popular hooks from community
|
|
982
|
-
*/
|
|
983
|
-
declare function getCommunityHooks(limit?: number, category?: string): Promise<HookTemplate[]>;
|
|
984
|
-
|
|
985
995
|
/**
|
|
986
996
|
* Agent Template Loader
|
|
987
997
|
*
|
|
@@ -2648,6 +2658,9 @@ declare class FallbackCloudClient {
|
|
|
2648
2658
|
* Report usage (no fallback)
|
|
2649
2659
|
*/
|
|
2650
2660
|
reportUsage(report: UsageReport): Promise<UsageReportResponse>;
|
|
2661
|
+
registerDevice(payload?: Partial<DeviceRegistrationRequest>): Promise<DeviceRegistrationResponse>;
|
|
2662
|
+
handshake(payload?: Partial<HandshakeRequest>): Promise<HandshakeResponse>;
|
|
2663
|
+
syncClientUsage(payload?: Partial<SyncRequest>): Promise<SyncResponse>;
|
|
2651
2664
|
/**
|
|
2652
2665
|
* Health check (no fallback)
|
|
2653
2666
|
*/
|
|
@@ -3812,6 +3825,161 @@ declare const AI_OUTPUT_LANGUAGES: {
|
|
|
3812
3825
|
};
|
|
3813
3826
|
type AiOutputLanguage = keyof typeof AI_OUTPUT_LANGUAGES;
|
|
3814
3827
|
|
|
3828
|
+
/**
|
|
3829
|
+
* Claude Code settings.json configuration types
|
|
3830
|
+
* Supports Claude Code CLI 2.0-2.1 configuration schema
|
|
3831
|
+
*/
|
|
3832
|
+
/**
|
|
3833
|
+
* StatusLine configuration for Claude Code
|
|
3834
|
+
*/
|
|
3835
|
+
interface StatusLineConfig {
|
|
3836
|
+
type: 'command';
|
|
3837
|
+
command: string;
|
|
3838
|
+
padding?: number;
|
|
3839
|
+
}
|
|
3840
|
+
/**
|
|
3841
|
+
* Thinking configuration for Claude Code CLI 2.0+
|
|
3842
|
+
*/
|
|
3843
|
+
interface ThinkingConfig {
|
|
3844
|
+
/** Enable extended thinking mode */
|
|
3845
|
+
enabled?: boolean;
|
|
3846
|
+
/** Budget tokens for thinking (default: 10240) */
|
|
3847
|
+
budgetTokens?: number;
|
|
3848
|
+
}
|
|
3849
|
+
/**
|
|
3850
|
+
* File suggestion configuration for Claude Code CLI 2.0+
|
|
3851
|
+
*/
|
|
3852
|
+
interface FileSuggestionConfig {
|
|
3853
|
+
/** Command to run for file suggestions (e.g., 'git', 'grep') */
|
|
3854
|
+
command?: string;
|
|
3855
|
+
}
|
|
3856
|
+
/**
|
|
3857
|
+
* Claude Code CLI 2.0-2.1 settings.json configuration
|
|
3858
|
+
* Extends the legacy configuration with new fields
|
|
3859
|
+
*/
|
|
3860
|
+
interface ClaudeSettings {
|
|
3861
|
+
/** Model configuration: built-in aliases or a full Claude model name. */
|
|
3862
|
+
model?: string;
|
|
3863
|
+
/** Environment variables for API configuration */
|
|
3864
|
+
env?: {
|
|
3865
|
+
ANTHROPIC_API_KEY?: string;
|
|
3866
|
+
ANTHROPIC_AUTH_TOKEN?: string;
|
|
3867
|
+
ANTHROPIC_BASE_URL?: string;
|
|
3868
|
+
ANTHROPIC_MODEL?: string;
|
|
3869
|
+
ANTHROPIC_SMALL_FAST_MODEL?: string;
|
|
3870
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL?: string;
|
|
3871
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL?: string;
|
|
3872
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL?: string;
|
|
3873
|
+
[key: string]: string | undefined;
|
|
3874
|
+
};
|
|
3875
|
+
/** Permissions configuration */
|
|
3876
|
+
permissions?: {
|
|
3877
|
+
allow?: string[];
|
|
3878
|
+
deny?: string[];
|
|
3879
|
+
};
|
|
3880
|
+
/** Chat configuration */
|
|
3881
|
+
chat?: {
|
|
3882
|
+
alwaysApprove?: string[];
|
|
3883
|
+
};
|
|
3884
|
+
/** Experimental features configuration */
|
|
3885
|
+
experimental?: {
|
|
3886
|
+
[key: string]: any;
|
|
3887
|
+
};
|
|
3888
|
+
/** Status line configuration */
|
|
3889
|
+
statusLine?: StatusLineConfig;
|
|
3890
|
+
/** Output style for AI responses (legacy CCJK field) */
|
|
3891
|
+
outputStyle?: string;
|
|
3892
|
+
/** Response language for AI (e.g., "japanese", "chinese", "english") */
|
|
3893
|
+
language?: string;
|
|
3894
|
+
/** Custom directory for storing plans */
|
|
3895
|
+
plansDirectory?: string;
|
|
3896
|
+
/** Enable auto mode for MCP tool search */
|
|
3897
|
+
toolSearchAutoMode?: boolean;
|
|
3898
|
+
/** Show duration for each turn in conversation */
|
|
3899
|
+
showTurnDuration?: boolean;
|
|
3900
|
+
/** Respect .gitignore file for file operations */
|
|
3901
|
+
respectGitignore?: boolean;
|
|
3902
|
+
/** MCP auto-enable threshold configuration */
|
|
3903
|
+
auto?: {
|
|
3904
|
+
/** Number of uses before auto-enabling an MCP server (default: 5) */
|
|
3905
|
+
mcp?: number;
|
|
3906
|
+
};
|
|
3907
|
+
/** Default agent for Claude Code CLI 2.0+ */
|
|
3908
|
+
agent?: string;
|
|
3909
|
+
/** Extended thinking configuration */
|
|
3910
|
+
thinking?: ThinkingConfig;
|
|
3911
|
+
/** File suggestion configuration */
|
|
3912
|
+
fileSuggestion?: FileSuggestionConfig;
|
|
3913
|
+
/** Allow unsandboxed commands (dangerous) */
|
|
3914
|
+
allowUnsandboxedCommands?: boolean;
|
|
3915
|
+
/** List of disallowed tools */
|
|
3916
|
+
disallowedTools?: string[];
|
|
3917
|
+
/** Attribution string for responses */
|
|
3918
|
+
attribution?: string;
|
|
3919
|
+
/** Index configuration for context management */
|
|
3920
|
+
index?: {
|
|
3921
|
+
/** Maximum number of files to index */
|
|
3922
|
+
maxFiles?: number;
|
|
3923
|
+
/** Maximum file size to index (in bytes) */
|
|
3924
|
+
maxFileSize?: number;
|
|
3925
|
+
};
|
|
3926
|
+
/** Allow/deny browser automation */
|
|
3927
|
+
allowBrowser?: boolean;
|
|
3928
|
+
/** Session configuration */
|
|
3929
|
+
session?: {
|
|
3930
|
+
/** Auto-naming pattern for sessions */
|
|
3931
|
+
autoNaming?: 'branch' | 'timestamp' | 'prompt' | 'off';
|
|
3932
|
+
/** Session persistence directory */
|
|
3933
|
+
directory?: string;
|
|
3934
|
+
/** Auto-save interval in seconds */
|
|
3935
|
+
autoSaveInterval?: number;
|
|
3936
|
+
};
|
|
3937
|
+
/** Background tasks configuration */
|
|
3938
|
+
backgroundTasks?: {
|
|
3939
|
+
/** Maximum concurrent background tasks */
|
|
3940
|
+
maxConcurrent?: number;
|
|
3941
|
+
/** Storage directory for task data */
|
|
3942
|
+
storageDir?: string;
|
|
3943
|
+
/** Default task timeout in milliseconds */
|
|
3944
|
+
defaultTimeout?: number;
|
|
3945
|
+
};
|
|
3946
|
+
/** Teleport configuration for remote sessions */
|
|
3947
|
+
teleport?: {
|
|
3948
|
+
/** Enable teleport feature */
|
|
3949
|
+
enabled?: boolean;
|
|
3950
|
+
/** Custom endpoint for teleport service */
|
|
3951
|
+
endpoint?: string;
|
|
3952
|
+
/** API key for remote service */
|
|
3953
|
+
apiKey?: string;
|
|
3954
|
+
/** Session expiration in days */
|
|
3955
|
+
expirationDays?: number;
|
|
3956
|
+
};
|
|
3957
|
+
/** Output format configuration */
|
|
3958
|
+
output?: {
|
|
3959
|
+
/** Format for responses */
|
|
3960
|
+
format?: 'text' | 'markdown' | 'json';
|
|
3961
|
+
/** Include timestamps */
|
|
3962
|
+
timestamps?: boolean;
|
|
3963
|
+
/** Include source attribution */
|
|
3964
|
+
attribution?: boolean;
|
|
3965
|
+
};
|
|
3966
|
+
/** Hooks configuration for lifecycle events */
|
|
3967
|
+
hooks?: Record<string, unknown[]>;
|
|
3968
|
+
/** MCP servers configuration (legacy field, now in config.json) */
|
|
3969
|
+
mcpServers?: Record<string, McpServerConfig>;
|
|
3970
|
+
/** Additional unknown fields for forward compatibility */
|
|
3971
|
+
[key: string]: any;
|
|
3972
|
+
}
|
|
3973
|
+
/**
|
|
3974
|
+
* MCP server configuration (shared between settings.json and config.json)
|
|
3975
|
+
*/
|
|
3976
|
+
interface McpServerConfig {
|
|
3977
|
+
type: 'stdio' | 'sse';
|
|
3978
|
+
command?: string;
|
|
3979
|
+
args?: string[];
|
|
3980
|
+
url?: string;
|
|
3981
|
+
env?: Record<string, string>;
|
|
3982
|
+
}
|
|
3815
3983
|
/**
|
|
3816
3984
|
* API configuration for Claude Code
|
|
3817
3985
|
*/
|
|
@@ -3831,6 +3999,17 @@ declare function configureApi(apiConfig: ApiConfig | null): ApiConfig | null;
|
|
|
3831
3999
|
*/
|
|
3832
4000
|
declare function configureHooks(hooks: Record<string, unknown[]>): void;
|
|
3833
4001
|
declare function mergeConfigs(sourceFile: string, targetFile: string): void;
|
|
4002
|
+
interface ModelConfigOverride {
|
|
4003
|
+
primaryModel?: string;
|
|
4004
|
+
haikuModel?: string;
|
|
4005
|
+
sonnetModel?: string;
|
|
4006
|
+
opusModel?: string;
|
|
4007
|
+
}
|
|
4008
|
+
/**
|
|
4009
|
+
* Hard-overwrite all model-related settings in memory.
|
|
4010
|
+
* This keeps profile apply/edit behavior deterministic and removes stale model state.
|
|
4011
|
+
*/
|
|
4012
|
+
declare function overwriteModelSettings(settings: ClaudeSettings, { primaryModel, haikuModel, sonnetModel, opusModel, }: ModelConfigOverride, mode?: 'reset' | 'override'): ClaudeSettings;
|
|
3834
4013
|
/**
|
|
3835
4014
|
* Update custom model configuration using settings.model plus family-specific env overrides
|
|
3836
4015
|
* @param primaryModel - Primary model name for general tasks
|
|
@@ -3882,6 +4061,7 @@ declare function switchToOfficialLogin(): boolean;
|
|
|
3882
4061
|
declare function promptApiConfigurationAction(): Promise<'modify-partial' | 'modify-all' | 'keep-existing' | null>;
|
|
3883
4062
|
|
|
3884
4063
|
type config_ApiConfig = ApiConfig;
|
|
4064
|
+
type config_ModelConfigOverride = ModelConfigOverride;
|
|
3885
4065
|
declare const config_applyAiLanguageDirective: typeof applyAiLanguageDirective;
|
|
3886
4066
|
declare const config_backupExistingConfig: typeof backupExistingConfig;
|
|
3887
4067
|
declare const config_configureApi: typeof configureApi;
|
|
@@ -3893,13 +4073,14 @@ declare const config_getExistingCustomModelConfig: typeof getExistingCustomModel
|
|
|
3893
4073
|
declare const config_getExistingModelConfig: typeof getExistingModelConfig;
|
|
3894
4074
|
declare const config_mergeConfigs: typeof mergeConfigs;
|
|
3895
4075
|
declare const config_mergeSettingsFile: typeof mergeSettingsFile;
|
|
4076
|
+
declare const config_overwriteModelSettings: typeof overwriteModelSettings;
|
|
3896
4077
|
declare const config_promptApiConfigurationAction: typeof promptApiConfigurationAction;
|
|
3897
4078
|
declare const config_switchToOfficialLogin: typeof switchToOfficialLogin;
|
|
3898
4079
|
declare const config_updateCustomModel: typeof updateCustomModel;
|
|
3899
4080
|
declare const config_updateDefaultModel: typeof updateDefaultModel;
|
|
3900
4081
|
declare namespace config {
|
|
3901
|
-
export { config_applyAiLanguageDirective as applyAiLanguageDirective, config_backupExistingConfig as backupExistingConfig, config_configureApi as configureApi, config_configureHooks as configureHooks, config_copyConfigFiles as copyConfigFiles, config_ensureClaudeDir as ensureClaudeDir, config_getExistingApiConfig as getExistingApiConfig, config_getExistingCustomModelConfig as getExistingCustomModelConfig, config_getExistingModelConfig as getExistingModelConfig, config_mergeConfigs as mergeConfigs, config_mergeSettingsFile as mergeSettingsFile, config_promptApiConfigurationAction as promptApiConfigurationAction, config_switchToOfficialLogin as switchToOfficialLogin, config_updateCustomModel as updateCustomModel, config_updateDefaultModel as updateDefaultModel };
|
|
3902
|
-
export type { config_ApiConfig as ApiConfig };
|
|
4082
|
+
export { config_applyAiLanguageDirective as applyAiLanguageDirective, config_backupExistingConfig as backupExistingConfig, config_configureApi as configureApi, config_configureHooks as configureHooks, config_copyConfigFiles as copyConfigFiles, config_ensureClaudeDir as ensureClaudeDir, config_getExistingApiConfig as getExistingApiConfig, config_getExistingCustomModelConfig as getExistingCustomModelConfig, config_getExistingModelConfig as getExistingModelConfig, config_mergeConfigs as mergeConfigs, config_mergeSettingsFile as mergeSettingsFile, config_overwriteModelSettings as overwriteModelSettings, config_promptApiConfigurationAction as promptApiConfigurationAction, config_switchToOfficialLogin as switchToOfficialLogin, config_updateCustomModel as updateCustomModel, config_updateDefaultModel as updateDefaultModel };
|
|
4083
|
+
export type { config_ApiConfig as ApiConfig, config_ModelConfigOverride as ModelConfigOverride };
|
|
3903
4084
|
}
|
|
3904
4085
|
|
|
3905
4086
|
/**
|
|
@@ -5397,5 +5578,5 @@ declare function assertDefined<T>(value: T | null | undefined, message?: string)
|
|
|
5397
5578
|
*/
|
|
5398
5579
|
declare function assert(condition: boolean, message?: string): asserts condition;
|
|
5399
5580
|
|
|
5400
|
-
export { AiderTool, BaseCodeTool, BaseError, CachedCloudClient, ClaudeCodeTool, ClineTool, CloudCache, CloudClient, CloudClientError, CloudError, CloudErrorCode, CloudErrorFactory, CodexTool, ConfigManager, ConfigValidator, ConfigurationError, ContinueTool, CursorTool, FallbackCloudClient, InternalError, Logger, Mutex, NotFoundError, ProjectAnalyzer, RatingsApiError, RatingsApiErrorCode, RetryableCloudClient, Semaphore, TelemetryReporter, TemplatesClient, TimeoutError, ToolFactory, ToolRegistry, UnauthorizedError, ValidationError, analyzeDependencies, analyzeProject, index$6 as array, assert, assertDefined, index$5 as async, batchAnalyze, batchProcessFiles, camelCase, canInstallMore, capitalize, chunk, index$4 as command, commandExists$1 as commandExists, config, convertBatchTemplateResponse, convertConfig, convertParameterDefault, convertProjectAnalysisResponse, convertRecommendation, convertTemplate, convertTemplateParameter, copyFile, countLines, createCloudClient, createCompleteCloudClient, createConfigManager, createLogger, createRating, createTemplatesClient, createTool, createValidator, debounce, deepClone, deepMerge, deleteDir, deleteFile, detectProject, detectProjectType, difference, ensureDir, index$3 as error, executeCommand, executeCommandStream, exists, extractDisplayName, extractString, flatten, flatten$1 as flattenArray, formatError, formatErrorForLogging, index$2 as fs, generateCompactWelcome, generateRecommendations, generateWelcome, get, getArchitecture, getCacheDir, getCapabilitiesByType, getCapability, getCloudMcpRecommendations, getCloudRecommendations,
|
|
5401
|
-
export type { AgentConfig, AnalysisCompletedData, AnalysisMetadata, AuthRequestOptions, BatchTelemetryData, BatchTemplateRequest, BatchTemplateResponse$1 as BatchTemplateResponse, BuildSystem, CacheEntry, Capability, CapabilityScanResult, CapabilityStatus, CapabilityType, ChunkProcessorOptions, CloudErrorMetadata, CreateRatingData, CreateRatingResponse, DependencyAnalysis, DependencyConflict, DependencyNode, DependencyType, DetectorConfig, ErrorOccurredData, ExecutionResult, FileInfo, FrameworkDetectionResult, GetSkillRatingsParams, GetSkillRatingsResponse, HealthCheckResponse, HookConfig, IChatTool, ICodeGenTool, ICodeTool, IFileEditTool, InstallStatus, InstallationCommands, InstallationPlan, LanguageDetection, McpServerConfig, MetricType, MultilingualString, PackageManager, ProjectAnalysis, ProjectAnalysisRequest, ProjectAnalysisResponse, RatingSortOption, RawBatchTemplateResponse, RawProjectAnalysisResponse, RawRecommendation, RawTemplate, Recommendation, RecommendationAcceptedData, RecommendationConfig, RecommendationShownData, SkillConfig, StreamProcessorOptions, TelemetryEventData, TemplateDownloadData, TemplateParameter, TemplateParameterValue, TemplateResponse, TemplateType$1 as TemplateType, ToolCapabilities, ToolConfig, ToolMetadata, UsageReport, UsageReportResponse, WelcomeOptions, WorkflowConfig };
|
|
5581
|
+
export { AiderTool, BaseCodeTool, BaseError, CachedCloudClient, ClaudeCodeTool, ClineTool, CloudCache, CloudClient, CloudClientError, CloudError, CloudErrorCode, CloudErrorFactory, CodexTool, ConfigManager, ConfigValidator, ConfigurationError, ContinueTool, CursorTool, FallbackCloudClient, InternalError, Logger, Mutex, NotFoundError, ProjectAnalyzer, RatingsApiError, RatingsApiErrorCode, RetryableCloudClient, Semaphore, TelemetryReporter, TemplatesClient, TimeoutError, ToolFactory, ToolRegistry, UnauthorizedError, ValidationError, analyzeDependencies, analyzeProject, index$6 as array, assert, assertDefined, index$5 as async, batchAnalyze, batchProcessFiles, camelCase, canInstallMore, capitalize, chunk, index$4 as command, commandExists$1 as commandExists, config, convertBatchTemplateResponse, convertConfig, convertParameterDefault, convertProjectAnalysisResponse, convertRecommendation, convertTemplate, convertTemplateParameter, copyFile, countLines, createCloudClient, createCompleteCloudClient, createConfigManager, createLogger, createRating, createTemplatesClient, createTool, createValidator, debounce, deepClone, deepMerge, deleteDir, deleteFile, detectProject, detectProjectType, difference, ensureDir, index$3 as error, executeCommand, executeCommandStream, exists, extractDisplayName, extractString, flatten, flatten$1 as flattenArray, formatError, formatErrorForLogging, index$2 as fs, generateCompactWelcome, generateRecommendations, generateWelcome, get, getArchitecture, getCacheDir, getCapabilitiesByType, getCapability, getCloudMcpRecommendations, getCloudRecommendations, getCloudSkillRecommendations, getCommandPath, getCommandVersion, getConfigDir, getDataDir, getDisabledSkills, getEnabledSkills, getErrorMessage, getFileInfo, getFileSize, getHomeDir, getPlatform, getPlatformInfo, getQuotaUsagePercentage, getRecommendations, getRegistry, getRetryDelay, getSkillRatings, getTelemetry, getTempDir, getTemplatesClient, getUserQuota, getUserSkills, handleCloudError, has, i18nHelpers, initializeTelemetry, installSkill, intersection, isArray, isAuthError, isBoolean, isDefined, isDirectory, isDuplicateRatingError, isEmail, isFile, isLargeFile, isLinux, isMacOS, isNumber, isObject, isRateLimitError, isRecommendationConfig, isRetryableError, isRetryableErrorCode, isSkillInstalled, isSkillNotFoundError, isString, isTelemetryEventData, isTemplateParameterValue, isURL, isUnauthorizedError, isUnix, isWindows, kebabCase, listDirs, listFiles, logger, logger$2 as loggerUtils, moveFile, normalizeRecommendation, normalizeRecommendations, index$1 as object, omit, parallelLimit, partition, pascalCase, pick, platform, processLargeFile, processLineByLine, ratingsApi, readFile, readJSON, retry, retryUtils, scanCapabilities, sequence, set, shuffle, skillsMarketplaceApi, sleep, slugify, snakeCase, sortByLastUsed, sortByUsage, stopTelemetry, streamJSON, streamWriteJSON, index as string, telemetryUtils, template, throttle, timeout, trackEvent, truncate, tryCatch, tryCatchAsync, unflatten, uninstallSkill, union, unique, updateSkill, userSkillsApi, validateBatchTemplateRequest, validateProjectAnalysisRequest, validateUsageReport, validation, validators, waitFor, withRetry, wrapError, writeFile, writeJSON };
|
|
5582
|
+
export type { AgentConfig, AnalysisCompletedData, AnalysisMetadata, AuthRequestOptions, BatchTelemetryData, BatchTemplateRequest, BatchTemplateResponse$1 as BatchTemplateResponse, BuildSystem, CacheEntry, Capability, CapabilityScanResult, CapabilityStatus, CapabilityType, ChunkProcessorOptions, CloudErrorMetadata, CreateRatingData, CreateRatingResponse, DependencyAnalysis, DependencyConflict, DependencyNode, DependencyType, DetectorConfig, ErrorOccurredData, ExecutionResult, FileInfo, FrameworkDetectionResult, GetSkillRatingsParams, GetSkillRatingsResponse, HealthCheckResponse, HookConfig, IChatTool, ICodeGenTool, ICodeTool, IFileEditTool, InstallStatus, InstallationCommands, InstallationPlan, LanguageDetection, McpServerConfig$1 as McpServerConfig, MetricType, MultilingualString, PackageManager, ProjectAnalysis, ProjectAnalysisRequest, ProjectAnalysisResponse, RatingSortOption, RawBatchTemplateResponse, RawProjectAnalysisResponse, RawRecommendation, RawTemplate, Recommendation, RecommendationAcceptedData, RecommendationConfig, RecommendationShownData, SkillConfig, StreamProcessorOptions, TelemetryEventData, TemplateDownloadData, TemplateParameter, TemplateParameterValue, TemplateResponse, TemplateType$1 as TemplateType, ToolCapabilities, ToolConfig, ToolMetadata, UsageReport, UsageReportResponse, WelcomeOptions, WorkflowConfig };
|