@cleocode/adapters 2026.4.13 → 2026.4.14
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/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3246 -0
- package/dist/index.js.map +7 -0
- package/dist/providers/claude-code/adapter.d.ts +95 -0
- package/dist/providers/claude-code/adapter.d.ts.map +1 -0
- package/dist/providers/claude-code/context-monitor.d.ts +35 -0
- package/dist/providers/claude-code/context-monitor.d.ts.map +1 -0
- package/dist/providers/claude-code/hooks.d.ts +146 -0
- package/dist/providers/claude-code/hooks.d.ts.map +1 -0
- package/dist/providers/claude-code/index.d.ts +39 -0
- package/dist/providers/claude-code/index.d.ts.map +1 -0
- package/dist/providers/claude-code/install.d.ts +67 -0
- package/dist/providers/claude-code/install.d.ts.map +1 -0
- package/dist/providers/claude-code/paths.d.ts +32 -0
- package/dist/providers/claude-code/paths.d.ts.map +1 -0
- package/dist/providers/claude-code/spawn.d.ts +67 -0
- package/dist/providers/claude-code/spawn.d.ts.map +1 -0
- package/dist/providers/claude-code/statusline.d.ts +68 -0
- package/dist/providers/claude-code/statusline.d.ts.map +1 -0
- package/dist/providers/claude-code/task-sync.d.ts +32 -0
- package/dist/providers/claude-code/task-sync.d.ts.map +1 -0
- package/dist/providers/claude-code/transport.d.ts +25 -0
- package/dist/providers/claude-code/transport.d.ts.map +1 -0
- package/dist/providers/codex/adapter.d.ts +83 -0
- package/dist/providers/codex/adapter.d.ts.map +1 -0
- package/dist/providers/codex/hooks.d.ts +91 -0
- package/dist/providers/codex/hooks.d.ts.map +1 -0
- package/dist/providers/codex/index.d.ts +37 -0
- package/dist/providers/codex/index.d.ts.map +1 -0
- package/dist/providers/codex/install.d.ts +65 -0
- package/dist/providers/codex/install.d.ts.map +1 -0
- package/dist/providers/cursor/adapter.d.ts +76 -0
- package/dist/providers/cursor/adapter.d.ts.map +1 -0
- package/dist/providers/cursor/hooks.d.ts +140 -0
- package/dist/providers/cursor/hooks.d.ts.map +1 -0
- package/dist/providers/cursor/index.d.ts +34 -0
- package/dist/providers/cursor/index.d.ts.map +1 -0
- package/dist/providers/cursor/install.d.ts +87 -0
- package/dist/providers/cursor/install.d.ts.map +1 -0
- package/dist/providers/cursor/spawn.d.ts +50 -0
- package/dist/providers/cursor/spawn.d.ts.map +1 -0
- package/dist/providers/gemini-cli/adapter.d.ts +84 -0
- package/dist/providers/gemini-cli/adapter.d.ts.map +1 -0
- package/dist/providers/gemini-cli/hooks.d.ts +99 -0
- package/dist/providers/gemini-cli/hooks.d.ts.map +1 -0
- package/dist/providers/gemini-cli/index.d.ts +37 -0
- package/dist/providers/gemini-cli/index.d.ts.map +1 -0
- package/dist/providers/gemini-cli/install.d.ts +65 -0
- package/dist/providers/gemini-cli/install.d.ts.map +1 -0
- package/dist/providers/kimi/adapter.d.ts +85 -0
- package/dist/providers/kimi/adapter.d.ts.map +1 -0
- package/dist/providers/kimi/hooks.d.ts +70 -0
- package/dist/providers/kimi/hooks.d.ts.map +1 -0
- package/dist/providers/kimi/index.d.ts +37 -0
- package/dist/providers/kimi/index.d.ts.map +1 -0
- package/dist/providers/kimi/install.d.ts +65 -0
- package/dist/providers/kimi/install.d.ts.map +1 -0
- package/dist/providers/opencode/adapter.d.ts +83 -0
- package/dist/providers/opencode/adapter.d.ts.map +1 -0
- package/dist/providers/opencode/hooks.d.ts +136 -0
- package/dist/providers/opencode/hooks.d.ts.map +1 -0
- package/dist/providers/opencode/index.d.ts +35 -0
- package/dist/providers/opencode/index.d.ts.map +1 -0
- package/dist/providers/opencode/install.d.ts +56 -0
- package/dist/providers/opencode/install.d.ts.map +1 -0
- package/dist/providers/opencode/spawn.d.ts +94 -0
- package/dist/providers/opencode/spawn.d.ts.map +1 -0
- package/dist/providers/shared/transcript-reader.d.ts +58 -0
- package/dist/providers/shared/transcript-reader.d.ts.map +1 -0
- package/dist/registry.d.ts +88 -0
- package/dist/registry.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codex CLI Adapter
|
|
3
|
+
*
|
|
4
|
+
* Main CLEOProviderAdapter implementation for OpenAI Codex CLI.
|
|
5
|
+
* Provides hooks and install capabilities for CLEO integration.
|
|
6
|
+
*
|
|
7
|
+
* @task T162
|
|
8
|
+
* @epic T134
|
|
9
|
+
*/
|
|
10
|
+
import type { AdapterCapabilities, AdapterHealthStatus, CLEOProviderAdapter } from '@cleocode/contracts';
|
|
11
|
+
import { CodexHookProvider } from './hooks.js';
|
|
12
|
+
import { CodexInstallProvider } from './install.js';
|
|
13
|
+
/**
|
|
14
|
+
* CLEO provider adapter for OpenAI Codex CLI.
|
|
15
|
+
*
|
|
16
|
+
* Bridges CLEO's adapter system with Codex CLI's native capabilities:
|
|
17
|
+
* - Hooks: Maps Codex events (SessionStart, PromptSubmit, ResponseComplete) to CAAMP events
|
|
18
|
+
* - Install: Ensures AGENTS.md references for CLEO instruction files
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Codex CLI supports only 3 canonical events (SessionStart, PromptSubmit,
|
|
22
|
+
* ResponseComplete) and has no spawn or transport capabilities. Integration
|
|
23
|
+
* is primarily through instruction files (AGENTS.md).
|
|
24
|
+
*
|
|
25
|
+
* @task T162
|
|
26
|
+
* @epic T134
|
|
27
|
+
*/
|
|
28
|
+
export declare class CodexAdapter implements CLEOProviderAdapter {
|
|
29
|
+
/** Unique provider identifier. */
|
|
30
|
+
readonly id = "codex";
|
|
31
|
+
/** Human-readable provider name. */
|
|
32
|
+
readonly name = "Codex";
|
|
33
|
+
/** Adapter version string. */
|
|
34
|
+
readonly version = "1.0.0";
|
|
35
|
+
/** Declared capabilities for this provider. */
|
|
36
|
+
capabilities: AdapterCapabilities;
|
|
37
|
+
/** Hook provider for CAAMP event mapping. */
|
|
38
|
+
hooks: CodexHookProvider;
|
|
39
|
+
/** Install provider for managing instruction files. */
|
|
40
|
+
install: CodexInstallProvider;
|
|
41
|
+
/** Project directory this adapter was initialized with, or null. */
|
|
42
|
+
private projectDir;
|
|
43
|
+
/** Whether {@link initialize} has been called. */
|
|
44
|
+
private initialized;
|
|
45
|
+
constructor();
|
|
46
|
+
/**
|
|
47
|
+
* Initialize the adapter for a given project directory.
|
|
48
|
+
*
|
|
49
|
+
* @param projectDir - Root directory of the project
|
|
50
|
+
* @task T162
|
|
51
|
+
*/
|
|
52
|
+
initialize(projectDir: string): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Dispose the adapter and clean up resources.
|
|
55
|
+
*
|
|
56
|
+
* Unregisters hooks and releases any tracked state.
|
|
57
|
+
* @task T162
|
|
58
|
+
*/
|
|
59
|
+
dispose(): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Run a health check to verify Codex CLI is accessible.
|
|
62
|
+
*
|
|
63
|
+
* Checks:
|
|
64
|
+
* 1. Adapter has been initialized
|
|
65
|
+
* 2. Codex CLI binary is available in PATH
|
|
66
|
+
* 3. ~/.codex/ configuration directory exists
|
|
67
|
+
*
|
|
68
|
+
* @returns Health status with details about each check
|
|
69
|
+
* @task T162
|
|
70
|
+
*/
|
|
71
|
+
healthCheck(): Promise<AdapterHealthStatus>;
|
|
72
|
+
/**
|
|
73
|
+
* Check whether the adapter has been initialized.
|
|
74
|
+
* @task T162
|
|
75
|
+
*/
|
|
76
|
+
isInitialized(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Get the project directory this adapter was initialized with.
|
|
79
|
+
* @task T162
|
|
80
|
+
*/
|
|
81
|
+
getProjectDir(): string | null;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/providers/codex/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIpD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,YAAa,YAAW,mBAAmB;IACtD,kCAAkC;IAClC,QAAQ,CAAC,EAAE,WAAW;IACtB,oCAAoC;IACpC,QAAQ,CAAC,IAAI,WAAW;IACxB,8BAA8B;IAC9B,QAAQ,CAAC,OAAO,WAAW;IAE3B,+CAA+C;IAC/C,YAAY,EAAE,mBAAmB,CAW/B;IAEF,6CAA6C;IAC7C,KAAK,EAAE,iBAAiB,CAAC;IACzB,uDAAuD;IACvD,OAAO,EAAE,oBAAoB,CAAC;IAE9B,oEAAoE;IACpE,OAAO,CAAC,UAAU,CAAuB;IACzC,kDAAkD;IAClD,OAAO,CAAC,WAAW,CAAS;;IAO5B;;;;;OAKG;IACG,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnD;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ9B;;;;;;;;;;OAUG;IACG,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAqCjD;;;OAGG;IACH,aAAa,IAAI,OAAO;IAIxB;;;OAGG;IACH,aAAa,IAAI,MAAM,GAAG,IAAI;CAG/B"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codex CLI Hook Provider
|
|
3
|
+
*
|
|
4
|
+
* Maps Codex CLI's native hook events to CAAMP canonical hook events.
|
|
5
|
+
* Codex CLI supports 3 canonical events through its hook system.
|
|
6
|
+
*
|
|
7
|
+
* Codex CLI event mapping:
|
|
8
|
+
* - SessionStart -> SessionStart
|
|
9
|
+
* - PromptSubmit -> UserPromptSubmit
|
|
10
|
+
* - ResponseComplete -> Stop
|
|
11
|
+
*
|
|
12
|
+
* @task T162
|
|
13
|
+
* @epic T134
|
|
14
|
+
*/
|
|
15
|
+
import type { AdapterHookProvider } from '@cleocode/contracts';
|
|
16
|
+
/**
|
|
17
|
+
* Hook provider for Codex CLI.
|
|
18
|
+
*
|
|
19
|
+
* Codex CLI registers hooks via its configuration system at
|
|
20
|
+
* ~/.codex/. Hook handlers are shell commands or script paths that
|
|
21
|
+
* execute when the corresponding event fires.
|
|
22
|
+
*
|
|
23
|
+
* Since hooks are registered through the config system (managed by
|
|
24
|
+
* the install provider), registerNativeHooks and unregisterNativeHooks
|
|
25
|
+
* track registration state without performing filesystem operations.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Codex CLI has a minimal hook surface with only 3 canonical events.
|
|
29
|
+
* Registration state is tracked in-memory because Codex CLI manages
|
|
30
|
+
* hooks through its own configuration system at `~/.codex/`.
|
|
31
|
+
*
|
|
32
|
+
* @task T162
|
|
33
|
+
* @epic T134
|
|
34
|
+
*/
|
|
35
|
+
export declare class CodexHookProvider implements AdapterHookProvider {
|
|
36
|
+
/** Whether hooks have been registered for the current session. */
|
|
37
|
+
private registered;
|
|
38
|
+
/**
|
|
39
|
+
* Map a Codex CLI native event name to a CAAMP hook event name.
|
|
40
|
+
*
|
|
41
|
+
* @param providerEvent - Codex CLI event name (e.g. "SessionStart", "PromptSubmit")
|
|
42
|
+
* @returns CAAMP event name or null if unmapped
|
|
43
|
+
* @task T162
|
|
44
|
+
*/
|
|
45
|
+
mapProviderEvent(providerEvent: string): string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Register native hooks for a project.
|
|
48
|
+
*
|
|
49
|
+
* For Codex CLI, hooks are registered via the config system
|
|
50
|
+
* (~/.codex/), which is handled by the install provider.
|
|
51
|
+
* This method marks hooks as registered without performing
|
|
52
|
+
* filesystem operations.
|
|
53
|
+
*
|
|
54
|
+
* @param _projectDir - Project directory (unused; hooks are global)
|
|
55
|
+
* @task T162
|
|
56
|
+
*/
|
|
57
|
+
registerNativeHooks(_projectDir: string): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Unregister native hooks.
|
|
60
|
+
*
|
|
61
|
+
* For Codex CLI, this is a no-op since hooks are managed through
|
|
62
|
+
* the config system. Unregistration happens via the install
|
|
63
|
+
* provider's uninstall method.
|
|
64
|
+
* @task T162
|
|
65
|
+
*/
|
|
66
|
+
unregisterNativeHooks(): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Check whether hooks have been registered via registerNativeHooks.
|
|
69
|
+
* @task T162
|
|
70
|
+
*/
|
|
71
|
+
isRegistered(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Get the full event mapping for introspection/debugging.
|
|
74
|
+
* @task T162
|
|
75
|
+
*/
|
|
76
|
+
getEventMap(): Readonly<Record<string, string>>;
|
|
77
|
+
/**
|
|
78
|
+
* Extract a plain-text transcript from Codex CLI session data.
|
|
79
|
+
*
|
|
80
|
+
* Reads the most recent JSON/JSONL session file under `~/.codex/`
|
|
81
|
+
* and returns its turns as a flat string for brain observation extraction.
|
|
82
|
+
*
|
|
83
|
+
* Returns null when no session data is found or on any read error.
|
|
84
|
+
*
|
|
85
|
+
* @param _sessionId - CLEO session ID (unused; reads the most recent file)
|
|
86
|
+
* @param _projectDir - Project directory (unused; Codex CLI uses global paths)
|
|
87
|
+
* @task T162 @epic T134
|
|
88
|
+
*/
|
|
89
|
+
getTranscript(_sessionId: string, _projectDir: string): Promise<string | null>;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/providers/codex/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAY/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,iBAAkB,YAAW,mBAAmB;IAC3D,kEAAkE;IAClE,OAAO,CAAC,UAAU,CAAS;IAE3B;;;;;;OAMG;IACH,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAItD;;;;;;;;;;OAUG;IACG,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7D;;;;;;;OAOG;IACG,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5C;;;OAGG;IACH,YAAY,IAAI,OAAO;IAIvB;;;OAGG;IACH,WAAW,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAI/C;;;;;;;;;;;OAWG;IACG,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAGrF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
*
|
|
4
|
+
* CLEO provider adapter for OpenAI Codex CLI.
|
|
5
|
+
* Default export is the adapter class for dynamic loading by AdapterManager.
|
|
6
|
+
*
|
|
7
|
+
* @task T162
|
|
8
|
+
* @epic T134
|
|
9
|
+
*/
|
|
10
|
+
import { CodexAdapter } from './adapter.js';
|
|
11
|
+
export { CodexAdapter } from './adapter.js';
|
|
12
|
+
export { CodexHookProvider } from './hooks.js';
|
|
13
|
+
export { CodexInstallProvider } from './install.js';
|
|
14
|
+
export default CodexAdapter;
|
|
15
|
+
/**
|
|
16
|
+
* Factory function for creating adapter instances.
|
|
17
|
+
* Used by AdapterManager's dynamic import fallback.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* This is the primary entry point for dynamic adapter loading.
|
|
21
|
+
* AdapterManager calls this function when it resolves the codex
|
|
22
|
+
* provider via its import-based discovery mechanism.
|
|
23
|
+
*
|
|
24
|
+
* @returns A new {@link CodexAdapter} instance ready for initialization
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import { createAdapter } from '@cleocode/adapters/providers/codex';
|
|
29
|
+
*
|
|
30
|
+
* const adapter = createAdapter();
|
|
31
|
+
* await adapter.initialize('/path/to/project');
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @task T162
|
|
35
|
+
*/
|
|
36
|
+
export declare function createAdapter(): CodexAdapter;
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/codex/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAe,YAAY,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,IAAI,YAAY,CAE5C"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codex CLI Install Provider
|
|
3
|
+
*
|
|
4
|
+
* Handles CLEO installation into Codex CLI environments:
|
|
5
|
+
* - Ensures AGENTS.md has CLEO @-references
|
|
6
|
+
*
|
|
7
|
+
* @task T162
|
|
8
|
+
* @epic T134
|
|
9
|
+
*/
|
|
10
|
+
import type { AdapterInstallProvider, InstallOptions, InstallResult } from '@cleocode/contracts';
|
|
11
|
+
/**
|
|
12
|
+
* Install provider for Codex CLI.
|
|
13
|
+
*
|
|
14
|
+
* Manages CLEO's integration with Codex CLI by:
|
|
15
|
+
* 1. Ensuring AGENTS.md contains @-references to CLEO instruction files
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Installation is idempotent -- running install multiple times on the same
|
|
19
|
+
* project produces the same result. Only AGENTS.md is managed; Codex CLI
|
|
20
|
+
* does not have an MCP or plugin registration mechanism.
|
|
21
|
+
*
|
|
22
|
+
* @task T162
|
|
23
|
+
* @epic T134
|
|
24
|
+
*/
|
|
25
|
+
export declare class CodexInstallProvider implements AdapterInstallProvider {
|
|
26
|
+
/**
|
|
27
|
+
* Install CLEO into a Codex CLI environment.
|
|
28
|
+
*
|
|
29
|
+
* @param options - Installation options including project directory
|
|
30
|
+
* @returns Result describing what was installed
|
|
31
|
+
* @task T162
|
|
32
|
+
*/
|
|
33
|
+
install(options: InstallOptions): Promise<InstallResult>;
|
|
34
|
+
/**
|
|
35
|
+
* Uninstall CLEO from the Codex CLI environment.
|
|
36
|
+
*
|
|
37
|
+
* Does not remove AGENTS.md references (they are harmless if CLEO is not present).
|
|
38
|
+
* @task T162
|
|
39
|
+
*/
|
|
40
|
+
uninstall(): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Check whether CLEO is installed in the Codex CLI environment.
|
|
43
|
+
*
|
|
44
|
+
* Checks for CLEO references in AGENTS.md.
|
|
45
|
+
* @task T162
|
|
46
|
+
*/
|
|
47
|
+
isInstalled(): Promise<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Ensure AGENTS.md contains @-references to CLEO instruction files.
|
|
50
|
+
*
|
|
51
|
+
* Creates AGENTS.md if it does not exist. Appends any missing references.
|
|
52
|
+
*
|
|
53
|
+
* @param projectDir - Project root directory
|
|
54
|
+
* @task T162
|
|
55
|
+
*/
|
|
56
|
+
ensureInstructionReferences(projectDir: string): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Update AGENTS.md with CLEO @-references.
|
|
59
|
+
*
|
|
60
|
+
* @param projectDir - Project root directory
|
|
61
|
+
* @returns true if the file was created or modified
|
|
62
|
+
*/
|
|
63
|
+
private updateInstructionFile;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/providers/codex/install.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKjG;;;;;;;;;;;;;GAaG;AACH,qBAAa,oBAAqB,YAAW,sBAAsB;IACjE;;;;;;OAMG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAoB9D;;;;;OAKG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhC;;;;;OAKG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAgBrC;;;;;;;OAOG;IACG,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpE;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;CA4B9B"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Adapter
|
|
3
|
+
*
|
|
4
|
+
* Main CLEOProviderAdapter implementation for Cursor AI code editor.
|
|
5
|
+
* Provides install capabilities for CLEO integration. Hooks and spawn
|
|
6
|
+
* are not supported since Cursor lacks CLI-based lifecycle events
|
|
7
|
+
* and subagent spawning.
|
|
8
|
+
*
|
|
9
|
+
* @task T5240
|
|
10
|
+
*/
|
|
11
|
+
import type { AdapterCapabilities, AdapterHealthStatus, CLEOProviderAdapter } from '@cleocode/contracts';
|
|
12
|
+
import { CursorHookProvider } from './hooks.js';
|
|
13
|
+
import { CursorInstallProvider } from './install.js';
|
|
14
|
+
/**
|
|
15
|
+
* CLEO provider adapter for Cursor AI code editor.
|
|
16
|
+
*
|
|
17
|
+
* Bridges CLEO's adapter system with Cursor's capabilities:
|
|
18
|
+
* - Install: Manages .cursorrules and .cursor/rules/cleo.mdc rule files
|
|
19
|
+
* - Hooks: Stub provider (Cursor has no lifecycle event system)
|
|
20
|
+
* - Spawn: Not supported (Cursor has no CLI for subagent spawning)
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Cursor is a GUI-based editor, so many CLI-oriented capabilities
|
|
24
|
+
* (spawn, transport, task sync, context monitor) are unsupported.
|
|
25
|
+
* Integration is primarily through instruction rule files placed in
|
|
26
|
+
* `.cursor/rules/` (modern MDC format) and `.cursorrules` (legacy).
|
|
27
|
+
*/
|
|
28
|
+
export declare class CursorAdapter implements CLEOProviderAdapter {
|
|
29
|
+
/** Unique provider identifier. */
|
|
30
|
+
readonly id = "cursor";
|
|
31
|
+
/** Human-readable provider name. */
|
|
32
|
+
readonly name = "Cursor";
|
|
33
|
+
/** Adapter version string. */
|
|
34
|
+
readonly version = "1.0.0";
|
|
35
|
+
/** Declared capabilities for this provider. */
|
|
36
|
+
capabilities: AdapterCapabilities;
|
|
37
|
+
/** Hook provider for CAAMP event mapping. */
|
|
38
|
+
hooks: CursorHookProvider;
|
|
39
|
+
/** Install provider for managing rule files. */
|
|
40
|
+
install: CursorInstallProvider;
|
|
41
|
+
/** Project directory this adapter was initialized with, or null. */
|
|
42
|
+
private projectDir;
|
|
43
|
+
/** Whether {@link initialize} has been called. */
|
|
44
|
+
private initialized;
|
|
45
|
+
constructor();
|
|
46
|
+
/**
|
|
47
|
+
* Initialize the adapter for a given project directory.
|
|
48
|
+
*
|
|
49
|
+
* @param projectDir - Root directory of the project
|
|
50
|
+
*/
|
|
51
|
+
initialize(projectDir: string): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Dispose the adapter and clean up resources.
|
|
54
|
+
*/
|
|
55
|
+
dispose(): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Run a health check to verify Cursor is accessible.
|
|
58
|
+
*
|
|
59
|
+
* Checks:
|
|
60
|
+
* 1. Adapter has been initialized
|
|
61
|
+
* 2. .cursor/ configuration directory exists in the project
|
|
62
|
+
* 3. CURSOR_EDITOR env var is set
|
|
63
|
+
*
|
|
64
|
+
* @returns Health status with details about each check
|
|
65
|
+
*/
|
|
66
|
+
healthCheck(): Promise<AdapterHealthStatus>;
|
|
67
|
+
/**
|
|
68
|
+
* Check whether the adapter has been initialized.
|
|
69
|
+
*/
|
|
70
|
+
isInitialized(): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Get the project directory this adapter was initialized with.
|
|
73
|
+
*/
|
|
74
|
+
getProjectDir(): string | null;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/providers/cursor/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,qBAAa,aAAc,YAAW,mBAAmB;IACvD,kCAAkC;IAClC,QAAQ,CAAC,EAAE,YAAY;IACvB,oCAAoC;IACpC,QAAQ,CAAC,IAAI,YAAY;IACzB,8BAA8B;IAC9B,QAAQ,CAAC,OAAO,WAAW;IAE3B,+CAA+C;IAC/C,YAAY,EAAE,mBAAmB,CA0B/B;IAEF,6CAA6C;IAC7C,KAAK,EAAE,kBAAkB,CAAC;IAC1B,gDAAgD;IAChD,OAAO,EAAE,qBAAqB,CAAC;IAE/B,oEAAoE;IACpE,OAAO,CAAC,UAAU,CAAuB;IACzC,kDAAkD;IAClD,OAAO,CAAC,WAAW,CAAS;;IAO5B;;;;OAIG;IACG,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnD;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ9B;;;;;;;;;OASG;IACG,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAwCjD;;OAEG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,aAAa,IAAI,MAAM,GAAG,IAAI;CAG/B"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Hook Provider
|
|
3
|
+
*
|
|
4
|
+
* Maps Cursor's native hook events to CAAMP canonical hook events.
|
|
5
|
+
* Cursor supports 10 of 16 canonical events through its config-based hook system.
|
|
6
|
+
*
|
|
7
|
+
* Event translation uses CAAMP normalizer APIs:
|
|
8
|
+
* - `toCanonical(nativeName, 'cursor')` for runtime event name resolution
|
|
9
|
+
* - `getSupportedEvents('cursor')` to enumerate supported canonical events
|
|
10
|
+
* - `getProviderHookProfile('cursor')` for the full provider profile
|
|
11
|
+
*
|
|
12
|
+
* Cursor uses camelCase native event names (e.g. `sessionStart`, `preToolUse`).
|
|
13
|
+
* Hooks are configured via `.cursor/hooks.json`. Supported handler types:
|
|
14
|
+
* command, prompt.
|
|
15
|
+
*
|
|
16
|
+
* Unsupported events: PermissionRequest, PreModel, PostModel, PostCompact,
|
|
17
|
+
* Notification, ConfigChange.
|
|
18
|
+
*
|
|
19
|
+
* @task T165
|
|
20
|
+
* @epic T134
|
|
21
|
+
*/
|
|
22
|
+
import type { AdapterHookProvider } from '@cleocode/contracts';
|
|
23
|
+
/**
|
|
24
|
+
* Hook provider for Cursor.
|
|
25
|
+
*
|
|
26
|
+
* Cursor registers hooks via its config system at `.cursor/hooks.json`.
|
|
27
|
+
* Supported handler types: command, prompt.
|
|
28
|
+
*
|
|
29
|
+
* CAAMP 1.9.1 reveals Cursor supports 10 of 16 canonical events. Previously
|
|
30
|
+
* this provider was a no-op stub. It now provides full event mapping and CAAMP
|
|
31
|
+
* normalizer integration.
|
|
32
|
+
*
|
|
33
|
+
* Event mapping is based on `getProviderHookProfile('cursor')` from CAAMP 1.9.1.
|
|
34
|
+
* Async accessors (`getSupportedCanonicalEvents`, `getProviderProfile`) call
|
|
35
|
+
* CAAMP directly when available.
|
|
36
|
+
*
|
|
37
|
+
* Since hooks are registered through the config system (managed by the install
|
|
38
|
+
* provider), `registerNativeHooks` and `unregisterNativeHooks` track registration
|
|
39
|
+
* state without performing filesystem operations.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* This provider was originally a no-op stub. It now provides full event
|
|
43
|
+
* mapping for all 10 canonical events supported by Cursor, plus CAAMP
|
|
44
|
+
* normalizer integration via async accessors. Registration state is
|
|
45
|
+
* tracked in-memory because Cursor manages hooks through its own config.
|
|
46
|
+
*
|
|
47
|
+
* @task T165
|
|
48
|
+
* @epic T134
|
|
49
|
+
*/
|
|
50
|
+
export declare class CursorHookProvider implements AdapterHookProvider {
|
|
51
|
+
/** Whether hooks have been registered for the current session. */
|
|
52
|
+
private registered;
|
|
53
|
+
/**
|
|
54
|
+
* Map a Cursor native event name to a CAAMP canonical hook event name.
|
|
55
|
+
*
|
|
56
|
+
* Looks up the native event name in the map derived from
|
|
57
|
+
* `getProviderHookProfile('cursor').mappings` (CAAMP 1.9.1). Cursor uses
|
|
58
|
+
* camelCase names (e.g. "preToolUse", "sessionStart").
|
|
59
|
+
*
|
|
60
|
+
* Returns null for unsupported events (PermissionRequest, PreModel,
|
|
61
|
+
* PostModel, PostCompact, Notification, ConfigChange).
|
|
62
|
+
*
|
|
63
|
+
* @param providerEvent - Cursor native event name (e.g. "preToolUse", "sessionStart")
|
|
64
|
+
* @returns CAAMP canonical event name, or null if unmapped
|
|
65
|
+
* @task T165
|
|
66
|
+
*/
|
|
67
|
+
mapProviderEvent(providerEvent: string): string | null;
|
|
68
|
+
/**
|
|
69
|
+
* Register native hooks for a project.
|
|
70
|
+
*
|
|
71
|
+
* For Cursor, hooks are registered via the config system
|
|
72
|
+
* (`.cursor/hooks.json`), managed by the install provider.
|
|
73
|
+
* This method marks hooks as registered without performing filesystem operations.
|
|
74
|
+
*
|
|
75
|
+
* Iterating supported events is handled at install time using
|
|
76
|
+
* `getSupportedCanonicalEvents()` to enumerate all 10 supported hooks.
|
|
77
|
+
*
|
|
78
|
+
* @param _projectDir - Project directory (unused; Cursor config manages registration)
|
|
79
|
+
* @task T165
|
|
80
|
+
*/
|
|
81
|
+
registerNativeHooks(_projectDir: string): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Unregister native hooks.
|
|
84
|
+
*
|
|
85
|
+
* For Cursor, this is a no-op since hooks are managed through the config
|
|
86
|
+
* system. Unregistration happens via the install provider's uninstall method.
|
|
87
|
+
*
|
|
88
|
+
* @task T165
|
|
89
|
+
*/
|
|
90
|
+
unregisterNativeHooks(): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Check whether hooks have been registered via `registerNativeHooks`.
|
|
93
|
+
*/
|
|
94
|
+
isRegistered(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Get the native→canonical event mapping for introspection and debugging.
|
|
97
|
+
*
|
|
98
|
+
* Returns the map derived from `getProviderHookProfile('cursor').mappings`
|
|
99
|
+
* (CAAMP 1.9.1). Use `getSupportedCanonicalEvents()` to enumerate canonical
|
|
100
|
+
* names via live CAAMP APIs.
|
|
101
|
+
*
|
|
102
|
+
* @returns Immutable record of native event name → canonical event name
|
|
103
|
+
*/
|
|
104
|
+
getEventMap(): Readonly<Record<string, string>>;
|
|
105
|
+
/**
|
|
106
|
+
* Enumerate supported canonical events via CAAMP's `getSupportedEvents()`.
|
|
107
|
+
*
|
|
108
|
+
* Calls `getSupportedEvents('cursor')` from the CAAMP normalizer to get the
|
|
109
|
+
* authoritative list. Cursor supports 10 of 16 canonical events. Falls back
|
|
110
|
+
* to the values of the static event map when CAAMP is unavailable at runtime.
|
|
111
|
+
*
|
|
112
|
+
* @returns Array of CAAMP canonical event names supported by Cursor
|
|
113
|
+
* @task T165
|
|
114
|
+
*/
|
|
115
|
+
getSupportedCanonicalEvents(): Promise<string[]>;
|
|
116
|
+
/**
|
|
117
|
+
* Retrieve the full provider hook profile from CAAMP.
|
|
118
|
+
*
|
|
119
|
+
* Calls `getProviderHookProfile('cursor')` from the CAAMP normalizer to
|
|
120
|
+
* get the complete profile: hook system type (`config`), config path
|
|
121
|
+
* (`.cursor/hooks.json`), handler types (command, prompt), and all event
|
|
122
|
+
* mappings. Returns null when CAAMP is unavailable at runtime.
|
|
123
|
+
*
|
|
124
|
+
* @returns Provider hook profile or null if CAAMP is unavailable
|
|
125
|
+
* @task T165
|
|
126
|
+
*/
|
|
127
|
+
getProviderProfile(): Promise<unknown | null>;
|
|
128
|
+
/**
|
|
129
|
+
* Translate a CAAMP canonical event to its Cursor native name via CAAMP.
|
|
130
|
+
*
|
|
131
|
+
* Calls `toNative(canonical, 'cursor')` from the CAAMP normalizer.
|
|
132
|
+
* Returns null for unsupported events or when CAAMP is unavailable.
|
|
133
|
+
*
|
|
134
|
+
* @param canonical - CAAMP canonical event name (e.g. "PreToolUse")
|
|
135
|
+
* @returns Cursor native event name (e.g. "preToolUse") or null
|
|
136
|
+
* @task T165
|
|
137
|
+
*/
|
|
138
|
+
toNativeEvent(canonical: string): Promise<string | null>;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/providers/cursor/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAqC/D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,kBAAmB,YAAW,mBAAmB;IAC5D,kEAAkE;IAClE,OAAO,CAAC,UAAU,CAAS;IAE3B;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAItD;;;;;;;;;;;;OAYG;IACG,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7D;;;;;;;OAOG;IACG,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5C;;OAEG;IACH,YAAY,IAAI,OAAO;IAIvB;;;;;;;;OAQG;IACH,WAAW,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAI/C;;;;;;;;;OASG;IACG,2BAA2B,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAStD;;;;;;;;;;OAUG;IACG,kBAAkB,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IASnD;;;;;;;;;OASG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAU/D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
*
|
|
4
|
+
* CLEO provider adapter for Cursor AI code editor.
|
|
5
|
+
* Default export is the adapter class for dynamic loading by AdapterManager.
|
|
6
|
+
*
|
|
7
|
+
* @task T5240
|
|
8
|
+
*/
|
|
9
|
+
import { CursorAdapter } from './adapter.js';
|
|
10
|
+
export { CursorAdapter } from './adapter.js';
|
|
11
|
+
export { CursorHookProvider } from './hooks.js';
|
|
12
|
+
export { CursorInstallProvider } from './install.js';
|
|
13
|
+
export default CursorAdapter;
|
|
14
|
+
/**
|
|
15
|
+
* Factory function for creating adapter instances.
|
|
16
|
+
* Used by AdapterManager's dynamic import fallback.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* This is the primary entry point for dynamic adapter loading.
|
|
20
|
+
* AdapterManager calls this function when it resolves the cursor
|
|
21
|
+
* provider via its import-based discovery mechanism.
|
|
22
|
+
*
|
|
23
|
+
* @returns A new {@link CursorAdapter} instance ready for initialization
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { createAdapter } from '@cleocode/adapters/providers/cursor';
|
|
28
|
+
*
|
|
29
|
+
* const adapter = createAdapter();
|
|
30
|
+
* await adapter.initialize('/path/to/project');
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function createAdapter(): CursorAdapter;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/cursor/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,eAAe,aAAa,CAAC;AAE7B;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,IAAI,aAAa,CAE7C"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Install Provider
|
|
3
|
+
*
|
|
4
|
+
* Handles CLEO installation into Cursor environments:
|
|
5
|
+
* - Ensures .cursorrules has CLEO @-references (legacy format)
|
|
6
|
+
* - Creates .cursor/rules/cleo.mdc with CLEO references (modern format)
|
|
7
|
+
*
|
|
8
|
+
* Cursor supports two instruction file formats:
|
|
9
|
+
* 1. Legacy: .cursorrules (flat file, project root)
|
|
10
|
+
* 2. Modern: .cursor/rules/*.mdc (MDC format, per-rule files)
|
|
11
|
+
*
|
|
12
|
+
* This provider writes to both for maximum compatibility.
|
|
13
|
+
*
|
|
14
|
+
* @task T5240
|
|
15
|
+
*/
|
|
16
|
+
import type { AdapterInstallProvider, InstallOptions, InstallResult } from '@cleocode/contracts';
|
|
17
|
+
/**
|
|
18
|
+
* Install provider for Cursor.
|
|
19
|
+
*
|
|
20
|
+
* Manages CLEO's integration with Cursor by:
|
|
21
|
+
* 1. Creating/updating .cursorrules with @-references (legacy)
|
|
22
|
+
* 2. Creating .cursor/rules/cleo.mdc with @-references (modern)
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Installation is idempotent and writes to both instruction file formats
|
|
26
|
+
* for maximum compatibility. The legacy `.cursorrules` file is only modified
|
|
27
|
+
* if it already exists (never created from scratch). The modern MDC file
|
|
28
|
+
* is always created or updated to ensure Cursor's rule engine picks it up.
|
|
29
|
+
*/
|
|
30
|
+
export declare class CursorInstallProvider implements AdapterInstallProvider {
|
|
31
|
+
/**
|
|
32
|
+
* Install CLEO into a Cursor project.
|
|
33
|
+
*
|
|
34
|
+
* @param options - Installation options including project directory
|
|
35
|
+
* @returns Result describing what was installed
|
|
36
|
+
*/
|
|
37
|
+
install(options: InstallOptions): Promise<InstallResult>;
|
|
38
|
+
/**
|
|
39
|
+
* Uninstall CLEO from the current Cursor project.
|
|
40
|
+
*
|
|
41
|
+
* Does not remove instruction file references (they are harmless if CLEO is not present).
|
|
42
|
+
*/
|
|
43
|
+
uninstall(): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Check whether CLEO is installed in the current environment.
|
|
46
|
+
*
|
|
47
|
+
* Checks for .cursor/rules/cleo.mdc or .cursorrules with CLEO references.
|
|
48
|
+
*/
|
|
49
|
+
isInstalled(): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Ensure instruction files contain @-references to CLEO.
|
|
52
|
+
*
|
|
53
|
+
* Updates .cursorrules (legacy) and creates .cursor/rules/cleo.mdc (modern).
|
|
54
|
+
*
|
|
55
|
+
* @param projectDir - Project root directory
|
|
56
|
+
*/
|
|
57
|
+
ensureInstructionReferences(projectDir: string): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Update instruction files with CLEO @-references.
|
|
60
|
+
*
|
|
61
|
+
* Handles both legacy (.cursorrules) and modern (.cursor/rules/cleo.mdc) formats.
|
|
62
|
+
*
|
|
63
|
+
* @returns true if any file was created or modified
|
|
64
|
+
*/
|
|
65
|
+
private updateInstructionFiles;
|
|
66
|
+
/**
|
|
67
|
+
* Update legacy .cursorrules file with @-references.
|
|
68
|
+
* Only modifies the file if it already exists (does not create it).
|
|
69
|
+
*
|
|
70
|
+
* @returns true if the file was modified
|
|
71
|
+
*/
|
|
72
|
+
private updateLegacyRules;
|
|
73
|
+
/**
|
|
74
|
+
* Create or update .cursor/rules/cleo.mdc with CLEO references.
|
|
75
|
+
*
|
|
76
|
+
* MDC (Markdown Component) format is Cursor's modern rule file format.
|
|
77
|
+
* Each .mdc file in .cursor/rules/ is loaded as a rule set.
|
|
78
|
+
*
|
|
79
|
+
* @returns true if the file was created or modified
|
|
80
|
+
*/
|
|
81
|
+
private updateModernRules;
|
|
82
|
+
/**
|
|
83
|
+
* Get list of instruction files that were updated.
|
|
84
|
+
*/
|
|
85
|
+
private getUpdatedFileList;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/providers/cursor/install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKjG;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAsB,YAAW,sBAAsB;IAClE;;;;;OAKG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAoB9D;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAEhC;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAqBrC;;;;;;OAMG;IACG,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpE;;;;;;OAMG;IACH,OAAO,CAAC,sBAAsB;IAgB9B;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAmBzB;;;;;;;OAOG;IACH,OAAO,CAAC,iBAAiB;IA2BzB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAQ3B"}
|