cliskill 1.1.2 → 1.1.4
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 +245 -484
- package/dist/bootstrap/cli.js +2 -2
- package/dist/{chunk-AJENHWD3.js → chunk-S7IQHES2.js} +1 -1
- package/dist/chunk-S7IQHES2.js.map +1 -0
- package/dist/{chunk-SDHXIBKZ.js → chunk-V73UZD27.js} +21 -7
- package/dist/chunk-V73UZD27.js.map +1 -0
- package/dist/index.d.ts +14 -10
- package/dist/index.js +2 -2
- package/dist/{paths-OODUHG6V.js → paths-FVFXSRUD.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-AJENHWD3.js.map +0 -1
- package/dist/chunk-SDHXIBKZ.js.map +0 -1
- /package/dist/{paths-OODUHG6V.js.map → paths-FVFXSRUD.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -244,8 +244,12 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
244
244
|
maxMemorySize?: number | undefined;
|
|
245
245
|
idleThreshold?: number | undefined;
|
|
246
246
|
}>>;
|
|
247
|
-
/** MCP servers — external tool providers via Model Context Protocol
|
|
248
|
-
|
|
247
|
+
/** MCP servers — external tool providers via Model Context Protocol.
|
|
248
|
+
* Accepts both array format (our native) and object/map format (Claude/Cursor compat).
|
|
249
|
+
* Object format: { "server-name": { command, args, env, transport } }
|
|
250
|
+
* Array format: [{ name, command, args, env, transport }]
|
|
251
|
+
*/
|
|
252
|
+
mcpServers: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
249
253
|
/** Unique name for this MCP server */
|
|
250
254
|
name: z.ZodString;
|
|
251
255
|
/** Command to start the MCP server process */
|
|
@@ -268,7 +272,13 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
268
272
|
args?: string[] | undefined;
|
|
269
273
|
env?: Record<string, string> | undefined;
|
|
270
274
|
transport?: "stdio" | undefined;
|
|
271
|
-
}>, "many"
|
|
275
|
+
}>, "many">>, {
|
|
276
|
+
name: string;
|
|
277
|
+
command: string;
|
|
278
|
+
args: string[];
|
|
279
|
+
transport: "stdio";
|
|
280
|
+
env?: Record<string, string> | undefined;
|
|
281
|
+
}[], unknown>;
|
|
272
282
|
}, "strip", z.ZodTypeAny, {
|
|
273
283
|
providers: {
|
|
274
284
|
name: string;
|
|
@@ -406,13 +416,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
406
416
|
maxMemorySize?: number | undefined;
|
|
407
417
|
idleThreshold?: number | undefined;
|
|
408
418
|
} | undefined;
|
|
409
|
-
mcpServers?:
|
|
410
|
-
name: string;
|
|
411
|
-
command: string;
|
|
412
|
-
args?: string[] | undefined;
|
|
413
|
-
env?: Record<string, string> | undefined;
|
|
414
|
-
transport?: "stdio" | undefined;
|
|
415
|
-
}[] | undefined;
|
|
419
|
+
mcpServers?: unknown;
|
|
416
420
|
}>;
|
|
417
421
|
type AppConfig = z.infer<typeof appConfigSchema>;
|
|
418
422
|
|
package/dist/index.js
CHANGED
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
renderInkApp,
|
|
29
29
|
runAgentLoop,
|
|
30
30
|
runCli
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-V73UZD27.js";
|
|
32
32
|
import {
|
|
33
33
|
getGlobalSkillsDir,
|
|
34
34
|
getHistoryPath
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-S7IQHES2.js";
|
|
36
36
|
|
|
37
37
|
// src/memory/store.ts
|
|
38
38
|
import { readFile, writeFile, mkdir, readdir, stat, unlink } from "fs/promises";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getTmpDir,
|
|
17
17
|
migrateLegacyConfig,
|
|
18
18
|
resolveConfigPath
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-S7IQHES2.js";
|
|
20
20
|
export {
|
|
21
21
|
ensureDataDir,
|
|
22
22
|
getConfigPath,
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
migrateLegacyConfig,
|
|
37
37
|
resolveConfigPath
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=paths-
|
|
39
|
+
//# sourceMappingURL=paths-FVFXSRUD.js.map
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/paths.ts"],"sourcesContent":["import { join } from 'node:path'\r\nimport { homedir } from 'node:os'\r\nimport { existsSync, mkdirSync, renameSync, readFileSync, writeFileSync } from 'node:fs'\r\n\r\n/**\r\n * Centralized path management for all cliskill data.\r\n *\r\n * All user data is stored under ~/.cliskill/:\r\n * config.json — main configuration\r\n * sessions/ — conversation session history\r\n * skills/ — global user skills\r\n * history.jsonl — command history\r\n * scheduled_tasks.json — cron/scheduled tasks\r\n * keybindings.json — custom keybindings\r\n * Info.plist — macOS URL scheme registration\r\n * tmp/ — temporary files\r\n * memory/ — global memory store\r\n */\r\n\r\nconst DATA_DIR_NAME = '.cliskill'\r\nconst CONFIG_FILENAME = 'config.json'\r\nconst LEGACY_CONFIG_FILENAME = '.cliskillrc.json'\r\n\r\n/** Get the base data directory: ~/.cliskill */\r\nexport function getDataDir(): string {\r\n return join(homedir(), DATA_DIR_NAME)\r\n}\r\n\r\n/** Ensure the data directory exists and return its path */\r\nexport function ensureDataDir(): string {\r\n const dir = getDataDir()\r\n if (!existsSync(dir)) {\r\n mkdirSync(dir, { recursive: true })\r\n }\r\n return dir\r\n}\r\n\r\n/** Path to the main config file: ~/.cliskill/config.json */\r\nexport function getConfigPath(): string {\r\n return join(getDataDir(), CONFIG_FILENAME)\r\n}\r\n\r\n/** Path to the legacy config file: ~/.cliskillrc.json */\r\nexport function getLegacyConfigPath(): string {\r\n return join(homedir(), LEGACY_CONFIG_FILENAME)\r\n}\r\n\r\n/** Path to sessions directory: ~/.cliskill/sessions/ */\r\nexport function getSessionsDir(): string {\r\n return join(getDataDir(), 'sessions')\r\n}\r\n\r\n/** Path to global skills directory: ~/.cliskill/skills/ */\r\nexport function getGlobalSkillsDir(): string {\r\n return join(getDataDir(), 'skills')\r\n}\r\n\r\n/** Path to command history: ~/.cliskill/history.jsonl */\r\nexport function getHistoryPath(): string {\r\n return join(getDataDir(), 'history.jsonl')\r\n}\r\n\r\n/** Path to scheduled tasks: ~/.cliskill/scheduled_tasks.json */\r\nexport function getScheduledTasksPath(): string {\r\n return join(getDataDir(), 'scheduled_tasks.json')\r\n}\r\n\r\n/** Path to custom keybindings: ~/.cliskill/keybindings.json */\r\nexport function getKeybindingsPath(): string {\r\n return join(getDataDir(), 'keybindings.json')\r\n}\r\n\r\n/** Path to macOS URL scheme plist: ~/.cliskill/Info.plist */\r\nexport function getPlistPath(): string {\r\n return join(getDataDir(), 'Info.plist')\r\n}\r\n\r\n/** Path to temp directory: ~/.cliskill/tmp/ */\r\nexport function getTmpDir(): string {\r\n return join(getDataDir(), 'tmp')\r\n}\r\n\r\n/** Path to global memory directory: ~/.cliskill/memory/ */\r\nexport function getGlobalMemoryDir(): string {\r\n return join(getDataDir(), 'memory')\r\n}\r\n\r\n/** Path to history subdirectory: ~/.cliskill/history/ */\r\nexport function getHistoryDir(): string {\r\n return join(getDataDir(), 'history')\r\n}\r\n\r\n/** Path to disk space check file: ~/.cliskill/history.json */\r\nexport function getDiskHistoryPath(): string {\r\n return join(getDataDir(), 'history.json')\r\n}\r\n\r\n/**\r\n * Migrate legacy config (~/.cliskillrc.json) to new location (~/.cliskill/config.json).\r\n * Returns true if migration was performed.\r\n */\r\nexport function migrateLegacyConfig(): boolean {\r\n const legacyPath = getLegacyConfigPath()\r\n const newPath = getConfigPath()\r\n\r\n if (!existsSync(legacyPath)) return false\r\n if (existsSync(newPath)) return false\r\n\r\n try {\r\n // Validate the legacy config is valid JSON before migrating\r\n const content = readFileSync(legacyPath, 'utf-8')\r\n JSON.parse(content)\r\n\r\n ensureDataDir()\r\n renameSync(legacyPath, newPath)\r\n return true\r\n } catch {\r\n return false\r\n }\r\n}\r\n\r\n/**\r\n * Get config path, checking both new and legacy locations.\r\n * Returns the path that exists, preferring the new location.\r\n */\r\nexport function resolveConfigPath(): string {\r\n const newPath = getConfigPath()\r\n if (existsSync(newPath)) return newPath\r\n\r\n const legacyPath = getLegacyConfigPath()\r\n if (existsSync(legacyPath)) return legacyPath\r\n\r\n return newPath\r\n}\r\n\r\n/**\r\n * Get all config search paths in priority order.\r\n * Used by doctor and loader to find config files.\r\n */\r\nexport function getConfigSearchPaths(): string[] {\r\n return [\r\n getConfigPath(),\r\n getLegacyConfigPath(),\r\n join(process.cwd(), '.cliskillrc.json'),\r\n ]\r\n}\r\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,YAAY,WAAW,YAAY,oBAAmC;AAiB/E,IAAM,gBAAgB;AACtB,IAAM,kBAAkB;AACxB,IAAM,yBAAyB;AAGxB,SAAS,aAAqB;AACnC,SAAO,KAAK,QAAQ,GAAG,aAAa;AACtC;AAGO,SAAS,gBAAwB;AACtC,QAAM,MAAM,WAAW;AACvB,MAAI,CAAC,WAAW,GAAG,GAAG;AACpB,cAAU,KAAK,EAAE,WAAW,KAAK,CAAC;AAAA,EACpC;AACA,SAAO;AACT;AAGO,SAAS,gBAAwB;AACtC,SAAO,KAAK,WAAW,GAAG,eAAe;AAC3C;AAGO,SAAS,sBAA8B;AAC5C,SAAO,KAAK,QAAQ,GAAG,sBAAsB;AAC/C;AAGO,SAAS,iBAAyB;AACvC,SAAO,KAAK,WAAW,GAAG,UAAU;AACtC;AAGO,SAAS,qBAA6B;AAC3C,SAAO,KAAK,WAAW,GAAG,QAAQ;AACpC;AAGO,SAAS,iBAAyB;AACvC,SAAO,KAAK,WAAW,GAAG,eAAe;AAC3C;AAGO,SAAS,wBAAgC;AAC9C,SAAO,KAAK,WAAW,GAAG,sBAAsB;AAClD;AAGO,SAAS,qBAA6B;AAC3C,SAAO,KAAK,WAAW,GAAG,kBAAkB;AAC9C;AAGO,SAAS,eAAuB;AACrC,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