@sysprompthub/sdk 0.1.0 → 0.2.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 +17 -101
- package/dist/assistant-manager.d.ts +21 -0
- package/dist/assistant-manager.d.ts.map +1 -0
- package/dist/assistant-manager.js +31 -0
- package/dist/assistant-manager.js.map +1 -0
- package/dist/assistant.d.ts +16 -0
- package/dist/assistant.d.ts.map +1 -0
- package/dist/assistant.js +22 -0
- package/dist/assistant.js.map +1 -0
- package/dist/base-config-manager.d.ts +46 -0
- package/dist/base-config-manager.d.ts.map +1 -0
- package/dist/base-config-manager.js +65 -0
- package/dist/base-config-manager.js.map +1 -0
- package/dist/client.d.ts +24 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +41 -3
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +6 -13
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -61
- package/dist/config.js.map +1 -1
- package/dist/default-config-manager.d.ts +22 -0
- package/dist/default-config-manager.d.ts.map +1 -0
- package/dist/default-config-manager.js +31 -0
- package/dist/default-config-manager.js.map +1 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/node-file-system.d.ts +52 -0
- package/dist/node-file-system.d.ts.map +1 -0
- package/dist/node-file-system.js +87 -0
- package/dist/node-file-system.js.map +1 -0
- package/dist/prompt.d.ts +31 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +46 -0
- package/dist/prompt.js.map +1 -0
- package/dist/sync.d.ts +9 -4
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +29 -21
- package/dist/sync.js.map +1 -1
- package/dist/types.d.ts +36 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +8 -1
- package/dist/types.js.map +1 -1
- package/dist/vscode-config-manager.d.ts +23 -0
- package/dist/vscode-config-manager.d.ts.map +1 -0
- package/dist/vscode-config-manager.js +50 -0
- package/dist/vscode-config-manager.js.map +1 -0
- package/dist/vscode-config.d.ts +4 -26
- package/dist/vscode-config.d.ts.map +1 -1
- package/dist/vscode-config.js +4 -89
- package/dist/vscode-config.js.map +1 -1
- package/package.json +11 -12
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { SysPromptHubClient } from './client.js';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
2
|
+
export { AssistantManager } from './assistant-manager.js';
|
|
3
|
+
export { VscodeConfigManager } from './vscode-config-manager.js';
|
|
4
|
+
export { DefaultConfigManager } from './default-config-manager.js';
|
|
5
5
|
export { SyncManager } from './sync.js';
|
|
6
|
-
export type { AssistantType,
|
|
7
|
-
export
|
|
6
|
+
export type { AssistantType, Config, Environment, Workspace, FileSystem, ConfigManager } from './types.js';
|
|
7
|
+
export { Assistant } from "./assistant.js";
|
|
8
|
+
export { NodeFileSystem } from "./node-file-system.js";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3G,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeFileSystem = exports.Assistant = exports.SyncManager = exports.DefaultConfigManager = exports.VscodeConfigManager = exports.AssistantManager = exports.SysPromptHubClient = void 0;
|
|
4
|
+
var client_js_1 = require("./client.js");
|
|
5
|
+
Object.defineProperty(exports, "SysPromptHubClient", { enumerable: true, get: function () { return client_js_1.SysPromptHubClient; } });
|
|
6
|
+
var assistant_manager_js_1 = require("./assistant-manager.js");
|
|
7
|
+
Object.defineProperty(exports, "AssistantManager", { enumerable: true, get: function () { return assistant_manager_js_1.AssistantManager; } });
|
|
8
|
+
var vscode_config_manager_js_1 = require("./vscode-config-manager.js");
|
|
9
|
+
Object.defineProperty(exports, "VscodeConfigManager", { enumerable: true, get: function () { return vscode_config_manager_js_1.VscodeConfigManager; } });
|
|
10
|
+
var default_config_manager_js_1 = require("./default-config-manager.js");
|
|
11
|
+
Object.defineProperty(exports, "DefaultConfigManager", { enumerable: true, get: function () { return default_config_manager_js_1.DefaultConfigManager; } });
|
|
12
|
+
var sync_js_1 = require("./sync.js");
|
|
13
|
+
Object.defineProperty(exports, "SyncManager", { enumerable: true, get: function () { return sync_js_1.SyncManager; } });
|
|
14
|
+
var assistant_js_1 = require("./assistant.js");
|
|
15
|
+
Object.defineProperty(exports, "Assistant", { enumerable: true, get: function () { return assistant_js_1.Assistant; } });
|
|
16
|
+
var node_file_system_js_1 = require("./node-file-system.js");
|
|
17
|
+
Object.defineProperty(exports, "NodeFileSystem", { enumerable: true, get: function () { return node_file_system_js_1.NodeFileSystem; } });
|
|
6
18
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAAiD;AAAxC,+GAAA,kBAAkB,OAAA;AAC3B,+DAA0D;AAAjD,wHAAA,gBAAgB,OAAA;AACzB,uEAAiE;AAAxD,+HAAA,mBAAmB,OAAA;AAC5B,yEAAkE;AAAzD,iIAAA,oBAAoB,OAAA;AAC7B,qCAAwC;AAA/B,sGAAA,WAAW,OAAA;AAEpB,+CAAyC;AAAjC,yGAAA,SAAS,OAAA;AACjB,6DAAqD;AAA7C,qHAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FileSystem } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Node.js file system implementation
|
|
4
|
+
*/
|
|
5
|
+
export declare class NodeFileSystem implements FileSystem {
|
|
6
|
+
private readonly baseDir;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new Node.js file system
|
|
9
|
+
* @param baseDir - Base directory for all operations (defaults to current working directory)
|
|
10
|
+
*/
|
|
11
|
+
constructor(baseDir?: string);
|
|
12
|
+
/**
|
|
13
|
+
* Checks if a file or directory exists
|
|
14
|
+
* @param path - Relative path to check
|
|
15
|
+
* @returns True if the path exists
|
|
16
|
+
*/
|
|
17
|
+
exists(path: string): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Reads a file's contents
|
|
20
|
+
* @param path - Relative path to the file
|
|
21
|
+
* @returns The file contents as a string
|
|
22
|
+
*/
|
|
23
|
+
read(path: string): Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Writes content to a file
|
|
26
|
+
* @param path - Relative path to the file
|
|
27
|
+
* @param content - Content to write
|
|
28
|
+
*/
|
|
29
|
+
write(path: string, content: string): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Deletes a file
|
|
32
|
+
* @param path - Relative path to the file
|
|
33
|
+
*/
|
|
34
|
+
delete(path: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a directory and all parent directories
|
|
37
|
+
* @param path - Relative path to the directory
|
|
38
|
+
*/
|
|
39
|
+
createDir(path: string): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Deletes a directory if it's empty
|
|
42
|
+
* @param path - Relative path to the directory
|
|
43
|
+
*/
|
|
44
|
+
deleteEmptyDir(path: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Resolves a relative path to an absolute path
|
|
47
|
+
* @param path - Relative path
|
|
48
|
+
* @returns Absolute path
|
|
49
|
+
*/
|
|
50
|
+
private resolve;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=node-file-system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-file-system.d.ts","sourceRoot":"","sources":["../src/node-file-system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAItC;;GAEG;AACH,qBAAa,cAAe,YAAW,UAAU;IAKnC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJpC;;;OAGG;gBAC0B,OAAO,GAAE,MAAsB;IAE5D;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAItC;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAInC;;;;OAIG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD;;;OAGG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQzC;;;OAGG;IACG,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5C;;;OAGG;IACG,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAajD;;;;OAIG;IACH,OAAO,CAAC,OAAO;CAGhB"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeFileSystem = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const promises_1 = require("fs/promises");
|
|
6
|
+
/**
|
|
7
|
+
* Node.js file system implementation
|
|
8
|
+
*/
|
|
9
|
+
class NodeFileSystem {
|
|
10
|
+
baseDir;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new Node.js file system
|
|
13
|
+
* @param baseDir - Base directory for all operations (defaults to current working directory)
|
|
14
|
+
*/
|
|
15
|
+
constructor(baseDir = process.cwd()) {
|
|
16
|
+
this.baseDir = baseDir;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Checks if a file or directory exists
|
|
20
|
+
* @param path - Relative path to check
|
|
21
|
+
* @returns True if the path exists
|
|
22
|
+
*/
|
|
23
|
+
exists(path) {
|
|
24
|
+
return (0, promises_1.stat)(this.resolve(path)).then(() => true, () => false);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Reads a file's contents
|
|
28
|
+
* @param path - Relative path to the file
|
|
29
|
+
* @returns The file contents as a string
|
|
30
|
+
*/
|
|
31
|
+
read(path) {
|
|
32
|
+
return (0, promises_1.readFile)(this.resolve(path), 'utf-8');
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Writes content to a file
|
|
36
|
+
* @param path - Relative path to the file
|
|
37
|
+
* @param content - Content to write
|
|
38
|
+
*/
|
|
39
|
+
write(path, content) {
|
|
40
|
+
return (0, promises_1.writeFile)(this.resolve(path), content, 'utf-8');
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Deletes a file
|
|
44
|
+
* @param path - Relative path to the file
|
|
45
|
+
*/
|
|
46
|
+
async delete(path) {
|
|
47
|
+
try {
|
|
48
|
+
await (0, promises_1.rm)(this.resolve(path), { force: true });
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
// Ignore errors
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Creates a directory and all parent directories
|
|
56
|
+
* @param path - Relative path to the directory
|
|
57
|
+
*/
|
|
58
|
+
async createDir(path) {
|
|
59
|
+
await (0, promises_1.mkdir)(this.resolve(path), { recursive: true });
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Deletes a directory if it's empty
|
|
63
|
+
* @param path - Relative path to the directory
|
|
64
|
+
*/
|
|
65
|
+
async deleteEmptyDir(path) {
|
|
66
|
+
try {
|
|
67
|
+
const dir = this.resolve(path);
|
|
68
|
+
const files = await (0, promises_1.readdir)(dir);
|
|
69
|
+
if (files.length === 0) {
|
|
70
|
+
await (0, promises_1.rm)(dir, { recursive: true, force: true });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
// Ignore errors
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Resolves a relative path to an absolute path
|
|
79
|
+
* @param path - Relative path
|
|
80
|
+
* @returns Absolute path
|
|
81
|
+
*/
|
|
82
|
+
resolve(path) {
|
|
83
|
+
return (0, path_1.join)(this.baseDir, path);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.NodeFileSystem = NodeFileSystem;
|
|
87
|
+
//# sourceMappingURL=node-file-system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-file-system.js","sourceRoot":"","sources":["../src/node-file-system.ts"],"names":[],"mappings":";;;AACA,+BAA0B;AAC1B,0CAA0E;AAE1E;;GAEG;AACH,MAAa,cAAc;IAKI;IAJ7B;;;OAGG;IACH,YAA6B,UAAkB,OAAO,CAAC,GAAG,EAAE;QAA/B,YAAO,GAAP,OAAO,CAAwB;IAAG,CAAC;IAEhE;;;;OAIG;IACH,MAAM,CAAC,IAAY;QACjB,OAAO,IAAA,eAAI,EAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,IAAY;QACf,OAAO,IAAA,mBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAY,EAAE,OAAe;QACjC,OAAO,IAAA,oBAAS,EAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,IAAI,CAAC;YACH,MAAM,IAAA,aAAE,EAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;QAC9C,CAAC;QAAC,MAAM,CAAC;YACP,gBAAgB;QAClB,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS,CAAC,IAAY;QAC1B,MAAM,IAAA,gBAAK,EAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc,CAAC,IAAY;QAC/B,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC/B,MAAM,KAAK,GAAG,MAAM,IAAA,kBAAO,EAAC,GAAG,CAAC,CAAC;YAEjC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAA,aAAE,EAAC,GAAG,EAAE,EAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;YAChD,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,gBAAgB;QAClB,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,OAAO,CAAC,IAAY;QAC1B,OAAO,IAAA,WAAI,EAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AA/ED,wCA+EC"}
|
package/dist/prompt.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Workspace } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a prompt file that can be synced to a specific location
|
|
4
|
+
*/
|
|
5
|
+
export declare class Prompt {
|
|
6
|
+
readonly promptPath: string;
|
|
7
|
+
private readonly promptDir;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new Prompt
|
|
10
|
+
* @param promptPath - Relative path to the prompt file
|
|
11
|
+
*/
|
|
12
|
+
constructor(promptPath: string);
|
|
13
|
+
/**
|
|
14
|
+
* Syncs the prompt file - updates if prompt content is provided, clears otherwise
|
|
15
|
+
* @param workspace - The workspace containing file system
|
|
16
|
+
* @param prompt - Optional prompt content to write. If null/undefined, the prompt file is cleared
|
|
17
|
+
*/
|
|
18
|
+
sync(workspace: Workspace, prompt?: string | null): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Writes a prompt to the prompt file
|
|
21
|
+
* @param workspace - The workspace to write to
|
|
22
|
+
* @param prompt - The prompt content to write
|
|
23
|
+
*/
|
|
24
|
+
update({ fs }: Workspace, prompt: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Clears the prompt file and removes empty directories
|
|
27
|
+
* @param workspace - The workspace to clear from
|
|
28
|
+
*/
|
|
29
|
+
clear({ fs }: Workspace): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAGrC;;GAEG;AACH,qBAAa,MAAM;IACjB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IAEnC;;;OAGG;gBACS,UAAU,EAAE,MAAM;IAK9B;;;;OAIG;IACG,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvE;;;;OAIG;IACG,MAAM,CAAC,EAAC,EAAE,EAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5D;;;OAGG;IACG,KAAK,CAAC,EAAC,EAAE,EAAC,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAI5C"}
|
package/dist/prompt.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Prompt = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
/**
|
|
6
|
+
* Represents a prompt file that can be synced to a specific location
|
|
7
|
+
*/
|
|
8
|
+
class Prompt {
|
|
9
|
+
promptPath;
|
|
10
|
+
promptDir;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new Prompt
|
|
13
|
+
* @param promptPath - Relative path to the prompt file
|
|
14
|
+
*/
|
|
15
|
+
constructor(promptPath) {
|
|
16
|
+
this.promptPath = promptPath;
|
|
17
|
+
this.promptDir = (0, path_1.dirname)(promptPath);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Syncs the prompt file - updates if prompt content is provided, clears otherwise
|
|
21
|
+
* @param workspace - The workspace containing file system
|
|
22
|
+
* @param prompt - Optional prompt content to write. If null/undefined, the prompt file is cleared
|
|
23
|
+
*/
|
|
24
|
+
async sync(workspace, prompt) {
|
|
25
|
+
return prompt ? this.update(workspace, prompt) : this.clear(workspace);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Writes a prompt to the prompt file
|
|
29
|
+
* @param workspace - The workspace to write to
|
|
30
|
+
* @param prompt - The prompt content to write
|
|
31
|
+
*/
|
|
32
|
+
async update({ fs }, prompt) {
|
|
33
|
+
await fs.createDir(this.promptDir);
|
|
34
|
+
await fs.write(this.promptPath, prompt);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Clears the prompt file and removes empty directories
|
|
38
|
+
* @param workspace - The workspace to clear from
|
|
39
|
+
*/
|
|
40
|
+
async clear({ fs }) {
|
|
41
|
+
await fs.delete(this.promptPath);
|
|
42
|
+
await fs.deleteEmptyDir(this.promptDir);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Prompt = Prompt;
|
|
46
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":";;;AACA,+BAA6B;AAE7B;;GAEG;AACH,MAAa,MAAM;IACR,UAAU,CAAS;IAEX,SAAS,CAAS;IAEnC;;;OAGG;IACH,YAAY,UAAkB;QAC5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,IAAA,cAAO,EAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI,CAAC,SAAoB,EAAE,MAAsB;QACrD,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,EAAC,EAAE,EAAY,EAAE,MAAc;QAC1C,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,KAAK,CAAC,EAAC,EAAE,EAAY;QACzB,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACjC,MAAM,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;CACF;AAzCD,wBAyCC"}
|
package/dist/sync.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Workspace } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Manages synchronization of system prompts to assistant configurations
|
|
4
|
+
*/
|
|
2
5
|
export declare class SyncManager {
|
|
3
|
-
private readonly cwd;
|
|
4
6
|
private readonly assistantManager;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Syncs system prompts to configured assistants
|
|
9
|
+
* @param workspace - The workspace containing configuration and file system
|
|
10
|
+
*/
|
|
11
|
+
sync(workspace: Workspace): Promise<void>;
|
|
7
12
|
}
|
|
8
13
|
//# sourceMappingURL=sync.d.ts.map
|
package/dist/sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,SAAS,EAAC,MAAM,YAAY,CAAC;AAIrD;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA0B;IAE3D;;;OAGG;IACG,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAyBhD"}
|
package/dist/sync.js
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncManager = void 0;
|
|
4
|
+
const client_js_1 = require("./client.js");
|
|
5
|
+
const assistant_manager_js_1 = require("./assistant-manager.js");
|
|
6
|
+
const types_js_1 = require("./types.js");
|
|
7
|
+
const prompt_js_1 = require("./prompt.js");
|
|
8
|
+
/**
|
|
9
|
+
* Manages synchronization of system prompts to assistant configurations
|
|
10
|
+
*/
|
|
11
|
+
class SyncManager {
|
|
12
|
+
assistantManager = new assistant_manager_js_1.AssistantManager();
|
|
13
|
+
/**
|
|
14
|
+
* Syncs system prompts to configured assistants
|
|
15
|
+
* @param workspace - The workspace containing configuration and file system
|
|
16
|
+
*/
|
|
17
|
+
async sync(workspace) {
|
|
18
|
+
const { environment, packName, assistants, path } = { ...types_js_1.DEFAULT_CONFIG, ...workspace.config };
|
|
19
|
+
let prompt = null;
|
|
20
|
+
if (packName) {
|
|
21
|
+
const client = new client_js_1.SysPromptHubClient(environment);
|
|
22
|
+
prompt = await client.fetchPack(packName);
|
|
18
23
|
}
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
const prompts = [];
|
|
25
|
+
if (path)
|
|
26
|
+
prompts.push(new prompt_js_1.Prompt(path));
|
|
27
|
+
if (assistants && assistants.length > 0) {
|
|
28
|
+
this.assistantManager.forEach(assistants, assistant => prompts.push(assistant.prompt));
|
|
22
29
|
}
|
|
23
|
-
|
|
30
|
+
await Promise.all(prompts.map(p => p.sync(workspace, prompt)));
|
|
24
31
|
}
|
|
25
32
|
}
|
|
33
|
+
exports.SyncManager = SyncManager;
|
|
26
34
|
//# sourceMappingURL=sync.js.map
|
package/dist/sync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":";;;AAAA,2CAA+C;AAC/C,iEAAwD;AACxD,yCAAqD;AAErD,2CAAmC;AAEnC;;GAEG;AACH,MAAa,WAAW;IACL,gBAAgB,GAAG,IAAI,uCAAgB,EAAE,CAAC;IAE3D;;;OAGG;IACH,KAAK,CAAC,IAAI,CAAC,SAAoB;QAC7B,MAAM,EACJ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,IAAI,EACL,GAAG,EAAE,GAAG,yBAAc,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;QAE/C,IAAI,MAAM,GAAkB,IAAI,CAAC;QACjC,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,MAAM,GAAG,IAAI,8BAAkB,CAAC,WAAW,CAAC,CAAC;YACnD,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAC5C,CAAC;QAED,MAAM,OAAO,GAAa,EAAE,CAAA;QAE5B,IAAI,IAAI;YAAE,OAAO,CAAC,IAAI,CAAC,IAAI,kBAAM,CAAC,IAAI,CAAC,CAAC,CAAA;QACxC,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAA;QACxF,CAAC;QAED,MAAM,OAAO,CAAC,GAAG,CACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAC5C,CAAA;IACH,CAAC;CACF;AAhCD,kCAgCC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,15 +1,43 @@
|
|
|
1
|
+
/** Supported AI assistant types */
|
|
1
2
|
export type AssistantType = 'copilot' | 'claude';
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
environment?: Environment;
|
|
7
|
-
cwd?: string;
|
|
8
|
-
stdout?: boolean;
|
|
9
|
-
}
|
|
3
|
+
/** Deployment environment for API endpoints */
|
|
4
|
+
export type Environment = 'local' | 'development' | 'staging' | 'production';
|
|
5
|
+
export declare const DEFAULT_ENVIRONMENT: Environment;
|
|
6
|
+
/** Configuration for SysPromptHub */
|
|
10
7
|
export interface Config {
|
|
11
8
|
packName?: string;
|
|
12
9
|
assistants?: AssistantType[];
|
|
10
|
+
path?: string;
|
|
13
11
|
environment?: Environment;
|
|
14
12
|
}
|
|
13
|
+
export declare const DEFAULT_CONFIG: Config;
|
|
14
|
+
/** File system abstraction for workspace operations */
|
|
15
|
+
export interface FileSystem {
|
|
16
|
+
/** Check if a file exists at the given path */
|
|
17
|
+
exists(path: string): Promise<boolean>;
|
|
18
|
+
/** Read the contents of a file */
|
|
19
|
+
read(path: string): Promise<string>;
|
|
20
|
+
/** Write content to a file */
|
|
21
|
+
write(path: string, content: string): Promise<void>;
|
|
22
|
+
/** Delete a file */
|
|
23
|
+
delete(path: string): Promise<void>;
|
|
24
|
+
/** Create a directory */
|
|
25
|
+
createDir(path: string): Promise<void>;
|
|
26
|
+
/** Delete an empty directory */
|
|
27
|
+
deleteEmptyDir(path: string): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
/** Workspace containing configuration and file system */
|
|
30
|
+
export interface Workspace {
|
|
31
|
+
config: Config;
|
|
32
|
+
fs: FileSystem;
|
|
33
|
+
}
|
|
34
|
+
/** Manager for loading and updating configuration */
|
|
35
|
+
export interface ConfigManager {
|
|
36
|
+
/** Check if configuration file exists */
|
|
37
|
+
exists(fs: FileSystem): Promise<boolean>;
|
|
38
|
+
/** Load configuration from file system */
|
|
39
|
+
load(fs: FileSystem): Promise<Config | null>;
|
|
40
|
+
/** Update configuration with partial values */
|
|
41
|
+
update(fs: FileSystem, updates: Partial<Config>): Promise<void>;
|
|
42
|
+
}
|
|
15
43
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjD,+CAA+C;AAC/C,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,YAAY,CAAC;AAE7E,eAAO,MAAM,mBAAmB,EAAE,WAA2B,CAAC;AAE9D,qCAAqC;AACrC,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,EAAE,MAG5B,CAAC;AAEF,uDAAuD;AACvD,MAAM,WAAW,UAAU;IACzB,+CAA+C;IAC/C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,kCAAkC;IAClC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,8BAA8B;IAC9B,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,oBAAoB;IACpB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,yBAAyB;IACzB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,gCAAgC;IAChC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C;AAED,yDAAyD;AACzD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,EAAE,EAAE,UAAU,CAAA;CACf;AAED,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B,yCAAyC;IACzC,MAAM,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,0CAA0C;IAC1C,IAAI,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,+CAA+C;IAC/C,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE"}
|
package/dist/types.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_CONFIG = exports.DEFAULT_ENVIRONMENT = void 0;
|
|
4
|
+
exports.DEFAULT_ENVIRONMENT = 'development';
|
|
5
|
+
exports.DEFAULT_CONFIG = {
|
|
6
|
+
assistants: ['copilot'],
|
|
7
|
+
environment: exports.DEFAULT_ENVIRONMENT
|
|
8
|
+
};
|
|
2
9
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAMa,QAAA,mBAAmB,GAAgB,aAAa,CAAC;AAUjD,QAAA,cAAc,GAAW;IACpC,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,2BAAmB;CACjC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Config, FileSystem } from './types.js';
|
|
2
|
+
import { BaseConfigManager } from "./base-config-manager.js";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration manager for VS Code settings.json
|
|
5
|
+
*/
|
|
6
|
+
export declare class VscodeConfigManager extends BaseConfigManager {
|
|
7
|
+
private static FILE_NAME;
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Deserializes configuration from VS Code settings JSON
|
|
11
|
+
* @param content - VS Code settings JSON string
|
|
12
|
+
* @returns Parsed configuration
|
|
13
|
+
*/
|
|
14
|
+
protected deserialize(content: string): Config;
|
|
15
|
+
/**
|
|
16
|
+
* Serializes configuration to VS Code settings JSON format
|
|
17
|
+
* @param config - Configuration to serialize
|
|
18
|
+
* @param fs - File system for reading existing settings
|
|
19
|
+
* @returns VS Code settings JSON string
|
|
20
|
+
*/
|
|
21
|
+
protected serialize(config: Config, fs: FileSystem): Promise<string>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=vscode-config-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vscode-config-manager.d.ts","sourceRoot":"","sources":["../src/vscode-config-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAA6C,UAAU,EAAC,MAAM,YAAY,CAAC;AACzF,OAAO,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAU3D;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB;IACxD,OAAO,CAAC,MAAM,CAAC,SAAS,CAA2B;;IAMnD;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAe9C;;;;;OAKG;cACa,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;CAW3E"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VscodeConfigManager = void 0;
|
|
4
|
+
const base_config_manager_js_1 = require("./base-config-manager.js");
|
|
5
|
+
/**
|
|
6
|
+
* Configuration manager for VS Code settings.json
|
|
7
|
+
*/
|
|
8
|
+
class VscodeConfigManager extends base_config_manager_js_1.BaseConfigManager {
|
|
9
|
+
static FILE_NAME = '.vscode/settings.json';
|
|
10
|
+
constructor() {
|
|
11
|
+
super(VscodeConfigManager.FILE_NAME);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Deserializes configuration from VS Code settings JSON
|
|
15
|
+
* @param content - VS Code settings JSON string
|
|
16
|
+
* @returns Parsed configuration
|
|
17
|
+
*/
|
|
18
|
+
deserialize(content) {
|
|
19
|
+
const settings = JSON.parse(content);
|
|
20
|
+
let assistants = [];
|
|
21
|
+
let config = {
|
|
22
|
+
packName: settings['sysprompthub.packName'],
|
|
23
|
+
environment: settings['sysprompthub.environment']
|
|
24
|
+
};
|
|
25
|
+
if (settings['sysprompthub.copilot'])
|
|
26
|
+
assistants.push('copilot');
|
|
27
|
+
if (settings['sysprompthub.claude'])
|
|
28
|
+
assistants.push('claude');
|
|
29
|
+
if (assistants.length > 0)
|
|
30
|
+
config.assistants = assistants;
|
|
31
|
+
return config;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Serializes configuration to VS Code settings JSON format
|
|
35
|
+
* @param config - Configuration to serialize
|
|
36
|
+
* @param fs - File system for reading existing settings
|
|
37
|
+
* @returns VS Code settings JSON string
|
|
38
|
+
*/
|
|
39
|
+
async serialize(config, fs) {
|
|
40
|
+
const settingsData = await this.loadConfigData(fs);
|
|
41
|
+
const settings = settingsData ? JSON.parse(settingsData) : {};
|
|
42
|
+
settings['sysprompthub.packName'] = config.packName;
|
|
43
|
+
settings['sysprompthub.copilot'] = config.assistants?.includes('copilot');
|
|
44
|
+
settings['sysprompthub.claude'] = config.assistants?.includes('claude');
|
|
45
|
+
settings['sysprompthub.environment'] = config.environment;
|
|
46
|
+
return JSON.stringify(settings, null, 2);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.VscodeConfigManager = VscodeConfigManager;
|
|
50
|
+
//# sourceMappingURL=vscode-config-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vscode-config-manager.js","sourceRoot":"","sources":["../src/vscode-config-manager.ts"],"names":[],"mappings":";;;AAGA,qEAA2D;AAU3D;;GAEG;AACH,MAAa,mBAAoB,SAAQ,0CAAiB;IAChD,MAAM,CAAC,SAAS,GAAG,uBAAuB,CAAC;IAEnD;QACE,KAAK,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACO,WAAW,CAAC,OAAe;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAmB,CAAC;QACvD,IAAI,UAAU,GAAoB,EAAE,CAAC;QACrC,IAAI,MAAM,GAAW;YACnB,QAAQ,EAAE,QAAQ,CAAC,uBAAuB,CAAC;YAC3C,WAAW,EAAE,QAAQ,CAAC,0BAA0B,CAAC;SAClD,CAAA;QAED,IAAI,QAAQ,CAAC,sBAAsB,CAAC;YAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjE,IAAI,QAAQ,CAAC,qBAAqB,CAAC;YAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/D,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;QAE1D,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACO,KAAK,CAAC,SAAS,CAAC,MAAc,EAAE,EAAc;QACtD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACnD,MAAM,QAAQ,GAAmB,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAE9E,QAAQ,CAAC,uBAAuB,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QACpD,QAAQ,CAAC,sBAAsB,CAAC,GAAG,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC1E,QAAQ,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxE,QAAQ,CAAC,0BAA0B,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC;QAE1D,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;;AA3CH,kDA4CC"}
|
package/dist/vscode-config.d.ts
CHANGED
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
export { VscodeConfigManager } from "./vscode-config-manager.js";
|
|
2
|
+
/**
|
|
3
|
+
* Path to VS Code settings file
|
|
4
|
+
*/
|
|
2
5
|
export declare const VSCODE_SETTINGS_PATH = ".vscode/settings.json";
|
|
3
|
-
interface VscodeSettings {
|
|
4
|
-
'sysprompthub.packName'?: string;
|
|
5
|
-
'sysprompthub.copilot'?: boolean;
|
|
6
|
-
'sysprompthub.claude'?: boolean;
|
|
7
|
-
'sysprompthub.apiBaseUrl'?: string;
|
|
8
|
-
'sysprompthub.environment'?: Environment;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
11
|
-
export interface InitVscodeOptions {
|
|
12
|
-
pack?: string;
|
|
13
|
-
copilot: boolean;
|
|
14
|
-
claude: boolean;
|
|
15
|
-
environment?: Environment;
|
|
16
|
-
}
|
|
17
|
-
export declare class VscodeConfigManager {
|
|
18
|
-
private readonly cwd;
|
|
19
|
-
private readonly defaultEnvironment;
|
|
20
|
-
constructor(cwd?: string);
|
|
21
|
-
private loadSettings;
|
|
22
|
-
private saveSettings;
|
|
23
|
-
load(): Promise<Config | null>;
|
|
24
|
-
init(options: InitVscodeOptions): Promise<VscodeSettings>;
|
|
25
|
-
update(updates: Partial<Config>): Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
28
6
|
//# sourceMappingURL=vscode-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vscode-config.d.ts","sourceRoot":"","sources":["../src/vscode-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vscode-config.d.ts","sourceRoot":"","sources":["../src/vscode-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,oBAAoB,0BAA0B,CAAC"}
|