@mako10k/shell-server 0.1.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/LICENSE +21 -0
- package/README.md +114 -0
- package/dist/backoffice/index.d.ts +2 -0
- package/dist/backoffice/index.d.ts.map +1 -0
- package/dist/backoffice/index.js +47 -0
- package/dist/backoffice/index.js.map +1 -0
- package/dist/backoffice/server.d.ts +45 -0
- package/dist/backoffice/server.d.ts.map +1 -0
- package/dist/backoffice/server.js +610 -0
- package/dist/backoffice/server.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +525 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/config-manager.d.ts +80 -0
- package/dist/core/config-manager.d.ts.map +1 -0
- package/dist/core/config-manager.js +218 -0
- package/dist/core/config-manager.js.map +1 -0
- package/dist/core/enhanced-history-manager.d.ts +84 -0
- package/dist/core/enhanced-history-manager.d.ts.map +1 -0
- package/dist/core/enhanced-history-manager.js +319 -0
- package/dist/core/enhanced-history-manager.js.map +1 -0
- package/dist/core/file-manager.d.ts +79 -0
- package/dist/core/file-manager.d.ts.map +1 -0
- package/dist/core/file-manager.js +338 -0
- package/dist/core/file-manager.js.map +1 -0
- package/dist/core/file-storage-subscriber.d.ts +38 -0
- package/dist/core/file-storage-subscriber.d.ts.map +1 -0
- package/dist/core/file-storage-subscriber.js +132 -0
- package/dist/core/file-storage-subscriber.js.map +1 -0
- package/dist/core/monitoring-manager.d.ts +32 -0
- package/dist/core/monitoring-manager.d.ts.map +1 -0
- package/dist/core/monitoring-manager.js +296 -0
- package/dist/core/monitoring-manager.js.map +1 -0
- package/dist/core/process-manager.d.ts +105 -0
- package/dist/core/process-manager.d.ts.map +1 -0
- package/dist/core/process-manager.js +1374 -0
- package/dist/core/process-manager.js.map +1 -0
- package/dist/core/realtime-stream-subscriber.d.ts +93 -0
- package/dist/core/realtime-stream-subscriber.d.ts.map +1 -0
- package/dist/core/realtime-stream-subscriber.js +200 -0
- package/dist/core/realtime-stream-subscriber.js.map +1 -0
- package/dist/core/remote-http-client.d.ts +15 -0
- package/dist/core/remote-http-client.d.ts.map +1 -0
- package/dist/core/remote-http-client.js +60 -0
- package/dist/core/remote-http-client.js.map +1 -0
- package/dist/core/remote-process-service.d.ts +50 -0
- package/dist/core/remote-process-service.d.ts.map +1 -0
- package/dist/core/remote-process-service.js +20 -0
- package/dist/core/remote-process-service.js.map +1 -0
- package/dist/core/server-manager.d.ts +71 -0
- package/dist/core/server-manager.d.ts.map +1 -0
- package/dist/core/server-manager.js +680 -0
- package/dist/core/server-manager.js.map +1 -0
- package/dist/core/stream-publisher.d.ts +75 -0
- package/dist/core/stream-publisher.d.ts.map +1 -0
- package/dist/core/stream-publisher.js +127 -0
- package/dist/core/stream-publisher.js.map +1 -0
- package/dist/core/streaming-pipeline-reader.d.ts +67 -0
- package/dist/core/streaming-pipeline-reader.d.ts.map +1 -0
- package/dist/core/streaming-pipeline-reader.js +191 -0
- package/dist/core/streaming-pipeline-reader.js.map +1 -0
- package/dist/core/terminal-manager.d.ts +96 -0
- package/dist/core/terminal-manager.d.ts.map +1 -0
- package/dist/core/terminal-manager.js +515 -0
- package/dist/core/terminal-manager.js.map +1 -0
- package/dist/daemon/server.d.ts +8 -0
- package/dist/daemon/server.d.ts.map +1 -0
- package/dist/daemon/server.js +416 -0
- package/dist/daemon/server.js.map +1 -0
- package/dist/daemon/uds-transport.d.ts +31 -0
- package/dist/daemon/uds-transport.d.ts.map +1 -0
- package/dist/daemon/uds-transport.js +149 -0
- package/dist/daemon/uds-transport.js.map +1 -0
- package/dist/executor/server.d.ts +20 -0
- package/dist/executor/server.d.ts.map +1 -0
- package/dist/executor/server.js +375 -0
- package/dist/executor/server.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/runtime/daemon-runtime.d.ts +4 -0
- package/dist/runtime/daemon-runtime.d.ts.map +1 -0
- package/dist/runtime/daemon-runtime.js +4 -0
- package/dist/runtime/daemon-runtime.js.map +1 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +3 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/tool-runtime.d.ts +52 -0
- package/dist/runtime/tool-runtime.d.ts.map +1 -0
- package/dist/runtime/tool-runtime.js +161 -0
- package/dist/runtime/tool-runtime.js.map +1 -0
- package/dist/security/chat-completion-adapter.d.ts +443 -0
- package/dist/security/chat-completion-adapter.d.ts.map +1 -0
- package/dist/security/chat-completion-adapter.js +475 -0
- package/dist/security/chat-completion-adapter.js.map +1 -0
- package/dist/security/enhanced-evaluator.d.ts +139 -0
- package/dist/security/enhanced-evaluator.d.ts.map +1 -0
- package/dist/security/enhanced-evaluator.js +1208 -0
- package/dist/security/enhanced-evaluator.js.map +1 -0
- package/dist/security/evaluator-types.d.ts +614 -0
- package/dist/security/evaluator-types.d.ts.map +1 -0
- package/dist/security/evaluator-types.js +124 -0
- package/dist/security/evaluator-types.js.map +1 -0
- package/dist/security/manager.d.ts +76 -0
- package/dist/security/manager.d.ts.map +1 -0
- package/dist/security/manager.js +445 -0
- package/dist/security/manager.js.map +1 -0
- package/dist/security/security-llm-prompt-generator.d.ts +105 -0
- package/dist/security/security-llm-prompt-generator.d.ts.map +1 -0
- package/dist/security/security-llm-prompt-generator.js +323 -0
- package/dist/security/security-llm-prompt-generator.js.map +1 -0
- package/dist/security/security-tools.d.ts +174 -0
- package/dist/security/security-tools.d.ts.map +1 -0
- package/dist/security/security-tools.js +159 -0
- package/dist/security/security-tools.js.map +1 -0
- package/dist/security/validator-criteria-manager.d.ts +47 -0
- package/dist/security/validator-criteria-manager.d.ts.map +1 -0
- package/dist/security/validator-criteria-manager.js +169 -0
- package/dist/security/validator-criteria-manager.js.map +1 -0
- package/dist/tools/shell-tools.d.ts +474 -0
- package/dist/tools/shell-tools.d.ts.map +1 -0
- package/dist/tools/shell-tools.js +861 -0
- package/dist/tools/shell-tools.js.map +1 -0
- package/dist/types/enhanced-security.d.ts +529 -0
- package/dist/types/enhanced-security.d.ts.map +1 -0
- package/dist/types/enhanced-security.js +286 -0
- package/dist/types/enhanced-security.js.map +1 -0
- package/dist/types/index.d.ts +282 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +158 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/quick-schemas.d.ts +177 -0
- package/dist/types/quick-schemas.d.ts.map +1 -0
- package/dist/types/quick-schemas.js +113 -0
- package/dist/types/quick-schemas.js.map +1 -0
- package/dist/types/response-schemas.d.ts +41 -0
- package/dist/types/response-schemas.d.ts.map +1 -0
- package/dist/types/response-schemas.js +41 -0
- package/dist/types/response-schemas.js.map +1 -0
- package/dist/types/schemas.d.ts +578 -0
- package/dist/types/schemas.d.ts.map +1 -0
- package/dist/types/schemas.js +498 -0
- package/dist/types/schemas.js.map +1 -0
- package/dist/utils/criteria-manager.d.ts +47 -0
- package/dist/utils/criteria-manager.d.ts.map +1 -0
- package/dist/utils/criteria-manager.js +228 -0
- package/dist/utils/criteria-manager.js.map +1 -0
- package/dist/utils/errors.d.ts +27 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +67 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/helpers.d.ts +85 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +400 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/json-repair.d.ts +23 -0
- package/dist/utils/json-repair.d.ts.map +1 -0
- package/dist/utils/json-repair.js +208 -0
- package/dist/utils/json-repair.js.map +1 -0
- package/dist/utils/process-utils.d.ts +31 -0
- package/dist/utils/process-utils.d.ts.map +1 -0
- package/dist/utils/process-utils.js +217 -0
- package/dist/utils/process-utils.js.map +1 -0
- package/dist/utils/server-helpers.d.ts +4 -0
- package/dist/utils/server-helpers.d.ts.map +1 -0
- package/dist/utils/server-helpers.js +10 -0
- package/dist/utils/server-helpers.js.map +1 -0
- package/dist/utils/sse.d.ts +2 -0
- package/dist/utils/sse.d.ts.map +1 -0
- package/dist/utils/sse.js +6 -0
- package/dist/utils/sse.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Enhanced Security Configuration for MCP Shell Server Safety Features
|
|
3
|
+
// Based on the requirements specification in docs/new_requirements.md
|
|
4
|
+
// 安全性レベル (1=最も安全, 5=最も危険)
|
|
5
|
+
export const SafetyLevelSchema = z
|
|
6
|
+
.number()
|
|
7
|
+
.int()
|
|
8
|
+
.min(1)
|
|
9
|
+
.max(5)
|
|
10
|
+
.describe('Safety level from 1 (safest) to 5 (most dangerous)');
|
|
11
|
+
// 評価結果 (Tool-based evaluation system)
|
|
12
|
+
export const EvaluationResultSchema = z
|
|
13
|
+
.enum(['allow', 'deny', 'add_more_history', 'user_confirm', 'ai_assistant_confirm'])
|
|
14
|
+
.describe('Tool-based evaluation result for security assessment');
|
|
15
|
+
// 従来のLLM評価結果スキーマ (backward compatibility - 統一されました)
|
|
16
|
+
export const SimplifiedLLMEvaluationResultSchema = z.object({
|
|
17
|
+
evaluation_result: EvaluationResultSchema,
|
|
18
|
+
reasoning: z.string(),
|
|
19
|
+
requires_additional_context: z.object({
|
|
20
|
+
command_history_depth: z.number().int().min(0),
|
|
21
|
+
execution_results_count: z.number().int().min(0),
|
|
22
|
+
user_intent_search_keywords: z.array(z.string()).nullable(),
|
|
23
|
+
user_intent_question: z.string().nullable()
|
|
24
|
+
}),
|
|
25
|
+
suggested_alternatives: z.array(z.string())
|
|
26
|
+
});
|
|
27
|
+
// コマンド分類
|
|
28
|
+
export const CommandClassificationSchema = z
|
|
29
|
+
.enum(['basic_safe', 'llm_required'])
|
|
30
|
+
.describe('Command safety classification');
|
|
31
|
+
// Enhanced Security Configuration
|
|
32
|
+
export const EnhancedSecurityConfigSchema = z
|
|
33
|
+
.object({
|
|
34
|
+
// 機能切り替え (LLM中心設計)
|
|
35
|
+
enhanced_mode_enabled: z.boolean().default(true).describe('Enable enhanced security features'),
|
|
36
|
+
basic_safe_classification: z
|
|
37
|
+
.boolean()
|
|
38
|
+
.default(true)
|
|
39
|
+
.describe('Enable basic safe command classification'),
|
|
40
|
+
llm_evaluation_enabled: z
|
|
41
|
+
.boolean()
|
|
42
|
+
.default(true)
|
|
43
|
+
.describe('Enable LLM-based command evaluation (LLM-centric design)'),
|
|
44
|
+
elicitation_enabled: z.boolean().default(true).describe('Enable user intent elicitation'),
|
|
45
|
+
enable_pattern_filtering: z
|
|
46
|
+
.boolean()
|
|
47
|
+
.default(false)
|
|
48
|
+
.describe('Enable pattern-based pre-filtering (default: false - all commands go to LLM evaluation)'),
|
|
49
|
+
// LLM中心設計用の設定
|
|
50
|
+
disable_algorithmic_preprocessing: z
|
|
51
|
+
.boolean()
|
|
52
|
+
.default(true)
|
|
53
|
+
.describe('Disable complex algorithmic analysis to avoid confusing LLM'),
|
|
54
|
+
max_additional_history_for_context: z
|
|
55
|
+
.number()
|
|
56
|
+
.int()
|
|
57
|
+
.min(5)
|
|
58
|
+
.max(50)
|
|
59
|
+
.default(20)
|
|
60
|
+
.describe('Maximum additional history entries when LLM requests NEED_MORE_HISTORY'),
|
|
61
|
+
enable_command_output_context: z
|
|
62
|
+
.boolean()
|
|
63
|
+
.default(true)
|
|
64
|
+
.describe('Allow LLM to request command output summaries for context'),
|
|
65
|
+
// 履歴管理
|
|
66
|
+
command_history_enhanced: z
|
|
67
|
+
.boolean()
|
|
68
|
+
.default(true)
|
|
69
|
+
.describe('Enable enhanced command history management'),
|
|
70
|
+
history_retention_days: z
|
|
71
|
+
.number()
|
|
72
|
+
.int()
|
|
73
|
+
.min(1)
|
|
74
|
+
.max(365)
|
|
75
|
+
.default(30)
|
|
76
|
+
.describe('Command history retention period in days'),
|
|
77
|
+
max_history_entries: z
|
|
78
|
+
.number()
|
|
79
|
+
.int()
|
|
80
|
+
.min(100)
|
|
81
|
+
.max(10000)
|
|
82
|
+
.default(1000)
|
|
83
|
+
.describe('Maximum number of history entries to keep'),
|
|
84
|
+
// LLM設定
|
|
85
|
+
llm_provider: z
|
|
86
|
+
.enum(['openai', 'anthropic', 'custom'])
|
|
87
|
+
.default('openai')
|
|
88
|
+
.describe('LLM provider for command evaluation'),
|
|
89
|
+
llm_api_key: z.string().optional().describe('API key for LLM provider'),
|
|
90
|
+
llm_model: z.string().default('gpt-4').describe('LLM model to use for evaluation'),
|
|
91
|
+
llm_timeout_seconds: z
|
|
92
|
+
.number()
|
|
93
|
+
.int()
|
|
94
|
+
.min(1)
|
|
95
|
+
.max(60)
|
|
96
|
+
.default(3)
|
|
97
|
+
.describe('LLM evaluation timeout in seconds'),
|
|
98
|
+
// 学習機能
|
|
99
|
+
enable_resubmission_learning: z
|
|
100
|
+
.boolean()
|
|
101
|
+
.default(true)
|
|
102
|
+
.describe('Enable learning from command resubmissions'),
|
|
103
|
+
max_resubmission_attempts: z
|
|
104
|
+
.number()
|
|
105
|
+
.int()
|
|
106
|
+
.min(1)
|
|
107
|
+
.max(10)
|
|
108
|
+
.default(3)
|
|
109
|
+
.describe('Maximum resubmission attempts'),
|
|
110
|
+
// 安全性閾値
|
|
111
|
+
safety_level_thresholds: z
|
|
112
|
+
.object({
|
|
113
|
+
require_confirmation: z
|
|
114
|
+
.number()
|
|
115
|
+
.int()
|
|
116
|
+
.min(1)
|
|
117
|
+
.max(5)
|
|
118
|
+
.default(4)
|
|
119
|
+
.describe('Safety level that requires user confirmation'),
|
|
120
|
+
auto_deny: z
|
|
121
|
+
.number()
|
|
122
|
+
.int()
|
|
123
|
+
.min(1)
|
|
124
|
+
.max(5)
|
|
125
|
+
.default(5)
|
|
126
|
+
.describe('Safety level that results in automatic denial'),
|
|
127
|
+
})
|
|
128
|
+
.describe('Safety level thresholds for different actions'),
|
|
129
|
+
})
|
|
130
|
+
.describe('Enhanced security configuration for MCP Shell Server');
|
|
131
|
+
// コマンド履歴エントリ (拡張版)
|
|
132
|
+
export const CommandHistoryEntrySchema = z
|
|
133
|
+
.object({
|
|
134
|
+
execution_id: z.string().describe('Unique execution identifier'),
|
|
135
|
+
command: z.string().describe('Executed command'),
|
|
136
|
+
timestamp: z.string().describe('Execution timestamp'),
|
|
137
|
+
working_directory: z.string().describe('Working directory at execution time'),
|
|
138
|
+
// 評価結果(新規)
|
|
139
|
+
safety_classification: CommandClassificationSchema.optional().describe('Basic safety classification'),
|
|
140
|
+
llm_evaluation_result: EvaluationResultSchema.optional().describe('LLM evaluation result'),
|
|
141
|
+
evaluation_reasoning: z.string().optional().describe('Reasoning for the evaluation'),
|
|
142
|
+
denial_context: z.string().optional().describe('Context and suggestions for denied commands'),
|
|
143
|
+
// ユーザ確認履歴(新規)
|
|
144
|
+
user_confirmation_context: z
|
|
145
|
+
.object({
|
|
146
|
+
prompt: z.string().describe('Confirmation prompt shown to user'),
|
|
147
|
+
user_response: z.boolean().describe('User confirmation response'),
|
|
148
|
+
user_reasoning: z.string().optional().describe('User provided reasoning'),
|
|
149
|
+
timestamp: z.string().describe('Confirmation timestamp'),
|
|
150
|
+
confidence_level: z
|
|
151
|
+
.number()
|
|
152
|
+
.int()
|
|
153
|
+
.min(1)
|
|
154
|
+
.max(5)
|
|
155
|
+
.optional()
|
|
156
|
+
.describe('User confidence level'),
|
|
157
|
+
})
|
|
158
|
+
.optional()
|
|
159
|
+
.describe('User confirmation context if confirmation was required'),
|
|
160
|
+
// 実行結果
|
|
161
|
+
was_executed: z.boolean().describe('Whether the command was actually executed'),
|
|
162
|
+
execution_status: z.string().optional().describe('Execution status if executed'),
|
|
163
|
+
resubmission_count: z
|
|
164
|
+
.number()
|
|
165
|
+
.int()
|
|
166
|
+
.min(0)
|
|
167
|
+
.default(0)
|
|
168
|
+
.describe('Number of times command was resubmitted'),
|
|
169
|
+
output_summary: z.string().optional().describe('Summary of command output'),
|
|
170
|
+
})
|
|
171
|
+
.describe('Enhanced command history entry');
|
|
172
|
+
// ユーザ確認パターン
|
|
173
|
+
export const UserConfirmationPatternSchema = z
|
|
174
|
+
.object({
|
|
175
|
+
command_pattern: z.string().describe('Command pattern regex or semantic description'),
|
|
176
|
+
confirmation_rate: z
|
|
177
|
+
.number()
|
|
178
|
+
.min(0)
|
|
179
|
+
.max(1)
|
|
180
|
+
.describe('Rate of user confirmations for this pattern (0-1)'),
|
|
181
|
+
typical_reasoning: z.array(z.string()).describe('Common user reasoning for this pattern'),
|
|
182
|
+
confidence: z.number().min(0).max(1).describe('Confidence in this pattern (0-1)'),
|
|
183
|
+
})
|
|
184
|
+
.describe('User confirmation pattern for intent prediction');
|
|
185
|
+
// 基本安全分類ルール
|
|
186
|
+
export const BasicSafetyRuleSchema = z
|
|
187
|
+
.object({
|
|
188
|
+
pattern: z.string().describe('Regular expression pattern'),
|
|
189
|
+
reasoning: z.string().describe('Human-readable reasoning for this rule'),
|
|
190
|
+
safety_level: SafetyLevelSchema.describe('Safety level assigned to commands matching this pattern'),
|
|
191
|
+
})
|
|
192
|
+
.describe('Basic safety classification rule');
|
|
193
|
+
// 設定ファイル全体の型定義
|
|
194
|
+
export const ShellServerConfigSchema = z
|
|
195
|
+
.object({
|
|
196
|
+
// 既存の設定は維持
|
|
197
|
+
server: z
|
|
198
|
+
.object({
|
|
199
|
+
name: z.string().default('MCP Shell Server'),
|
|
200
|
+
version: z.string().default('2.2.0'),
|
|
201
|
+
})
|
|
202
|
+
.optional(),
|
|
203
|
+
// 新規: Enhanced Security設定
|
|
204
|
+
enhanced_security: EnhancedSecurityConfigSchema.optional(),
|
|
205
|
+
// 新規: 基本安全分類ルール
|
|
206
|
+
basic_safety_rules: z
|
|
207
|
+
.array(BasicSafetyRuleSchema)
|
|
208
|
+
.optional()
|
|
209
|
+
.describe('Custom basic safety classification rules'),
|
|
210
|
+
})
|
|
211
|
+
.describe('Complete MCP Shell Server configuration');
|
|
212
|
+
// デフォルト設定 (LLM中心設計)
|
|
213
|
+
export const DEFAULT_ENHANCED_SECURITY_CONFIG = {
|
|
214
|
+
enhanced_mode_enabled: true, // Enhanced Evaluatorを使用するため有効化
|
|
215
|
+
basic_safe_classification: true,
|
|
216
|
+
llm_evaluation_enabled: true, // LLM中心設計: デフォルトでLLM評価有効
|
|
217
|
+
elicitation_enabled: true, // LLM中心設計: デフォルトでElicitation有効
|
|
218
|
+
enable_pattern_filtering: false, // LLM中心設計: デフォルトで全コマンドLLM評価
|
|
219
|
+
disable_algorithmic_preprocessing: true,
|
|
220
|
+
max_additional_history_for_context: 20,
|
|
221
|
+
enable_command_output_context: true,
|
|
222
|
+
command_history_enhanced: true,
|
|
223
|
+
history_retention_days: 30,
|
|
224
|
+
max_history_entries: 1000,
|
|
225
|
+
llm_provider: 'openai',
|
|
226
|
+
llm_model: 'gpt-4',
|
|
227
|
+
llm_timeout_seconds: 3,
|
|
228
|
+
enable_resubmission_learning: true,
|
|
229
|
+
max_resubmission_attempts: 3,
|
|
230
|
+
safety_level_thresholds: {
|
|
231
|
+
require_confirmation: 4,
|
|
232
|
+
auto_deny: 5,
|
|
233
|
+
},
|
|
234
|
+
};
|
|
235
|
+
// デフォルト基本安全ルール (限定的な安全コマンドのみ)
|
|
236
|
+
export const DEFAULT_BASIC_SAFETY_RULES = [
|
|
237
|
+
// 表示・確認系(引数制限あり)
|
|
238
|
+
{
|
|
239
|
+
pattern: '^ls(\\s+-[lart]*)?(\\s+[^|>;&]+)?$',
|
|
240
|
+
reasoning: 'Directory listing',
|
|
241
|
+
safety_level: 1,
|
|
242
|
+
},
|
|
243
|
+
{ pattern: '^pwd$', reasoning: 'Current directory', safety_level: 1 },
|
|
244
|
+
{ pattern: '^whoami$', reasoning: 'Current user', safety_level: 1 },
|
|
245
|
+
{ pattern: '^date(\\s+-[^|>;&]+)?$', reasoning: 'Date display', safety_level: 1 },
|
|
246
|
+
// ファイル内容表示(リダイレクト無し)
|
|
247
|
+
{ pattern: '^cat\\s+[^|>;&]+$', reasoning: 'File content display', safety_level: 1 },
|
|
248
|
+
{
|
|
249
|
+
pattern: '^head(\\s+-n\\s*\\d+)?\\s+[^|>;&]+$',
|
|
250
|
+
reasoning: 'File head display',
|
|
251
|
+
safety_level: 1,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
pattern: '^tail(\\s+-n\\s*\\d+)?\\s+[^|>;&]+$',
|
|
255
|
+
reasoning: 'File tail display',
|
|
256
|
+
safety_level: 1,
|
|
257
|
+
},
|
|
258
|
+
// 検索・フィルタ(基本形のみ)
|
|
259
|
+
{ pattern: '^grep\\s+[^|>;&]+\\s+[^|>;&]+$', reasoning: 'Simple grep search', safety_level: 1 },
|
|
260
|
+
{ pattern: '^wc(\\s+-[lwc])?\\s+[^|>;&]+$', reasoning: 'Word count', safety_level: 1 },
|
|
261
|
+
{ pattern: '^which\\s+[a-zA-Z0-9_-]+$', reasoning: 'Command location', safety_level: 1 },
|
|
262
|
+
];
|
|
263
|
+
// ========================================
|
|
264
|
+
// Function Call Handler Types and Interfaces
|
|
265
|
+
// ========================================
|
|
266
|
+
// Function Call Handler Arguments Types
|
|
267
|
+
export const EvaluateCommandSecurityArgsSchema = z.object({
|
|
268
|
+
command: z.string(),
|
|
269
|
+
working_directory: z.string(),
|
|
270
|
+
additional_context: z.string().optional()
|
|
271
|
+
});
|
|
272
|
+
export const ReevaluateWithUserIntentArgsSchema = z.object({
|
|
273
|
+
command: z.string(),
|
|
274
|
+
working_directory: z.string(),
|
|
275
|
+
additional_context: z.string().optional(),
|
|
276
|
+
user_intent: z.string(),
|
|
277
|
+
previous_evaluation: SimplifiedLLMEvaluationResultSchema
|
|
278
|
+
});
|
|
279
|
+
export const ReevaluateWithAdditionalContextArgsSchema = z.object({
|
|
280
|
+
command: z.string(),
|
|
281
|
+
working_directory: z.string(),
|
|
282
|
+
additional_context: z.string().optional(),
|
|
283
|
+
command_history: z.array(z.string()).optional(),
|
|
284
|
+
execution_results: z.array(z.string()).optional()
|
|
285
|
+
});
|
|
286
|
+
//# sourceMappingURL=enhanced-security.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enhanced-security.js","sourceRoot":"","sources":["../../src/types/enhanced-security.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uEAAuE;AACvE,sEAAsE;AAEtE,0BAA0B;AAC1B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,EAAE;KACR,GAAG,EAAE;KACL,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,CAAC,CAAC;KACN,QAAQ,CAAC,oDAAoD,CAAC,CAAC;AAGlE,sCAAsC;AACtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,sBAAsB,CAAC,CAAC;KACnF,QAAQ,CAAC,sDAAsD,CAAC,CAAC;AAIpE,oDAAoD;AACpD,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,iBAAiB,EAAE,sBAAsB;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,2BAA2B,EAAE,CAAC,CAAC,MAAM,CAAC;QACpC,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAChD,2BAA2B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QAC3D,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC5C,CAAC;IACF,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,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AC,MAAM,CAAC;IAChE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC7B,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC/C,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ExecutionModeSchema: z.ZodEnum<["foreground", "background", "detached", "adaptive"]>;
|
|
3
|
+
export type ExecutionMode = z.infer<typeof ExecutionModeSchema>;
|
|
4
|
+
declare const ExecutionStatusSchema: z.ZodEnum<["completed", "running", "failed", "timeout"]>;
|
|
5
|
+
export type ExecutionStatus = z.infer<typeof ExecutionStatusSchema>;
|
|
6
|
+
export declare const ShellTypeSchema: z.ZodEnum<["bash", "zsh", "fish", "cmd", "powershell"]>;
|
|
7
|
+
export type ShellType = z.infer<typeof ShellTypeSchema>;
|
|
8
|
+
declare const TerminalStatusSchema: z.ZodEnum<["active", "idle", "closed"]>;
|
|
9
|
+
export type TerminalStatus = z.infer<typeof TerminalStatusSchema>;
|
|
10
|
+
export declare const ProcessSignalSchema: z.ZodEnum<["TERM", "KILL", "INT", "HUP", "USR1", "USR2"]>;
|
|
11
|
+
export type ProcessSignal = z.infer<typeof ProcessSignalSchema>;
|
|
12
|
+
export declare const OutputTypeSchema: z.ZodEnum<["stdout", "stderr", "combined", "log", "all"]>;
|
|
13
|
+
export type OutputType = z.infer<typeof OutputTypeSchema>;
|
|
14
|
+
declare const ErrorCategorySchema: z.ZodEnum<["AUTH", "PARAM", "RESOURCE", "EXECUTION", "SYSTEM", "SECURITY"]>;
|
|
15
|
+
export type ErrorCategory = z.infer<typeof ErrorCategorySchema>;
|
|
16
|
+
export declare const EnvironmentVariablesSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
17
|
+
export type EnvironmentVariables = z.infer<typeof EnvironmentVariablesSchema>;
|
|
18
|
+
export declare const DimensionsSchema: z.ZodObject<{
|
|
19
|
+
width: z.ZodNumber;
|
|
20
|
+
height: z.ZodNumber;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
}, {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
}>;
|
|
28
|
+
export type Dimensions = z.infer<typeof DimensionsSchema>;
|
|
29
|
+
export type OutputTruncationReason = 'size_limit' | 'timeout' | 'user_interrupt' | 'error' | 'background_transition';
|
|
30
|
+
export interface OutputStatus {
|
|
31
|
+
complete: boolean;
|
|
32
|
+
reason?: OutputTruncationReason;
|
|
33
|
+
available_via_output_id: boolean;
|
|
34
|
+
recommended_action?: string | undefined;
|
|
35
|
+
}
|
|
36
|
+
export interface GuidanceInfo {
|
|
37
|
+
pipeline_usage: string;
|
|
38
|
+
suggested_commands: string[];
|
|
39
|
+
background_processing?: {
|
|
40
|
+
status_check: string;
|
|
41
|
+
monitoring: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface ExecutionInfo {
|
|
45
|
+
execution_id: string;
|
|
46
|
+
command: string;
|
|
47
|
+
status: ExecutionStatus;
|
|
48
|
+
exit_code?: number;
|
|
49
|
+
process_id?: number;
|
|
50
|
+
working_directory?: string;
|
|
51
|
+
default_working_directory?: string;
|
|
52
|
+
working_directory_changed?: boolean;
|
|
53
|
+
environment_variables?: EnvironmentVariables;
|
|
54
|
+
execution_time_ms?: number;
|
|
55
|
+
memory_usage_mb?: number;
|
|
56
|
+
cpu_usage_percent?: number;
|
|
57
|
+
stdout?: string;
|
|
58
|
+
stderr?: string;
|
|
59
|
+
output_truncated?: boolean;
|
|
60
|
+
output_status?: OutputStatus;
|
|
61
|
+
output_id?: string;
|
|
62
|
+
terminal_id?: string;
|
|
63
|
+
transition_reason?: 'foreground_timeout' | 'output_size_limit';
|
|
64
|
+
truncation_reason?: OutputTruncationReason;
|
|
65
|
+
next_steps?: string[];
|
|
66
|
+
message?: string;
|
|
67
|
+
guidance?: GuidanceInfo;
|
|
68
|
+
created_at: string;
|
|
69
|
+
started_at?: string;
|
|
70
|
+
completed_at?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface SystemProcessInfo {
|
|
73
|
+
pid: number;
|
|
74
|
+
name: string;
|
|
75
|
+
path?: string;
|
|
76
|
+
sessionId?: number;
|
|
77
|
+
isSessionLeader: boolean;
|
|
78
|
+
parentPid?: number;
|
|
79
|
+
}
|
|
80
|
+
export declare const ProgramGuardSchema: z.ZodObject<{
|
|
81
|
+
sendTo: z.ZodString;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
sendTo: string;
|
|
84
|
+
}, {
|
|
85
|
+
sendTo: string;
|
|
86
|
+
}>;
|
|
87
|
+
export type ProgramGuard = z.infer<typeof ProgramGuardSchema>;
|
|
88
|
+
export interface ForegroundProcessInfo {
|
|
89
|
+
process?: SystemProcessInfo;
|
|
90
|
+
available: boolean;
|
|
91
|
+
error?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface TerminalInfo {
|
|
94
|
+
terminal_id: string;
|
|
95
|
+
session_name?: string;
|
|
96
|
+
shell_type: ShellType;
|
|
97
|
+
dimensions: Dimensions;
|
|
98
|
+
process_id: number;
|
|
99
|
+
status: TerminalStatus;
|
|
100
|
+
working_directory: string;
|
|
101
|
+
created_at: string;
|
|
102
|
+
last_activity: string;
|
|
103
|
+
foreground_process?: ForegroundProcessInfo;
|
|
104
|
+
}
|
|
105
|
+
export interface FileInfo {
|
|
106
|
+
output_id: string;
|
|
107
|
+
output_type: OutputType;
|
|
108
|
+
name: string;
|
|
109
|
+
size: number;
|
|
110
|
+
execution_id?: string;
|
|
111
|
+
created_at: string;
|
|
112
|
+
path: string;
|
|
113
|
+
}
|
|
114
|
+
export interface MonitorInfo {
|
|
115
|
+
monitor_id: string;
|
|
116
|
+
process_id: number;
|
|
117
|
+
status: 'active' | 'stopped';
|
|
118
|
+
started_at: string;
|
|
119
|
+
last_update: string;
|
|
120
|
+
metrics: {
|
|
121
|
+
cpu_usage_percent?: number;
|
|
122
|
+
memory_usage_mb?: number;
|
|
123
|
+
io_read_bytes?: number;
|
|
124
|
+
io_write_bytes?: number;
|
|
125
|
+
network_rx_bytes?: number;
|
|
126
|
+
network_tx_bytes?: number;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export interface SystemStats {
|
|
130
|
+
active_processes: number;
|
|
131
|
+
active_terminals: number;
|
|
132
|
+
total_files: number;
|
|
133
|
+
system_load: {
|
|
134
|
+
load1: number;
|
|
135
|
+
load5: number;
|
|
136
|
+
load15: number;
|
|
137
|
+
};
|
|
138
|
+
memory_usage: {
|
|
139
|
+
total_mb: number;
|
|
140
|
+
used_mb: number;
|
|
141
|
+
free_mb: number;
|
|
142
|
+
available_mb: number;
|
|
143
|
+
};
|
|
144
|
+
uptime_seconds: number;
|
|
145
|
+
collected_at: string;
|
|
146
|
+
}
|
|
147
|
+
export interface ErrorInfo {
|
|
148
|
+
code: string;
|
|
149
|
+
message: string;
|
|
150
|
+
category: ErrorCategory;
|
|
151
|
+
details?: Record<string, unknown>;
|
|
152
|
+
timestamp: string;
|
|
153
|
+
request_id?: string;
|
|
154
|
+
}
|
|
155
|
+
export interface SecurityRestrictions {
|
|
156
|
+
restriction_id: string;
|
|
157
|
+
security_mode: SecurityMode;
|
|
158
|
+
allowed_commands?: string[];
|
|
159
|
+
blocked_commands?: string[];
|
|
160
|
+
allowed_directories?: string[];
|
|
161
|
+
max_execution_time?: number;
|
|
162
|
+
max_memory_mb?: number;
|
|
163
|
+
enable_network?: boolean;
|
|
164
|
+
active: boolean;
|
|
165
|
+
configured_at: string;
|
|
166
|
+
}
|
|
167
|
+
export declare const SecurityModeSchema: z.ZodEnum<["permissive", "moderate", "restrictive", "custom", "enhanced", "enhanced-fast"]>;
|
|
168
|
+
export type SecurityMode = z.infer<typeof SecurityModeSchema>;
|
|
169
|
+
export interface ExecutionProcessInfo {
|
|
170
|
+
process_id: number;
|
|
171
|
+
execution_id: string;
|
|
172
|
+
command: string;
|
|
173
|
+
status: ExecutionStatus;
|
|
174
|
+
created_at: string;
|
|
175
|
+
working_directory?: string;
|
|
176
|
+
environment_variables?: EnvironmentVariables;
|
|
177
|
+
started_at?: string;
|
|
178
|
+
completed_at?: string;
|
|
179
|
+
}
|
|
180
|
+
export interface ElicitationResult {
|
|
181
|
+
status: 'timeout' | 'canceled' | 'confirmed' | 'declined';
|
|
182
|
+
user_response?: Record<string, unknown> | undefined;
|
|
183
|
+
timeout_duration_ms?: number;
|
|
184
|
+
question_asked: string;
|
|
185
|
+
timestamp: string;
|
|
186
|
+
comment?: string;
|
|
187
|
+
}
|
|
188
|
+
export declare abstract class SafetyEvaluationResult {
|
|
189
|
+
protected reasoning: string;
|
|
190
|
+
protected llm_evaluation_used?: boolean | undefined;
|
|
191
|
+
protected elicitation_result?: ElicitationResult | undefined;
|
|
192
|
+
constructor(reasoning: string, llmEvaluationUsed?: boolean, elicitationResult?: ElicitationResult);
|
|
193
|
+
abstract generateToolResponse(): unknown;
|
|
194
|
+
abstract getEvaluationResult(): string;
|
|
195
|
+
}
|
|
196
|
+
export declare abstract class SafetyEvaluationCompletedResult extends SafetyEvaluationResult {
|
|
197
|
+
protected confirmation_message?: string | undefined;
|
|
198
|
+
protected user_response?: Record<string, unknown> | undefined;
|
|
199
|
+
constructor(reasoning: string, llmEvaluationUsed?: boolean, elicitationResult?: ElicitationResult, confirmationMessage?: string, userResponse?: Record<string, unknown>);
|
|
200
|
+
protected buildCommonResponse(): Record<string, unknown>;
|
|
201
|
+
}
|
|
202
|
+
export declare class SafetyEvaluationAllowResult extends SafetyEvaluationCompletedResult {
|
|
203
|
+
private suggested_alternatives?;
|
|
204
|
+
private context_analysis?;
|
|
205
|
+
private next_action?;
|
|
206
|
+
constructor(reasoning: string, llmEvaluationUsed?: boolean, elicitationResult?: ElicitationResult, suggestedAlternatives?: string[], contextAnalysis?: unknown, nextAction?: string, confirmationMessage?: string, userResponse?: Record<string, unknown>);
|
|
207
|
+
getEvaluationResult(): string;
|
|
208
|
+
generateToolResponse(): {
|
|
209
|
+
suggested_alternatives: string[] | undefined;
|
|
210
|
+
context_analysis: unknown;
|
|
211
|
+
next_action: string | undefined;
|
|
212
|
+
evaluation_result: string;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
export declare class SafetyEvaluationDenyResult extends SafetyEvaluationCompletedResult {
|
|
216
|
+
private suggested_alternatives?;
|
|
217
|
+
private next_action?;
|
|
218
|
+
constructor(reasoning: string, llmEvaluationUsed?: boolean, elicitationResult?: ElicitationResult, suggestedAlternatives?: string[], nextAction?: string, confirmationMessage?: string, userResponse?: Record<string, unknown>);
|
|
219
|
+
getEvaluationResult(): string;
|
|
220
|
+
generateToolResponse(): {
|
|
221
|
+
suggested_alternatives: string[] | undefined;
|
|
222
|
+
next_action: string | undefined;
|
|
223
|
+
evaluation_result: string;
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
export declare class SafetyEvaluationAiAssistantConfirmResult extends SafetyEvaluationCompletedResult {
|
|
227
|
+
private suggested_alternatives?;
|
|
228
|
+
private context_analysis?;
|
|
229
|
+
private next_action;
|
|
230
|
+
constructor(reasoning: string, nextAction: {
|
|
231
|
+
instruction: string;
|
|
232
|
+
method: string;
|
|
233
|
+
expected_outcome: string;
|
|
234
|
+
executable_commands?: string[];
|
|
235
|
+
}, llmEvaluationUsed?: boolean, elicitationResult?: ElicitationResult, suggestedAlternatives?: string[], contextAnalysis?: unknown, confirmationMessage?: string, userResponse?: Record<string, unknown>);
|
|
236
|
+
getEvaluationResult(): string;
|
|
237
|
+
generateToolResponse(): {
|
|
238
|
+
suggested_alternatives: string[] | undefined;
|
|
239
|
+
context_analysis: unknown;
|
|
240
|
+
next_action: {
|
|
241
|
+
instruction: string;
|
|
242
|
+
method: string;
|
|
243
|
+
expected_outcome: string;
|
|
244
|
+
executable_commands?: string[];
|
|
245
|
+
};
|
|
246
|
+
evaluation_result: string;
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
export declare class SafetyEvaluationResultFactory {
|
|
250
|
+
static createAllow(reasoning: string, options?: {
|
|
251
|
+
llmEvaluationUsed?: boolean;
|
|
252
|
+
elicitationResult?: ElicitationResult | undefined;
|
|
253
|
+
suggestedAlternatives?: string[] | undefined;
|
|
254
|
+
contextAnalysis?: unknown;
|
|
255
|
+
nextAction?: string | undefined;
|
|
256
|
+
confirmationMessage?: string | undefined;
|
|
257
|
+
userResponse?: Record<string, unknown> | undefined;
|
|
258
|
+
}): SafetyEvaluationAllowResult;
|
|
259
|
+
static createDeny(reasoning: string, options?: {
|
|
260
|
+
llmEvaluationUsed?: boolean;
|
|
261
|
+
elicitationResult?: ElicitationResult | undefined;
|
|
262
|
+
suggestedAlternatives?: string[] | undefined;
|
|
263
|
+
nextAction?: string | undefined;
|
|
264
|
+
confirmationMessage?: string | undefined;
|
|
265
|
+
userResponse?: Record<string, unknown> | undefined;
|
|
266
|
+
}): SafetyEvaluationDenyResult;
|
|
267
|
+
static createAiAssistantConfirm(reasoning: string, nextAction: {
|
|
268
|
+
instruction: string;
|
|
269
|
+
method: string;
|
|
270
|
+
expected_outcome: string;
|
|
271
|
+
executable_commands?: string[];
|
|
272
|
+
}, options?: {
|
|
273
|
+
llmEvaluationUsed?: boolean;
|
|
274
|
+
elicitationResult?: ElicitationResult | undefined;
|
|
275
|
+
suggestedAlternatives?: string[] | undefined;
|
|
276
|
+
contextAnalysis?: unknown;
|
|
277
|
+
confirmationMessage?: string | undefined;
|
|
278
|
+
userResponse?: Record<string, unknown> | undefined;
|
|
279
|
+
}): SafetyEvaluationAiAssistantConfirmResult;
|
|
280
|
+
}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