@pcircle/footprint 1.2.2 → 1.3.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 +1 -1
- package/README.md +31 -43
- package/SKILL.md +45 -45
- package/dist/src/cli/constants.d.ts +20 -0
- package/dist/src/cli/constants.d.ts.map +1 -0
- package/dist/src/cli/constants.js +25 -0
- package/dist/src/cli/constants.js.map +1 -0
- package/dist/src/cli/index.d.ts +3 -0
- package/dist/src/cli/index.d.ts.map +1 -0
- package/dist/src/cli/index.js +25 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/setup.d.ts +6 -0
- package/dist/src/cli/setup.d.ts.map +1 -0
- package/dist/src/cli/setup.js +334 -0
- package/dist/src/cli/setup.js.map +1 -0
- package/dist/src/cli/types.d.ts +38 -0
- package/dist/src/cli/types.d.ts.map +1 -0
- package/dist/src/cli/types.js +5 -0
- package/dist/src/cli/types.js.map +1 -0
- package/dist/src/cli/utils/config.d.ts +19 -0
- package/dist/src/cli/utils/config.d.ts.map +1 -0
- package/dist/src/cli/utils/config.js +86 -0
- package/dist/src/cli/utils/config.js.map +1 -0
- package/dist/src/cli/utils/detect.d.ts +14 -0
- package/dist/src/cli/utils/detect.d.ts.map +1 -0
- package/dist/src/cli/utils/detect.js +57 -0
- package/dist/src/cli/utils/detect.js.map +1 -0
- package/dist/src/cli/utils/env.d.ts +10 -0
- package/dist/src/cli/utils/env.d.ts.map +1 -0
- package/dist/src/cli/utils/env.js +54 -0
- package/dist/src/cli/utils/env.js.map +1 -0
- package/dist/src/cli/utils/validation.d.ts +17 -0
- package/dist/src/cli/utils/validation.d.ts.map +1 -0
- package/dist/src/cli/utils/validation.js +77 -0
- package/dist/src/cli/utils/validation.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +13 -11
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib/storage/export.d.ts +2 -2
- package/dist/src/lib/storage/export.d.ts.map +1 -1
- package/dist/src/lib/storage/export.js +39 -39
- package/dist/src/lib/storage/export.js.map +1 -1
- package/dist/src/tools/capture-footprint.js +1 -1
- package/dist/src/tools/capture-footprint.js.map +1 -1
- package/dist/src/tools/delete-footprints.d.ts +2 -2
- package/dist/src/tools/delete-footprints.d.ts.map +1 -1
- package/dist/src/tools/delete-footprints.js +4 -4
- package/dist/src/tools/delete-footprints.js.map +1 -1
- package/dist/src/tools/export-footprints.d.ts +4 -4
- package/dist/src/tools/export-footprints.d.ts.map +1 -1
- package/dist/src/tools/export-footprints.js +6 -6
- package/dist/src/tools/export-footprints.js.map +1 -1
- package/dist/src/tools/get-footprint.js +19 -19
- package/dist/src/tools/get-footprint.js.map +1 -1
- package/dist/src/tools/list-footprints.d.ts +2 -2
- package/dist/src/tools/list-footprints.js +11 -11
- package/dist/src/tools/list-footprints.js.map +1 -1
- package/dist/src/tools/search-footprints.d.ts +2 -2
- package/dist/src/tools/search-footprints.js +11 -11
- package/dist/src/tools/search-footprints.js.map +1 -1
- package/dist/src/tools/suggest-capture.js +1 -1
- package/dist/src/tools/suggest-capture.js.map +1 -1
- package/dist/src/tools/verify-footprint.js +11 -11
- package/dist/src/tools/verify-footprint.js.map +1 -1
- package/dist/src/ui/register.js +2 -2
- package/dist/src/ui/register.js.map +1 -1
- package/dist/ui/dashboard.html +49 -49
- package/dist/ui/detail.html +9 -9
- package/dist/ui/export.html +17 -17
- package/package.json +13 -6
- package/dist/tests/error-handling.test.d.ts +0 -2
- package/dist/tests/error-handling.test.d.ts.map +0 -1
- package/dist/tests/error-handling.test.js +0 -114
- package/dist/tests/error-handling.test.js.map +0 -1
- package/dist/tests/fixtures.d.ts +0 -87
- package/dist/tests/fixtures.d.ts.map +0 -1
- package/dist/tests/fixtures.js +0 -130
- package/dist/tests/fixtures.js.map +0 -1
- package/dist/tests/integration.test.d.ts +0 -2
- package/dist/tests/integration.test.d.ts.map +0 -1
- package/dist/tests/integration.test.js +0 -115
- package/dist/tests/integration.test.js.map +0 -1
- package/dist/tests/resources.test.d.ts +0 -2
- package/dist/tests/resources.test.d.ts.map +0 -1
- package/dist/tests/resources.test.js +0 -73
- package/dist/tests/resources.test.js.map +0 -1
- package/dist/tests/setup.d.ts +0 -8
- package/dist/tests/setup.d.ts.map +0 -1
- package/dist/tests/setup.js +0 -8
- package/dist/tests/setup.js.map +0 -1
- package/dist/tests/tools.test.d.ts +0 -2
- package/dist/tests/tools.test.d.ts.map +0 -1
- package/dist/tests/tools.test.js +0 -224
- package/dist/tests/tools.test.js.map +0 -1
- package/dist/ui-tmp/ui/export.html +0 -409
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* global console, process, Buffer, NodeJS */
|
|
3
|
+
import prompts from "prompts";
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import ora from "ora";
|
|
6
|
+
import { timingSafeEqual } from "crypto";
|
|
7
|
+
import * as path from "path";
|
|
8
|
+
import { detectSystem } from "./utils/detect.js";
|
|
9
|
+
import { validatePassword, validatePath } from "./utils/validation.js";
|
|
10
|
+
import { readClaudeConfig, writeClaudeConfig, backupConfig, addFootprintToConfig, } from "./utils/config.js";
|
|
11
|
+
import { generateEnvExport, appendToShellRc } from "./utils/env.js";
|
|
12
|
+
import { DEFAULT_DATA_DIR } from "./constants.js";
|
|
13
|
+
import * as fs from "fs";
|
|
14
|
+
/**
|
|
15
|
+
* Extract error message from unknown error type
|
|
16
|
+
*/
|
|
17
|
+
function getErrorMessage(error) {
|
|
18
|
+
return error instanceof Error ? error.message : String(error);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Timing-safe string comparison to prevent timing attacks
|
|
22
|
+
*/
|
|
23
|
+
function safeCompare(a, b) {
|
|
24
|
+
if (a.length !== b.length)
|
|
25
|
+
return false;
|
|
26
|
+
// Convert strings to buffers for timing-safe comparison
|
|
27
|
+
const bufA = Buffer.from(a, "utf-8");
|
|
28
|
+
const bufB = Buffer.from(b, "utf-8");
|
|
29
|
+
return timingSafeEqual(bufA, bufB);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Welcome message
|
|
33
|
+
*/
|
|
34
|
+
function printWelcome() {
|
|
35
|
+
console.log(chalk.bold.cyan("\n🦶 Welcome to Footprint Setup!\n"));
|
|
36
|
+
console.log("Let's configure your AI audit trail in 3 simple steps.\n");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Print system info
|
|
40
|
+
*/
|
|
41
|
+
function printSystemInfo(system) {
|
|
42
|
+
console.log(chalk.gray("Detected System:"));
|
|
43
|
+
console.log(chalk.gray(` OS: ${system.platform}`));
|
|
44
|
+
console.log(chalk.gray(` Shell: ${system.shell}`));
|
|
45
|
+
if (system.claudeConfigPath) {
|
|
46
|
+
console.log(chalk.green(` ✅ Claude Desktop found at: ${system.claudeConfigPath}`));
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
console.log(chalk.yellow(` ⚠️ Claude Desktop config not found`));
|
|
50
|
+
}
|
|
51
|
+
console.log("");
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Prompt for setup configuration
|
|
55
|
+
*/
|
|
56
|
+
async function promptSetup(system) {
|
|
57
|
+
const response = await prompts([
|
|
58
|
+
{
|
|
59
|
+
type: "text",
|
|
60
|
+
name: "dataDir",
|
|
61
|
+
message: "Where should we store your data?",
|
|
62
|
+
initial: DEFAULT_DATA_DIR,
|
|
63
|
+
validate: (value) => {
|
|
64
|
+
const result = validatePath(value);
|
|
65
|
+
return result.valid ? true : result.message;
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: "password",
|
|
70
|
+
name: "passphrase",
|
|
71
|
+
message: "Create a secure passphrase (min 12 characters):",
|
|
72
|
+
validate: (value) => {
|
|
73
|
+
const result = validatePassword(value);
|
|
74
|
+
return result.valid ? true : result.message;
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: "password",
|
|
79
|
+
name: "confirmPassphrase",
|
|
80
|
+
message: "Confirm your passphrase:",
|
|
81
|
+
validate: (value, previous) => {
|
|
82
|
+
// Use timing-safe comparison to prevent timing attacks
|
|
83
|
+
return safeCompare(value, previous.passphrase)
|
|
84
|
+
? true
|
|
85
|
+
: "Passphrases do not match";
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: system.claudeConfigPath ? "confirm" : null,
|
|
90
|
+
name: "autoConfig",
|
|
91
|
+
message: "Auto-configure Claude Desktop?",
|
|
92
|
+
initial: true,
|
|
93
|
+
},
|
|
94
|
+
]);
|
|
95
|
+
if (!response.passphrase) {
|
|
96
|
+
return null; // User cancelled
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
dataDir: response.dataDir,
|
|
100
|
+
passphrase: response.passphrase,
|
|
101
|
+
autoConfig: response.autoConfig ?? false,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Print security warning about password storage
|
|
106
|
+
*/
|
|
107
|
+
function printSecurityWarning() {
|
|
108
|
+
console.log(chalk.bold.yellow("\n⚠️ Security Notice:\n"));
|
|
109
|
+
console.log(chalk.yellow("Your passphrase will be stored in configuration files on this system."));
|
|
110
|
+
console.log(chalk.yellow("We set restrictive permissions (600/700), but anyone with system access"));
|
|
111
|
+
console.log(chalk.yellow("or file system backups may be able to access it.\n"));
|
|
112
|
+
console.log(chalk.gray("Recommendations:"));
|
|
113
|
+
console.log(chalk.gray(" • Use a unique passphrase (not reused elsewhere)"));
|
|
114
|
+
console.log(chalk.gray(" • Ensure only you have access to this user account"));
|
|
115
|
+
console.log(chalk.gray(" • Encrypt your backups if they contain config files\n"));
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Configure Claude Desktop with improved error handling
|
|
119
|
+
*/
|
|
120
|
+
async function configureClaudeDesktop(configPath, config) {
|
|
121
|
+
const spinner = ora("Configuring Claude Desktop...").start();
|
|
122
|
+
try {
|
|
123
|
+
// Backup existing config
|
|
124
|
+
if (fs.existsSync(configPath)) {
|
|
125
|
+
const backupPath = backupConfig(configPath);
|
|
126
|
+
spinner.info(chalk.gray(`Backed up existing config to: ${backupPath}`));
|
|
127
|
+
}
|
|
128
|
+
// Read and update config
|
|
129
|
+
const claudeConfig = readClaudeConfig(configPath);
|
|
130
|
+
const updatedConfig = addFootprintToConfig(claudeConfig, config.dataDir, config.passphrase);
|
|
131
|
+
writeClaudeConfig(configPath, updatedConfig);
|
|
132
|
+
spinner.succeed(chalk.green("Claude Desktop configured!"));
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
spinner.fail(chalk.red(`Failed to configure Claude Desktop: ${getErrorMessage(error)}`));
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Setup environment variables with improved error handling
|
|
141
|
+
*/
|
|
142
|
+
async function setupEnvironment(system, config) {
|
|
143
|
+
if (!system.shellRcPath) {
|
|
144
|
+
console.log(chalk.yellow("\n⚠️ Shell RC file not found. Manual setup required:"));
|
|
145
|
+
console.log(chalk.gray(generateEnvExport(system.shell, config.dataDir, config.passphrase)));
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const { setupEnv } = await prompts({
|
|
149
|
+
type: "confirm",
|
|
150
|
+
name: "setupEnv",
|
|
151
|
+
message: `Add environment variables to ${system.shellRcPath}?`,
|
|
152
|
+
initial: true,
|
|
153
|
+
});
|
|
154
|
+
if (!setupEnv)
|
|
155
|
+
return;
|
|
156
|
+
const spinner = ora("Setting up environment variables...").start();
|
|
157
|
+
try {
|
|
158
|
+
const envExport = generateEnvExport(system.shell, config.dataDir, config.passphrase);
|
|
159
|
+
appendToShellRc(system.shellRcPath, envExport);
|
|
160
|
+
spinner.succeed(chalk.green("Environment variables configured!"));
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
spinner.fail(chalk.red(`Failed to setup environment: ${getErrorMessage(error)}`));
|
|
164
|
+
throw error; // Propagate error for rollback
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Create data directory with secure permissions (0o700)
|
|
169
|
+
*/
|
|
170
|
+
async function createDataDirectory(dataDir) {
|
|
171
|
+
const spinner = ora("Creating data directory...").start();
|
|
172
|
+
const normalized = validatePath(dataDir).normalizedPath;
|
|
173
|
+
try {
|
|
174
|
+
fs.mkdirSync(normalized, { recursive: true, mode: 0o700 });
|
|
175
|
+
spinner.succeed(chalk.green(`Data directory created: ${normalized}`));
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
const nodeError = error;
|
|
179
|
+
if (nodeError.code === "EEXIST") {
|
|
180
|
+
spinner.info(chalk.gray(`Data directory already exists: ${normalized}`));
|
|
181
|
+
// Ensure secure permissions on existing directory
|
|
182
|
+
try {
|
|
183
|
+
fs.chmodSync(normalized, 0o700);
|
|
184
|
+
}
|
|
185
|
+
catch (chmodError) {
|
|
186
|
+
spinner.warn(chalk.yellow(`Could not set permissions: ${getErrorMessage(chmodError)}`));
|
|
187
|
+
}
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
spinner.fail(chalk.red(`Failed to create directory: ${getErrorMessage(error)}`));
|
|
191
|
+
throw error;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Print manual configuration instructions when Claude Desktop not found
|
|
196
|
+
*/
|
|
197
|
+
function printManualConfigInstructions(config) {
|
|
198
|
+
console.log(chalk.yellow("\n⚠️ Claude Desktop not found. Manual configuration required."));
|
|
199
|
+
console.log(chalk.gray("Add to claude_desktop_config.json:"));
|
|
200
|
+
console.log(chalk.gray(JSON.stringify({
|
|
201
|
+
mcpServers: {
|
|
202
|
+
footprint: {
|
|
203
|
+
command: "npx",
|
|
204
|
+
args: ["@pcircle/footprint"],
|
|
205
|
+
env: {
|
|
206
|
+
FOOTPRINT_DATA_DIR: config.dataDir,
|
|
207
|
+
FOOTPRINT_PASSPHRASE: config.passphrase,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
}, null, 2)));
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Print next steps
|
|
215
|
+
*/
|
|
216
|
+
function printNextSteps(_config) {
|
|
217
|
+
console.log(chalk.bold.green("\n🎉 Setup Complete!\n"));
|
|
218
|
+
console.log(chalk.bold("Next steps:"));
|
|
219
|
+
console.log(chalk.gray(" 1. Close Claude Desktop completely"));
|
|
220
|
+
console.log(chalk.gray(" 2. Reopen Claude Desktop"));
|
|
221
|
+
console.log(chalk.gray(' 3. Say "capture this conversation" to test\n'));
|
|
222
|
+
console.log(chalk.yellow("⚠️ Important: Keep your passphrase safe!"));
|
|
223
|
+
console.log(chalk.gray(" Loss means permanent data loss.\n"));
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Create rollback action for directory removal
|
|
227
|
+
*/
|
|
228
|
+
function createDirectoryRollback(dirPath) {
|
|
229
|
+
return () => {
|
|
230
|
+
try {
|
|
231
|
+
if (fs.existsSync(dirPath)) {
|
|
232
|
+
fs.rmSync(dirPath, { recursive: true });
|
|
233
|
+
console.log(chalk.gray(` Rolled back: Removed ${dirPath}`));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
console.warn(chalk.yellow(` Warning: Failed to remove ${dirPath}: ${getErrorMessage(error)}`));
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Create rollback action for config restoration
|
|
243
|
+
*/
|
|
244
|
+
function createConfigRollback(backupPath, configPath) {
|
|
245
|
+
return () => {
|
|
246
|
+
try {
|
|
247
|
+
if (fs.existsSync(backupPath)) {
|
|
248
|
+
fs.copyFileSync(backupPath, configPath);
|
|
249
|
+
console.log(chalk.gray(` Rolled back: Restored config from backup`));
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
console.warn(chalk.yellow(` Warning: Failed to restore config: ${getErrorMessage(error)}`));
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Find the most recent backup file for a config
|
|
259
|
+
*/
|
|
260
|
+
function findLatestBackup(configPath) {
|
|
261
|
+
const dir = path.dirname(configPath);
|
|
262
|
+
const basename = path.basename(configPath);
|
|
263
|
+
const backupFiles = fs
|
|
264
|
+
.readdirSync(dir)
|
|
265
|
+
.filter((f) => f.startsWith(`${basename}.backup`));
|
|
266
|
+
if (backupFiles.length === 0)
|
|
267
|
+
return null;
|
|
268
|
+
return path.join(dir, backupFiles[backupFiles.length - 1]);
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Main setup flow with transaction-like rollback on failure
|
|
272
|
+
*/
|
|
273
|
+
export async function runSetup() {
|
|
274
|
+
// Track all changes for potential rollback
|
|
275
|
+
const rollbackActions = [];
|
|
276
|
+
try {
|
|
277
|
+
printWelcome();
|
|
278
|
+
const system = detectSystem();
|
|
279
|
+
printSystemInfo(system);
|
|
280
|
+
const config = await promptSetup(system);
|
|
281
|
+
if (!config) {
|
|
282
|
+
console.log(chalk.yellow("\nSetup cancelled."));
|
|
283
|
+
process.exit(0);
|
|
284
|
+
}
|
|
285
|
+
// Print security warning about password storage
|
|
286
|
+
printSecurityWarning();
|
|
287
|
+
// Create data directory (tracked for rollback)
|
|
288
|
+
const normalized = validatePath(config.dataDir).normalizedPath;
|
|
289
|
+
const directoryCreated = !fs.existsSync(normalized);
|
|
290
|
+
await createDataDirectory(config.dataDir);
|
|
291
|
+
if (directoryCreated) {
|
|
292
|
+
rollbackActions.push(createDirectoryRollback(normalized));
|
|
293
|
+
}
|
|
294
|
+
// Configure Claude Desktop if requested (tracked for rollback)
|
|
295
|
+
if (config.autoConfig && system.claudeConfigPath) {
|
|
296
|
+
await configureClaudeDesktop(system.claudeConfigPath, config);
|
|
297
|
+
// Track config backup for rollback
|
|
298
|
+
const backupPath = findLatestBackup(system.claudeConfigPath);
|
|
299
|
+
if (backupPath) {
|
|
300
|
+
rollbackActions.push(createConfigRollback(backupPath, system.claudeConfigPath));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
else if (!system.claudeConfigPath) {
|
|
304
|
+
printManualConfigInstructions(config);
|
|
305
|
+
}
|
|
306
|
+
// Setup environment variables (tracked for rollback)
|
|
307
|
+
await setupEnvironment(system, config);
|
|
308
|
+
// If we get here, setup succeeded - discard rollback actions
|
|
309
|
+
rollbackActions.length = 0;
|
|
310
|
+
printNextSteps(config);
|
|
311
|
+
}
|
|
312
|
+
catch (error) {
|
|
313
|
+
console.error(chalk.red(`\n❌ Setup failed: ${getErrorMessage(error)}`));
|
|
314
|
+
// Perform rollback if any changes were made
|
|
315
|
+
if (rollbackActions.length > 0) {
|
|
316
|
+
console.log(chalk.yellow("\n🔄 Rolling back changes...\n"));
|
|
317
|
+
// Execute rollback actions in reverse order
|
|
318
|
+
for (const action of rollbackActions.reverse()) {
|
|
319
|
+
await action();
|
|
320
|
+
}
|
|
321
|
+
console.log(chalk.green("\n✅ Rollback complete. No changes were made.\n"));
|
|
322
|
+
}
|
|
323
|
+
console.log(chalk.gray("\nTroubleshooting:"));
|
|
324
|
+
console.log(chalk.gray(" • Check file permissions"));
|
|
325
|
+
console.log(chalk.gray(" • Ensure Claude Desktop is not running"));
|
|
326
|
+
console.log(chalk.gray(" • Verify disk space is available\n"));
|
|
327
|
+
process.exit(1);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
// Run if executed directly
|
|
331
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
332
|
+
runSetup();
|
|
333
|
+
}
|
|
334
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/cli/setup.ts"],"names":[],"mappings":";AACA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AAC,sCAAsC,CAAC,CAAC,CAAC;QAEhE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,2BAA2B;AAC3B,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpD,QAAQ,EAAE,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI types for interactive setup
|
|
3
|
+
*/
|
|
4
|
+
export interface SetupConfig {
|
|
5
|
+
/** Directory to store Footprint data */
|
|
6
|
+
dataDir: string;
|
|
7
|
+
/** Encryption passphrase */
|
|
8
|
+
passphrase: string;
|
|
9
|
+
/** Auto-configure Claude Desktop */
|
|
10
|
+
autoConfig: boolean;
|
|
11
|
+
/** Skip backup of existing config */
|
|
12
|
+
skipBackup?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface SystemInfo {
|
|
15
|
+
/** Operating system platform */
|
|
16
|
+
platform: "darwin" | "linux" | "win32";
|
|
17
|
+
/** Default shell */
|
|
18
|
+
shell: "bash" | "zsh" | "fish" | "powershell";
|
|
19
|
+
/** Path to Claude Desktop config */
|
|
20
|
+
claudeConfigPath: string | null;
|
|
21
|
+
/** User home directory */
|
|
22
|
+
homeDir: string;
|
|
23
|
+
/** Shell RC file path */
|
|
24
|
+
shellRcPath: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface ClaudeConfig {
|
|
27
|
+
mcpServers?: Record<string, {
|
|
28
|
+
command: string;
|
|
29
|
+
args: string[];
|
|
30
|
+
env?: Record<string, string>;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export interface ValidationResult {
|
|
34
|
+
valid: boolean;
|
|
35
|
+
message?: string;
|
|
36
|
+
score?: number;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,gCAAgC;IAChC,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;IACvC,oBAAoB;IACpB,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,YAAY,CAAC;IAC9C,oCAAoC;IACpC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,MAAM,CACjB,MAAM,EACN;QACE,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC9B,CACF,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cli/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ClaudeConfig } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Read Claude Desktop config file
|
|
4
|
+
*/
|
|
5
|
+
export declare function readClaudeConfig(configPath: string): ClaudeConfig;
|
|
6
|
+
/**
|
|
7
|
+
* Write Claude Desktop config file with secure permissions (0o600)
|
|
8
|
+
* CRITICAL: Config contains passphrase, must be owner-only readable
|
|
9
|
+
*/
|
|
10
|
+
export declare function writeClaudeConfig(configPath: string, config: ClaudeConfig): void;
|
|
11
|
+
/**
|
|
12
|
+
* Backup existing config file with secure permissions (0o600)
|
|
13
|
+
*/
|
|
14
|
+
export declare function backupConfig(configPath: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Add Footprint to Claude config
|
|
17
|
+
*/
|
|
18
|
+
export declare function addFootprintToConfig(config: ClaudeConfig, dataDir: string, passphrase: string): ClaudeConfig;
|
|
19
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/cli/utils/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA0BhD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,CAcjE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,YAAY,GACnB,IAAI,CASN;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAYvD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,YAAY,CAed"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* global console, NodeJS */
|
|
2
|
+
import * as fs from "fs";
|
|
3
|
+
import * as path from "path";
|
|
4
|
+
/** Secure file permissions: owner read/write only */
|
|
5
|
+
const SECURE_FILE_MODE = 0o600;
|
|
6
|
+
/** Secure directory permissions: owner read/write/execute only */
|
|
7
|
+
const SECURE_DIR_MODE = 0o700;
|
|
8
|
+
/**
|
|
9
|
+
* Safely set file permissions with warning on failure
|
|
10
|
+
*/
|
|
11
|
+
function setSecurePermissions(filePath, showManualHint = false) {
|
|
12
|
+
try {
|
|
13
|
+
fs.chmodSync(filePath, SECURE_FILE_MODE);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
17
|
+
console.warn(`Warning: Could not set secure permissions on ${filePath}: ${message}`);
|
|
18
|
+
if (showManualHint) {
|
|
19
|
+
console.warn(" Please manually restrict access to this file (chmod 600 on Unix).");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Read Claude Desktop config file
|
|
25
|
+
*/
|
|
26
|
+
export function readClaudeConfig(configPath) {
|
|
27
|
+
try {
|
|
28
|
+
if (!fs.existsSync(configPath)) {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
return JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
const nodeError = error;
|
|
35
|
+
if (nodeError.code === "ENOENT") {
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
38
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
39
|
+
throw new Error(`Failed to read config at ${configPath}: ${message}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Write Claude Desktop config file with secure permissions (0o600)
|
|
44
|
+
* CRITICAL: Config contains passphrase, must be owner-only readable
|
|
45
|
+
*/
|
|
46
|
+
export function writeClaudeConfig(configPath, config) {
|
|
47
|
+
const dir = path.dirname(configPath);
|
|
48
|
+
if (!fs.existsSync(dir)) {
|
|
49
|
+
fs.mkdirSync(dir, { recursive: true, mode: SECURE_DIR_MODE });
|
|
50
|
+
}
|
|
51
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
52
|
+
setSecurePermissions(configPath, true);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Backup existing config file with secure permissions (0o600)
|
|
56
|
+
*/
|
|
57
|
+
export function backupConfig(configPath) {
|
|
58
|
+
if (!fs.existsSync(configPath)) {
|
|
59
|
+
throw new Error("Config file does not exist");
|
|
60
|
+
}
|
|
61
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
62
|
+
const backupPath = `${configPath}.backup-${timestamp}`;
|
|
63
|
+
fs.copyFileSync(configPath, backupPath);
|
|
64
|
+
setSecurePermissions(backupPath);
|
|
65
|
+
return backupPath;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Add Footprint to Claude config
|
|
69
|
+
*/
|
|
70
|
+
export function addFootprintToConfig(config, dataDir, passphrase) {
|
|
71
|
+
return {
|
|
72
|
+
...config,
|
|
73
|
+
mcpServers: {
|
|
74
|
+
...config.mcpServers,
|
|
75
|
+
footprint: {
|
|
76
|
+
command: "npx",
|
|
77
|
+
args: ["@pcircle/footprint"],
|
|
78
|
+
env: {
|
|
79
|
+
FOOTPRINT_DATA_DIR: dataDir,
|
|
80
|
+
FOOTPRINT_PASSPHRASE: passphrase,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/cli/utils/config.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAE5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,qDAAqD;AACrD,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,kEAAkE;AAClE,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B;;GAEG;AACH,SAAS,oBAAoB,CAAC,Q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}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SystemInfo } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Detect current operating system and environment
|
|
4
|
+
*/
|
|
5
|
+
export declare function detectSystem(): SystemInfo;
|
|
6
|
+
/**
|
|
7
|
+
* Detect user's default shell
|
|
8
|
+
*/
|
|
9
|
+
export declare function detectShell(): SystemInfo['shell'];
|
|
10
|
+
/**
|
|
11
|
+
* Find Claude Desktop config file path
|
|
12
|
+
*/
|
|
13
|
+
export declare function findClaudeConfig(): string | null;
|
|
14
|
+
//# sourceMappingURL=detect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../../src/cli/utils/detect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C;;GAEG;AACH,wBAAgB,YAAY,IAAI,UAAU,CAczC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,UAAU,CAAC,OAAO,CAAC,CASjD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAOhD"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as os from 'os';
|
|
2
|
+
import * as fs from 'fs';
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
import { CLAUDE_CONFIG_PATHS, SHELL_RC_FILES } from '../constants.js';
|
|
5
|
+
/**
|
|
6
|
+
* Detect current operating system and environment
|
|
7
|
+
*/
|
|
8
|
+
export function detectSystem() {
|
|
9
|
+
const platform = os.platform();
|
|
10
|
+
const shell = detectShell();
|
|
11
|
+
const homeDir = os.homedir();
|
|
12
|
+
const claudeConfigPath = findClaudeConfig();
|
|
13
|
+
const shellRcPath = findShellRcPath(shell, homeDir);
|
|
14
|
+
return {
|
|
15
|
+
platform,
|
|
16
|
+
shell,
|
|
17
|
+
claudeConfigPath,
|
|
18
|
+
homeDir,
|
|
19
|
+
shellRcPath,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Detect user's default shell
|
|
24
|
+
*/
|
|
25
|
+
export function detectShell() {
|
|
26
|
+
const shellEnv = process.env.SHELL || '';
|
|
27
|
+
if (shellEnv.includes('zsh'))
|
|
28
|
+
return 'zsh';
|
|
29
|
+
if (shellEnv.includes('bash'))
|
|
30
|
+
return 'bash';
|
|
31
|
+
if (shellEnv.includes('fish'))
|
|
32
|
+
return 'fish';
|
|
33
|
+
if (process.platform === 'win32')
|
|
34
|
+
return 'powershell';
|
|
35
|
+
return 'bash'; // Default fallback
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Find Claude Desktop config file path
|
|
39
|
+
*/
|
|
40
|
+
export function findClaudeConfig() {
|
|
41
|
+
const platform = os.platform();
|
|
42
|
+
const configPath = CLAUDE_CONFIG_PATHS[platform];
|
|
43
|
+
if (!configPath)
|
|
44
|
+
return null;
|
|
45
|
+
return fs.existsSync(configPath) ? configPath : null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Find shell RC file path
|
|
49
|
+
*/
|
|
50
|
+
function findShellRcPath(shell, homeDir) {
|
|
51
|
+
const rcFile = SHELL_RC_FILES[shell];
|
|
52
|
+
if (!rcFile)
|
|
53
|
+
return null;
|
|
54
|
+
const rcPath = path.join(homeDir, rcFile);
|
|
55
|
+
return fs.existsSync(rcPath) ? rcPath : null;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=detect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.js","sourceRoot":"","sources":["../../../../src/cli/utils/detect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,i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a,EAAE,OAAe;IACrD,MAAM,MAAM,GAAG,cAAc,CAAC,KAAoC,CAAC,CAAC;IACpE,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1C,OAAO,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate environment variable export statement with proper escaping
|
|
3
|
+
* Note: _shell parameter reserved for future shell-specific syntax (e.g., fish)
|
|
4
|
+
*/
|
|
5
|
+
export declare function generateEnvExport(_shell: string, dataDir: string, passphrase: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Append environment variables to shell RC file with secure permissions (0o600)
|
|
8
|
+
*/
|
|
9
|
+
export declare function appendToShellRc(rcPath: string, content: string): void;
|
|
10
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../src/cli/utils/env.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,MAAM,CAQR;AAMD;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CA8BrE"}
|