@kaitranntt/ccs 4.4.0 → 5.0.1
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 +98 -7
- package/VERSION +1 -1
- package/config/base-agy.settings.json +10 -0
- package/config/base-codex.settings.json +10 -0
- package/config/base-gemini.settings.json +10 -0
- package/dist/auth/auth-commands.d.ts +52 -0
- package/dist/auth/auth-commands.d.ts.map +1 -0
- package/dist/auth/auth-commands.js +479 -0
- package/dist/auth/auth-commands.js.map +1 -0
- package/dist/auth/profile-detector.d.ts +68 -0
- package/dist/auth/profile-detector.d.ts.map +1 -0
- package/dist/auth/profile-detector.js +209 -0
- package/dist/auth/profile-detector.js.map +1 -0
- package/dist/auth/profile-registry.d.ts +60 -0
- package/dist/auth/profile-registry.d.ts.map +1 -0
- package/dist/auth/profile-registry.js +188 -0
- package/dist/auth/profile-registry.js.map +1 -0
- package/dist/ccs.d.ts +10 -0
- package/dist/ccs.d.ts.map +1 -0
- package/dist/ccs.js +320 -0
- package/dist/ccs.js.map +1 -0
- package/dist/cliproxy/auth-handler.d.ts +95 -0
- package/dist/cliproxy/auth-handler.d.ts.map +1 -0
- package/dist/cliproxy/auth-handler.js +443 -0
- package/dist/cliproxy/auth-handler.js.map +1 -0
- package/dist/cliproxy/base-config-loader.d.ts +42 -0
- package/dist/cliproxy/base-config-loader.d.ts.map +1 -0
- package/dist/cliproxy/base-config-loader.js +123 -0
- package/dist/cliproxy/base-config-loader.js.map +1 -0
- package/dist/cliproxy/binary-manager.d.ts +104 -0
- package/dist/cliproxy/binary-manager.d.ts.map +1 -0
- package/dist/cliproxy/binary-manager.js +567 -0
- package/dist/cliproxy/binary-manager.js.map +1 -0
- package/dist/cliproxy/cliproxy-executor.d.ts +33 -0
- package/dist/cliproxy/cliproxy-executor.d.ts.map +1 -0
- package/dist/cliproxy/cliproxy-executor.js +297 -0
- package/dist/cliproxy/cliproxy-executor.js.map +1 -0
- package/dist/cliproxy/config-generator.d.ts +89 -0
- package/dist/cliproxy/config-generator.d.ts.map +1 -0
- package/dist/cliproxy/config-generator.js +263 -0
- package/dist/cliproxy/config-generator.js.map +1 -0
- package/dist/cliproxy/index.d.ts +13 -0
- package/dist/cliproxy/index.d.ts.map +1 -0
- package/dist/cliproxy/index.js +62 -0
- package/dist/cliproxy/index.js.map +1 -0
- package/dist/cliproxy/platform-detector.d.ts +48 -0
- package/dist/cliproxy/platform-detector.d.ts.map +1 -0
- package/dist/cliproxy/platform-detector.js +118 -0
- package/dist/cliproxy/platform-detector.js.map +1 -0
- package/dist/cliproxy/types.d.ts +169 -0
- package/dist/cliproxy/types.d.ts.map +1 -0
- package/dist/cliproxy/types.js +7 -0
- package/dist/cliproxy/types.js.map +1 -0
- package/dist/commands/doctor-command.d.ts +10 -0
- package/dist/commands/doctor-command.d.ts.map +1 -0
- package/dist/commands/doctor-command.js +44 -0
- package/dist/commands/doctor-command.js.map +1 -0
- package/dist/commands/help-command.d.ts +5 -0
- package/dist/commands/help-command.d.ts.map +1 -0
- package/dist/commands/help-command.js +104 -0
- package/dist/commands/help-command.js.map +1 -0
- package/dist/commands/install-command.d.ts +14 -0
- package/dist/commands/install-command.d.ts.map +1 -0
- package/dist/commands/install-command.js +39 -0
- package/dist/commands/install-command.js.map +1 -0
- package/dist/commands/shell-completion-command.d.ts +10 -0
- package/dist/commands/shell-completion-command.d.ts.map +1 -0
- package/dist/commands/shell-completion-command.js +85 -0
- package/dist/commands/shell-completion-command.js.map +1 -0
- package/dist/commands/sync-command.d.ts +10 -0
- package/dist/commands/sync-command.d.ts.map +1 -0
- package/dist/commands/sync-command.js +59 -0
- package/dist/commands/sync-command.js.map +1 -0
- package/dist/commands/update-command.d.ts +12 -0
- package/dist/commands/update-command.d.ts.map +1 -0
- package/dist/commands/update-command.js +295 -0
- package/dist/commands/update-command.js.map +1 -0
- package/dist/commands/version-command.d.ts +10 -0
- package/dist/commands/version-command.d.ts.map +1 -0
- package/dist/commands/version-command.js +100 -0
- package/dist/commands/version-command.js.map +1 -0
- package/dist/delegation/delegation-handler.d.ts +60 -0
- package/dist/delegation/delegation-handler.d.ts.map +1 -0
- package/dist/delegation/delegation-handler.js +174 -0
- package/dist/delegation/delegation-handler.js.map +1 -0
- package/dist/delegation/headless-executor.d.ts +114 -0
- package/dist/delegation/headless-executor.d.ts.map +1 -0
- package/dist/delegation/headless-executor.js +562 -0
- package/dist/delegation/headless-executor.js.map +1 -0
- package/dist/delegation/result-formatter.d.ts +108 -0
- package/dist/delegation/result-formatter.d.ts.map +1 -0
- package/dist/delegation/result-formatter.js +391 -0
- package/dist/delegation/result-formatter.js.map +1 -0
- package/dist/delegation/session-manager.d.ts +58 -0
- package/dist/delegation/session-manager.d.ts.map +1 -0
- package/dist/delegation/session-manager.js +153 -0
- package/dist/delegation/session-manager.js.map +1 -0
- package/dist/delegation/settings-parser.d.ts +31 -0
- package/dist/delegation/settings-parser.d.ts.map +1 -0
- package/dist/delegation/settings-parser.js +107 -0
- package/dist/delegation/settings-parser.js.map +1 -0
- package/dist/glmt/delta-accumulator.d.ts +210 -0
- package/dist/glmt/delta-accumulator.d.ts.map +1 -0
- package/dist/glmt/delta-accumulator.js +351 -0
- package/dist/glmt/delta-accumulator.js.map +1 -0
- package/dist/glmt/glmt-proxy.d.ts +72 -0
- package/dist/glmt/glmt-proxy.d.ts.map +1 -0
- package/dist/glmt/glmt-proxy.js +427 -0
- package/dist/glmt/glmt-proxy.js.map +1 -0
- package/dist/glmt/glmt-transformer.d.ts +265 -0
- package/dist/glmt/glmt-transformer.d.ts.map +1 -0
- package/dist/glmt/glmt-transformer.js +832 -0
- package/dist/glmt/glmt-transformer.js.map +1 -0
- package/dist/glmt/locale-enforcer.d.ts +38 -0
- package/dist/glmt/locale-enforcer.d.ts.map +1 -0
- package/dist/glmt/locale-enforcer.js +69 -0
- package/dist/glmt/locale-enforcer.js.map +1 -0
- package/dist/glmt/reasoning-enforcer.d.ts +52 -0
- package/dist/glmt/reasoning-enforcer.d.ts.map +1 -0
- package/dist/glmt/reasoning-enforcer.js +151 -0
- package/dist/glmt/reasoning-enforcer.js.map +1 -0
- package/dist/glmt/sse-parser.d.ts +47 -0
- package/dist/glmt/sse-parser.d.ts.map +1 -0
- package/dist/glmt/sse-parser.js +93 -0
- package/dist/glmt/sse-parser.js.map +1 -0
- package/dist/management/doctor.d.ts +104 -0
- package/dist/management/doctor.d.ts.map +1 -0
- package/dist/management/doctor.js +673 -0
- package/dist/management/doctor.js.map +1 -0
- package/dist/management/instance-manager.d.ts +57 -0
- package/dist/management/instance-manager.d.ts.map +1 -0
- package/dist/management/instance-manager.js +195 -0
- package/dist/management/instance-manager.js.map +1 -0
- package/dist/management/recovery-manager.d.ts +39 -0
- package/dist/management/recovery-manager.d.ts.map +1 -0
- package/dist/management/recovery-manager.js +141 -0
- package/dist/management/recovery-manager.js.map +1 -0
- package/dist/management/shared-manager.d.ts +47 -0
- package/dist/management/shared-manager.d.ts.map +1 -0
- package/dist/management/shared-manager.js +388 -0
- package/dist/management/shared-manager.js.map +1 -0
- package/dist/types/cli.d.ts +50 -0
- package/dist/types/cli.d.ts.map +1 -0
- package/dist/types/cli.js +16 -0
- package/dist/types/cli.js.map +1 -0
- package/dist/types/config.d.ts +51 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +26 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/delegation.d.ts +61 -0
- package/dist/types/delegation.d.ts.map +1 -0
- package/dist/types/delegation.js +6 -0
- package/dist/types/delegation.js.map +1 -0
- package/dist/types/glmt.d.ts +95 -0
- package/dist/types/glmt.d.ts.map +1 -0
- package/dist/types/glmt.js +7 -0
- package/dist/types/glmt.js.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/utils.d.ts +36 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/utils.js +22 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/utils/claude-detector.d.ts +14 -0
- package/dist/utils/claude-detector.d.ts.map +1 -0
- package/dist/utils/claude-detector.js +112 -0
- package/dist/utils/claude-detector.js.map +1 -0
- package/dist/utils/claude-dir-installer.d.ts +46 -0
- package/dist/utils/claude-dir-installer.d.ts.map +1 -0
- package/dist/utils/claude-dir-installer.js +289 -0
- package/dist/utils/claude-dir-installer.js.map +1 -0
- package/dist/utils/claude-symlink-manager.d.ts +61 -0
- package/dist/utils/claude-symlink-manager.d.ts.map +1 -0
- package/dist/utils/claude-symlink-manager.js +291 -0
- package/dist/utils/claude-symlink-manager.js.map +1 -0
- package/dist/utils/config-manager.d.ts +32 -0
- package/dist/utils/config-manager.d.ts.map +1 -0
- package/dist/utils/config-manager.js +143 -0
- package/dist/utils/config-manager.js.map +1 -0
- package/dist/utils/delegation-validator.d.ts +39 -0
- package/dist/utils/delegation-validator.d.ts.map +1 -0
- package/dist/utils/delegation-validator.js +161 -0
- package/dist/utils/delegation-validator.js.map +1 -0
- package/dist/utils/error-codes.d.ts +36 -0
- package/dist/utils/error-codes.d.ts.map +1 -0
- package/dist/utils/error-codes.js +63 -0
- package/dist/utils/error-codes.js.map +1 -0
- package/dist/utils/error-manager.d.ts +59 -0
- package/dist/utils/error-manager.d.ts.map +1 -0
- package/dist/utils/error-manager.js +228 -0
- package/dist/utils/error-manager.js.map +1 -0
- package/dist/utils/helpers.d.ts +27 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +150 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/package-manager-detector.d.ts +14 -0
- package/dist/utils/package-manager-detector.d.ts.map +1 -0
- package/dist/utils/package-manager-detector.js +162 -0
- package/dist/utils/package-manager-detector.js.map +1 -0
- package/dist/utils/progress-indicator.d.ts +52 -0
- package/dist/utils/progress-indicator.d.ts.map +1 -0
- package/dist/utils/progress-indicator.js +102 -0
- package/dist/utils/progress-indicator.js.map +1 -0
- package/dist/utils/prompt.d.ts +29 -0
- package/dist/utils/prompt.d.ts.map +1 -0
- package/dist/utils/prompt.js +116 -0
- package/dist/utils/prompt.js.map +1 -0
- package/dist/utils/shell-completion.d.ts +52 -0
- package/dist/utils/shell-completion.d.ts.map +1 -0
- package/dist/utils/shell-completion.js +231 -0
- package/dist/utils/shell-completion.js.map +1 -0
- package/dist/utils/shell-executor.d.ts +15 -0
- package/dist/utils/shell-executor.d.ts.map +1 -0
- package/dist/utils/shell-executor.js +57 -0
- package/dist/utils/shell-executor.js.map +1 -0
- package/dist/utils/update-checker.d.ts +48 -0
- package/dist/utils/update-checker.d.ts.map +1 -0
- package/dist/utils/update-checker.js +241 -0
- package/dist/utils/update-checker.js.map +1 -0
- package/lib/ccs +21 -1907
- package/lib/ccs.ps1 +26 -1800
- package/lib/error-codes.ps1 +2 -1
- package/lib/prompt.ps1 +2 -2
- package/package.json +31 -11
- package/scripts/add-shebang.js +39 -0
- package/scripts/bump-version.sh +25 -37
- package/scripts/dev-install.sh +32 -11
- package/scripts/postinstall.js +29 -29
- package/bin/auth/auth-commands.js +0 -499
- package/bin/auth/profile-detector.js +0 -204
- package/bin/auth/profile-registry.js +0 -225
- package/bin/ccs.js +0 -1034
- package/bin/delegation/README.md +0 -191
- package/bin/delegation/delegation-handler.js +0 -212
- package/bin/delegation/headless-executor.js +0 -618
- package/bin/delegation/result-formatter.js +0 -485
- package/bin/delegation/session-manager.js +0 -157
- package/bin/delegation/settings-parser.js +0 -109
- package/bin/glmt/delta-accumulator.js +0 -276
- package/bin/glmt/glmt-proxy.js +0 -495
- package/bin/glmt/glmt-transformer.js +0 -999
- package/bin/glmt/locale-enforcer.js +0 -72
- package/bin/glmt/reasoning-enforcer.js +0 -173
- package/bin/glmt/sse-parser.js +0 -96
- package/bin/management/doctor.js +0 -721
- package/bin/management/instance-manager.js +0 -202
- package/bin/management/recovery-manager.js +0 -135
- package/bin/management/shared-manager.js +0 -402
- package/bin/utils/claude-detector.js +0 -73
- package/bin/utils/claude-dir-installer.js +0 -283
- package/bin/utils/claude-symlink-manager.js +0 -289
- package/bin/utils/config-manager.js +0 -103
- package/bin/utils/delegation-validator.js +0 -154
- package/bin/utils/error-codes.js +0 -59
- package/bin/utils/error-manager.js +0 -165
- package/bin/utils/helpers.js +0 -136
- package/bin/utils/progress-indicator.js +0 -111
- package/bin/utils/prompt.js +0 -134
- package/bin/utils/shell-completion.js +0 -256
- package/bin/utils/update-checker.js +0 -243
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GLMT Proxy Types
|
|
3
|
+
* For Anthropic ↔ OpenAI format transformation
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Anthropic API types
|
|
7
|
+
*/
|
|
8
|
+
export interface AnthropicMessage {
|
|
9
|
+
role: 'user' | 'assistant';
|
|
10
|
+
content: string | ContentBlock[];
|
|
11
|
+
}
|
|
12
|
+
export interface ContentBlock {
|
|
13
|
+
type: 'text' | 'thinking' | 'tool_use' | 'tool_result';
|
|
14
|
+
text?: string;
|
|
15
|
+
id?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
input?: Record<string, unknown>;
|
|
18
|
+
tool_use_id?: string;
|
|
19
|
+
content?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface AnthropicRequest {
|
|
22
|
+
model: string;
|
|
23
|
+
messages: AnthropicMessage[];
|
|
24
|
+
max_tokens: number;
|
|
25
|
+
temperature?: number;
|
|
26
|
+
tools?: AnthropicTool[];
|
|
27
|
+
stream?: boolean;
|
|
28
|
+
thinking?: {
|
|
29
|
+
type: 'enabled' | 'disabled';
|
|
30
|
+
budget_tokens?: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface AnthropicTool {
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
input_schema: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* OpenAI API types (Z.AI endpoint)
|
|
40
|
+
*/
|
|
41
|
+
export interface OpenAIMessage {
|
|
42
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
43
|
+
content: string | null;
|
|
44
|
+
reasoning_content?: string;
|
|
45
|
+
tool_calls?: OpenAIToolCall[];
|
|
46
|
+
tool_call_id?: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface OpenAIToolCall {
|
|
50
|
+
id: string;
|
|
51
|
+
type: 'function';
|
|
52
|
+
function: {
|
|
53
|
+
name: string;
|
|
54
|
+
arguments: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface OpenAIRequest {
|
|
58
|
+
model: string;
|
|
59
|
+
messages: OpenAIMessage[];
|
|
60
|
+
max_completion_tokens?: number;
|
|
61
|
+
temperature?: number;
|
|
62
|
+
tools?: OpenAITool[];
|
|
63
|
+
stream?: boolean;
|
|
64
|
+
reasoning?: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface OpenAITool {
|
|
67
|
+
type: 'function';
|
|
68
|
+
function: {
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
parameters: Record<string, unknown>;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* SSE (Server-Sent Events) types
|
|
76
|
+
*/
|
|
77
|
+
export interface SSEEvent {
|
|
78
|
+
event?: string;
|
|
79
|
+
data?: string;
|
|
80
|
+
id?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface DeltaChunk {
|
|
83
|
+
reasoning_content?: string;
|
|
84
|
+
content?: string;
|
|
85
|
+
tool_calls?: OpenAIToolCall[];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Transformation context
|
|
89
|
+
*/
|
|
90
|
+
export interface TransformationContext {
|
|
91
|
+
verbose: boolean;
|
|
92
|
+
debugLog: boolean;
|
|
93
|
+
streaming: boolean;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=glmt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glmt.js","sourceRoot":"","sources":["../../src/types/glmt.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CCS Type Definitions
|
|
3
|
+
* Single entry point for all types
|
|
4
|
+
*/
|
|
5
|
+
export type { Config, ProfilesConfig, Settings, EnvVars, EnvValue, ProfileMetadata, ProfilesRegistry, } from './config';
|
|
6
|
+
export { isConfig, isSettings } from './config';
|
|
7
|
+
export type { ParsedArgs, ClaudeSpawnOptions, Platform, ClaudeCliInfo } from './cli';
|
|
8
|
+
export { ExitCode } from './cli';
|
|
9
|
+
export type { SessionMetadata, DelegationSession, DelegationSessionsRegistry, ExecutionResult, ToolEvent, OutputEvent, DelegationEvent, } from './delegation';
|
|
10
|
+
export type { AnthropicMessage, ContentBlock, AnthropicRequest, AnthropicTool, OpenAIMessage, OpenAIToolCall, OpenAIRequest, OpenAITool, SSEEvent, DeltaChunk, TransformationContext, } from './glmt';
|
|
11
|
+
export { ErrorCode, LogLevel } from './utils';
|
|
12
|
+
export type { ColorName, TerminalInfo, Result } from './utils';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EACV,MAAM,EACN,cAAc,EACd,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,eAAe,EACf,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGhD,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,SAAS,EACT,WAAW,EACX,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,UAAU,EACV,QAAQ,EACR,UAAU,EACV,qBAAqB,GACtB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CCS Type Definitions
|
|
4
|
+
* Single entry point for all types
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.LogLevel = exports.ExitCode = exports.isSettings = exports.isConfig = void 0;
|
|
8
|
+
var config_1 = require("./config");
|
|
9
|
+
Object.defineProperty(exports, "isConfig", { enumerable: true, get: function () { return config_1.isConfig; } });
|
|
10
|
+
Object.defineProperty(exports, "isSettings", { enumerable: true, get: function () { return config_1.isSettings; } });
|
|
11
|
+
var cli_1 = require("./cli");
|
|
12
|
+
Object.defineProperty(exports, "ExitCode", { enumerable: true, get: function () { return cli_1.ExitCode; } });
|
|
13
|
+
// Utility types
|
|
14
|
+
var utils_1 = require("./utils");
|
|
15
|
+
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return utils_1.LogLevel; } });
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,mCAAgD;AAAvC,kGAAA,QAAQ,OAAA;AAAE,oGAAA,UAAU,OAAA;AAI7B,6BAAiC;AAAxB,+FAAA,QAAQ,OAAA;AA4BjB,gBAAgB;AAChB,iCAA8C;AAA1B,iGAAA,QAAQ,OAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility Types
|
|
3
|
+
*/
|
|
4
|
+
export { ERROR_CODES, ErrorCode, getErrorDocUrl, getErrorCategory } from '../utils/error-codes';
|
|
5
|
+
/**
|
|
6
|
+
* Log levels
|
|
7
|
+
*/
|
|
8
|
+
export declare enum LogLevel {
|
|
9
|
+
DEBUG = "debug",
|
|
10
|
+
INFO = "info",
|
|
11
|
+
WARN = "warn",
|
|
12
|
+
ERROR = "error"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Color codes (TTY-aware)
|
|
16
|
+
*/
|
|
17
|
+
export type ColorName = 'red' | 'green' | 'yellow' | 'blue' | 'cyan' | 'bold' | 'cyanBold' | 'reset';
|
|
18
|
+
/**
|
|
19
|
+
* Terminal capabilities
|
|
20
|
+
*/
|
|
21
|
+
export interface TerminalInfo {
|
|
22
|
+
isTTY: boolean;
|
|
23
|
+
supportsColor: boolean;
|
|
24
|
+
noColorEnv: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Helper result types
|
|
28
|
+
*/
|
|
29
|
+
export type Result<T, E = Error> = {
|
|
30
|
+
ok: true;
|
|
31
|
+
value: T;
|
|
32
|
+
} | {
|
|
33
|
+
ok: false;
|
|
34
|
+
error: E;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEhG;;GAEG;AACH,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,CAAC;AAEZ;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Utility Types
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LogLevel = exports.getErrorCategory = exports.getErrorDocUrl = exports.ERROR_CODES = void 0;
|
|
7
|
+
// Re-export from error-codes for consistency
|
|
8
|
+
var error_codes_1 = require("../utils/error-codes");
|
|
9
|
+
Object.defineProperty(exports, "ERROR_CODES", { enumerable: true, get: function () { return error_codes_1.ERROR_CODES; } });
|
|
10
|
+
Object.defineProperty(exports, "getErrorDocUrl", { enumerable: true, get: function () { return error_codes_1.getErrorDocUrl; } });
|
|
11
|
+
Object.defineProperty(exports, "getErrorCategory", { enumerable: true, get: function () { return error_codes_1.getErrorCategory; } });
|
|
12
|
+
/**
|
|
13
|
+
* Log levels
|
|
14
|
+
*/
|
|
15
|
+
var LogLevel;
|
|
16
|
+
(function (LogLevel) {
|
|
17
|
+
LogLevel["DEBUG"] = "debug";
|
|
18
|
+
LogLevel["INFO"] = "info";
|
|
19
|
+
LogLevel["WARN"] = "warn";
|
|
20
|
+
LogLevel["ERROR"] = "error";
|
|
21
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
22
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6CAA6C;AAC7C,oDAAgG;AAAvF,0GAAA,WAAW,OAAA;AAAa,6GAAA,cAAc,OAAA;AAAE,+GAAA,gBAAgB,OAAA;AAEjE;;GAEG;AACH,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ClaudeCliInfo } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Detect Claude CLI executable
|
|
4
|
+
*/
|
|
5
|
+
export declare function detectClaudeCli(): string | null;
|
|
6
|
+
/**
|
|
7
|
+
* Get detailed Claude CLI information
|
|
8
|
+
*/
|
|
9
|
+
export declare function getClaudeCliInfo(): ClaudeCliInfo | null;
|
|
10
|
+
/**
|
|
11
|
+
* Show Claude not found error
|
|
12
|
+
*/
|
|
13
|
+
export declare function showClaudeNotFoundError(): never;
|
|
14
|
+
//# sourceMappingURL=claude-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-detector.d.ts","sourceRoot":"","sources":["../../src/utils/claude-detector.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAwD/C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,IAAI,CAevD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,KAAK,CAI/C"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.showClaudeNotFoundError = exports.getClaudeCliInfo = exports.detectClaudeCli = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
const child_process_1 = require("child_process");
|
|
29
|
+
const helpers_1 = require("./helpers");
|
|
30
|
+
/**
|
|
31
|
+
* Detect Claude CLI executable
|
|
32
|
+
*/
|
|
33
|
+
function detectClaudeCli() {
|
|
34
|
+
// Priority 1: CCS_CLAUDE_PATH environment variable (if user wants custom path)
|
|
35
|
+
if (process.env.CCS_CLAUDE_PATH) {
|
|
36
|
+
const ccsPath = (0, helpers_1.expandPath)(process.env.CCS_CLAUDE_PATH);
|
|
37
|
+
// Basic validation: file exists
|
|
38
|
+
if (fs.existsSync(ccsPath)) {
|
|
39
|
+
return ccsPath;
|
|
40
|
+
}
|
|
41
|
+
// Invalid CCS_CLAUDE_PATH - show warning and fall back to PATH
|
|
42
|
+
console.warn('[!] Warning: CCS_CLAUDE_PATH is set but file not found:', ccsPath);
|
|
43
|
+
console.warn(' Falling back to system PATH lookup...');
|
|
44
|
+
}
|
|
45
|
+
// Priority 2: Resolve 'claude' from PATH using which/where.exe
|
|
46
|
+
// This fixes Windows npm installation where spawn() can't resolve bare command names
|
|
47
|
+
// SECURITY: Commands are hardcoded literals with no user input - safe from injection
|
|
48
|
+
const isWindows = process.platform === 'win32';
|
|
49
|
+
try {
|
|
50
|
+
const cmd = isWindows ? 'where.exe claude' : 'which claude';
|
|
51
|
+
const result = (0, child_process_1.execSync)(cmd, {
|
|
52
|
+
encoding: 'utf8',
|
|
53
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
54
|
+
timeout: 5000, // 5 second timeout to prevent hangs
|
|
55
|
+
}).trim();
|
|
56
|
+
// where.exe may return multiple lines (all matches in PATH order)
|
|
57
|
+
const matches = result
|
|
58
|
+
.split('\n')
|
|
59
|
+
.map((p) => p.trim())
|
|
60
|
+
.filter((p) => p);
|
|
61
|
+
if (isWindows) {
|
|
62
|
+
// On Windows, prefer executables with extensions (.exe, .cmd, .bat)
|
|
63
|
+
// where.exe often returns file without extension first, then the actual .cmd wrapper
|
|
64
|
+
const withExtension = matches.find((p) => /\.(exe|cmd|bat|ps1)$/i.test(p));
|
|
65
|
+
const claudePath = withExtension || matches[0];
|
|
66
|
+
if (claudePath && fs.existsSync(claudePath)) {
|
|
67
|
+
return claudePath;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// On Unix, first match is fine
|
|
72
|
+
const claudePath = matches[0];
|
|
73
|
+
if (claudePath && fs.existsSync(claudePath)) {
|
|
74
|
+
return claudePath;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch (_err) {
|
|
79
|
+
// Command failed - claude not in PATH
|
|
80
|
+
// Fall through to return null
|
|
81
|
+
}
|
|
82
|
+
// Priority 3: Claude not found
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
exports.detectClaudeCli = detectClaudeCli;
|
|
86
|
+
/**
|
|
87
|
+
* Get detailed Claude CLI information
|
|
88
|
+
*/
|
|
89
|
+
function getClaudeCliInfo() {
|
|
90
|
+
const claudePath = detectClaudeCli();
|
|
91
|
+
if (!claudePath) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
const isWindows = process.platform === 'win32';
|
|
95
|
+
const needsShell = isWindows && /\.(cmd|bat|ps1)$/i.test(claudePath);
|
|
96
|
+
return {
|
|
97
|
+
path: claudePath,
|
|
98
|
+
isWindows,
|
|
99
|
+
needsShell,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
exports.getClaudeCliInfo = getClaudeCliInfo;
|
|
103
|
+
/**
|
|
104
|
+
* Show Claude not found error
|
|
105
|
+
*/
|
|
106
|
+
function showClaudeNotFoundError() {
|
|
107
|
+
console.error('ERROR: Claude CLI not found in PATH');
|
|
108
|
+
console.error('Install from: https://docs.claude.com/en/docs/claude-code/installation');
|
|
109
|
+
process.exit(1);
|
|
110
|
+
}
|
|
111
|
+
exports.showClaudeNotFoundError = showClaudeNotFoundError;
|
|
112
|
+
//# sourceMappingURL=claude-detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-detector.js","sourceRoot":"","sources":["../../src/utils/claude-detector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,iDAAyC;AACzC,uCAAuC;AAGvC;;GAEG;AACH,SAAgB,eAAe;IAC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.ccs/.claude/
|
|
3
|
+
* v4.1.1: Fix for npm install not copying .claude/ directory
|
|
4
|
+
*/
|
|
5
|
+
interface CleanupResult {
|
|
6
|
+
success: boolean;
|
|
7
|
+
cleanedFiles: string[];
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* ClaudeDirInstaller - Manages copying .claude/ directory from package to ~/.ccs/.claude/
|
|
12
|
+
*/
|
|
13
|
+
export declare class ClaudeDirInstaller {
|
|
14
|
+
private homeDir;
|
|
15
|
+
private ccsClaudeDir;
|
|
16
|
+
constructor();
|
|
17
|
+
/**
|
|
18
|
+
* Copy .claude/ directory from package to ~/.ccs/.claude/
|
|
19
|
+
* @param packageDir - Package installation directory (default: auto-detect)
|
|
20
|
+
* @param silent - Suppress spinner output
|
|
21
|
+
*/
|
|
22
|
+
install(packageDir?: string, silent?: boolean): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Recursively copy directory (fallback for Node.js < 16.7.0)
|
|
25
|
+
*/
|
|
26
|
+
private copyDirRecursive;
|
|
27
|
+
/**
|
|
28
|
+
* Count files and directories in a path
|
|
29
|
+
*/
|
|
30
|
+
private countItems;
|
|
31
|
+
/**
|
|
32
|
+
* Clean up deprecated files from previous installations
|
|
33
|
+
* Removes ccs-delegator.md that was deprecated in v4.3.2
|
|
34
|
+
*/
|
|
35
|
+
cleanupDeprecated(silent?: boolean): CleanupResult;
|
|
36
|
+
/**
|
|
37
|
+
* Check if deprecated file should be backed up (user modified)
|
|
38
|
+
*/
|
|
39
|
+
private shouldBackupDeprecatedFile;
|
|
40
|
+
/**
|
|
41
|
+
* Check if ~/.ccs/.claude/ exists and is valid
|
|
42
|
+
*/
|
|
43
|
+
isInstalled(): boolean;
|
|
44
|
+
}
|
|
45
|
+
export default ClaudeDirInstaller;
|
|
46
|
+
//# sourceMappingURL=claude-dir-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-dir-installer.d.ts","sourceRoot":"","sources":["../../src/utils/claude-dir-installer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6CH,UAAU,aAAa;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAS;;IAO7B;;;;OAIG;IACH,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,OAAO;IAmErD;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAuBxB;;OAEG;IACH,OAAO,CAAC,UAAU;IAyBlB;;;OAGG;IACH,iBAAiB,CAAC,MAAM,UAAQ,GAAG,aAAa;IAmFhD;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAgBlC;;OAEG;IACH,WAAW,IAAI,OAAO;CAGvB;AAED,eAAe,kBAAkB,CAAC"}
|