@cleocode/adapters 2026.5.25 → 2026.5.27

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.
@@ -1,32 +1,14 @@
1
1
  /**
2
- * Path utilities for adapter install providers.
2
+ * Adapter-shared path helpers.
3
3
  *
4
- * These helpers mirror the equivalent functions in `@cleocode/core/paths`
5
- * but are duplicated here to avoid a circular dependency
6
- * (`@cleocode/core` → `@cleocode/adapters` `@cleocode/core`).
4
+ * Historically this module hand-rolled `getCleoTemplatesTildePath` to avoid a
5
+ * circular `core adapters` import. With the introduction of `@cleocode/paths`
6
+ * — a zero-dep leaf package consumed by core, adapters, worktree, brain, and
7
+ * caamp — that workaround is no longer needed: every package imports from the
8
+ * SSoT directly.
7
9
  *
8
- * @remarks
9
- * Keep the implementation in sync with `getCleoTemplatesTildePath` in
10
- * `packages/core/src/paths.ts` if the logic ever changes.
11
- *
12
- * @task T916
13
- */
14
- /**
15
- * Get the CLEO templates directory as a tilde-prefixed path for use in
16
- * `@` references (AGENTS.md, CLAUDE.md, etc.). Cross-platform: replaces
17
- * the user's home directory with `~` so the reference works when loaded
18
- * by LLM providers that resolve `~` at runtime.
19
- *
20
- * @returns Tilde-prefixed path like `"~/.local/share/cleo/templates"` on Linux,
21
- * `"~/Library/Application Support/cleo/templates"` on macOS, etc.
22
- *
23
- * @example
24
- * ```typescript
25
- * const ref = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
26
- * // "@~/.local/share/cleo/templates/CLEO-INJECTION.md" (Linux)
27
- * ```
28
- *
29
- * @task T916
10
+ * @task T916 (original duplicate)
11
+ * @task T1886 (consolidated into @cleocode/paths SSoT)
30
12
  */
31
- export declare function getCleoTemplatesTildePath(): string;
13
+ export { getCleoTemplatesTildePath } from '@cleocode/paths';
32
14
  //# sourceMappingURL=paths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/providers/shared/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAwCH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CASlD"}
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/providers/shared/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/adapters",
3
- "version": "2026.5.25",
3
+ "version": "2026.5.27",
4
4
  "description": "Unified provider adapters for CLEO (Claude Code, OpenCode, Cursor)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -15,8 +15,9 @@
15
15
  "@ai-sdk/anthropic": "^3.0.69",
16
16
  "@ai-sdk/openai": "^2.0.53",
17
17
  "ai": "^6.0.168",
18
- "@cleocode/caamp": "2026.5.25",
19
- "@cleocode/contracts": "2026.5.25"
18
+ "@cleocode/caamp": "2026.5.27",
19
+ "@cleocode/contracts": "2026.5.27",
20
+ "@cleocode/paths": "2026.5.27"
20
21
  },
21
22
  "license": "MIT",
22
23
  "engines": {
@@ -29,7 +30,7 @@
29
30
  "devDependencies": {
30
31
  "@types/node": "^22.19.15",
31
32
  "vitest": "^4.1.4",
32
- "@cleocode/playbooks": "2026.5.25"
33
+ "@cleocode/playbooks": "2026.5.27"
33
34
  },
34
35
  "repository": {
35
36
  "type": "git",
@@ -1,79 +1,14 @@
1
1
  /**
2
- * Path utilities for adapter install providers.
2
+ * Adapter-shared path helpers.
3
3
  *
4
- * These helpers mirror the equivalent functions in `@cleocode/core/paths`
5
- * but are duplicated here to avoid a circular dependency
6
- * (`@cleocode/core` → `@cleocode/adapters` `@cleocode/core`).
4
+ * Historically this module hand-rolled `getCleoTemplatesTildePath` to avoid a
5
+ * circular `core adapters` import. With the introduction of `@cleocode/paths`
6
+ * — a zero-dep leaf package consumed by core, adapters, worktree, brain, and
7
+ * caamp — that workaround is no longer needed: every package imports from the
8
+ * SSoT directly.
7
9
  *
8
- * @remarks
9
- * Keep the implementation in sync with `getCleoTemplatesTildePath` in
10
- * `packages/core/src/paths.ts` if the logic ever changes.
11
- *
12
- * @task T916
10
+ * @task T916 (original duplicate)
11
+ * @task T1886 (consolidated into @cleocode/paths SSoT)
13
12
  */
14
13
 
15
- import { homedir } from 'node:os';
16
- import { join } from 'node:path';
17
-
18
- /**
19
- * Resolve the XDG / OS-appropriate global CLEO data directory.
20
- *
21
- * Respects `CLEO_HOME` env var; otherwise uses the platform default:
22
- * - Linux: `~/.local/share/cleo`
23
- * - macOS: `~/Library/Application Support/cleo`
24
- * - Windows: `%LOCALAPPDATA%\cleo\Data` (approximate)
25
- *
26
- * @returns Absolute path to the CLEO data directory
27
- *
28
- * @internal
29
- */
30
- function getAdapterCleoHome(): string {
31
- if (process.env['CLEO_HOME']) {
32
- return process.env['CLEO_HOME'];
33
- }
34
- const home = homedir();
35
- if (process.platform === 'darwin') {
36
- return join(home, 'Library', 'Application Support', 'cleo');
37
- }
38
- if (process.platform === 'win32') {
39
- const localAppData = process.env['LOCALAPPDATA'];
40
- if (localAppData) {
41
- return join(localAppData, 'cleo', 'Data');
42
- }
43
- return join(home, 'AppData', 'Local', 'cleo', 'Data');
44
- }
45
- // Linux / XDG
46
- const xdgData = process.env['XDG_DATA_HOME'];
47
- if (xdgData) {
48
- return join(xdgData, 'cleo');
49
- }
50
- return join(home, '.local', 'share', 'cleo');
51
- }
52
-
53
- /**
54
- * Get the CLEO templates directory as a tilde-prefixed path for use in
55
- * `@` references (AGENTS.md, CLAUDE.md, etc.). Cross-platform: replaces
56
- * the user's home directory with `~` so the reference works when loaded
57
- * by LLM providers that resolve `~` at runtime.
58
- *
59
- * @returns Tilde-prefixed path like `"~/.local/share/cleo/templates"` on Linux,
60
- * `"~/Library/Application Support/cleo/templates"` on macOS, etc.
61
- *
62
- * @example
63
- * ```typescript
64
- * const ref = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
65
- * // "@~/.local/share/cleo/templates/CLEO-INJECTION.md" (Linux)
66
- * ```
67
- *
68
- * @task T916
69
- */
70
- export function getCleoTemplatesTildePath(): string {
71
- const absPath = join(getAdapterCleoHome(), 'templates');
72
- const home = homedir();
73
- if (absPath.startsWith(home)) {
74
- // Always use forward slash after tilde for cross-platform @-reference resolution
75
- const relative = absPath.slice(home.length).replace(/\\/g, '/');
76
- return `~${relative}`;
77
- }
78
- return absPath;
79
- }
14
+ export { getCleoTemplatesTildePath } from '@cleocode/paths';