agents_homedir 0.1.0 → 0.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +35 -0
- data/doc/AgentsHomedir/Agent.md +24 -0
- data/doc/AgentsHomedir/Error.md +6 -0
- data/doc/AgentsHomedir/HomeNotResolvable.md +6 -0
- data/doc/AgentsHomedir/Resolver.md +45 -0
- data/doc/AgentsHomedir/UnknownAgent.md +6 -0
- data/doc/AgentsHomedir.md +60 -0
- data/doc/CHANGELOG.md +26 -0
- data/doc/README.md +177 -0
- data/doc/index.csv +35 -0
- data/lib/agents_homedir/version.rb +1 -1
- data/llm.txt +60 -0
- metadata +42 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf6fd03cba5c18aabe164b570713a2325ecc1c3e63e18b549a139f59ca6106f5
|
|
4
|
+
data.tar.gz: d94e85db49e3dbe707510d0c7c1cff2b671b9b8b9de8d37b01f60be532a7311e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 46f95d8b34b619f687de3df317c25ba3a22e9766087b12868ba9da99222c1fb8b82e58989385c7f56b3c006cc3ef3442c3cbb50b9fd3ebd7c909c131eca0aae6
|
|
7
|
+
data.tar.gz: 2d0d6fe28f6ea9b0c470775bd86e9fa06c71a640d45d8eb8e0f8d508032482cfa0ea0b12ad9aa684583a0b3f164541a9cb59e04443ad34d5e193e09f32ada862
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.2.0] - 2026-08-25
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `bin/prepare_release` to run tests, regenerate documentation, create
|
|
10
|
+
`llm.txt`, and build the release artifact in one fail-fast workflow.
|
|
11
|
+
- Added generated Markdown API documentation and an LLM-oriented entry point.
|
|
12
|
+
- Added regression coverage for documentation generation, release command
|
|
13
|
+
ordering, failure handling, and packaged documentation links.
|
|
14
|
+
- Added the usage demo image to the README.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Included `llm.txt` and every linked API document in the packaged gem.
|
|
19
|
+
- Corrected the gem author email metadata.
|
|
20
|
+
|
|
21
|
+
## [0.1.0] - 2026-08-25
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Initial release with home-directory resolution for supported AI coding
|
|
26
|
+
agents, immutable agent values, environment overrides, and OS-aware defaults.
|
data/README.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Find the home folder an AI coding agent uses, without reading contents.
|
|
4
4
|
|
|
5
|
+
<img width="1400" height="850" alt="agents_homedir-demo" src="https://github.com/user-attachments/assets/8bccd83b-a81b-4f8e-9414-5eee67a127b4" />
|
|
6
|
+
|
|
7
|
+
|
|
5
8
|
## Installation
|
|
6
9
|
|
|
7
10
|
Use Ruby 3.2 or newer. The gem ships with one runtime dependency: Zeitwerk 2.8.
|
|
@@ -74,6 +77,38 @@ AgentsHomedir.installed
|
|
|
74
77
|
|
|
75
78
|
Expect ordered, frozen arrays.
|
|
76
79
|
|
|
80
|
+
### Supported agents
|
|
81
|
+
|
|
82
|
+
Use these names with every lookup method:
|
|
83
|
+
|
|
84
|
+
| Agent | Name |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| Claude Code | `:claude_code` |
|
|
87
|
+
| Codex CLI | `:codex` |
|
|
88
|
+
| Gemini CLI | `:gemini` |
|
|
89
|
+
| Antigravity CLI | `:antigravity_cli` |
|
|
90
|
+
| Antigravity IDE | `:antigravity_ide` |
|
|
91
|
+
| Antigravity App | `:antigravity_app` |
|
|
92
|
+
| Qwen Code | `:qwen` |
|
|
93
|
+
| Pi | `:pi` |
|
|
94
|
+
| Amp | `:amp` |
|
|
95
|
+
| OpenCode | `:opencode` |
|
|
96
|
+
| Cursor | `:cursor` |
|
|
97
|
+
| Cursor IDE | `:cursor_ide` |
|
|
98
|
+
| GitHub Copilot CLI | `:github_copilot_cli` |
|
|
99
|
+
| VS Code Copilot Chat | `:vscode_copilot_chat` |
|
|
100
|
+
| Cline | `:cline` |
|
|
101
|
+
| Cline for VS Code | `:cline_vscode` |
|
|
102
|
+
| Grok Build | `:grok_build` |
|
|
103
|
+
| Vibe | `:vibe` |
|
|
104
|
+
| Muse Code | `:muse` |
|
|
105
|
+
| Prime Agent | `:prime_agent` |
|
|
106
|
+
| DeepSeek Harness | `:deepseek_harness` |
|
|
107
|
+
| Hermes Agent | `:hermes` |
|
|
108
|
+
| Factory Droid | `:factory_droid` |
|
|
109
|
+
| Devin CLI | `:devin_cli` |
|
|
110
|
+
| Devin Desktop | `:devin_desktop` |
|
|
111
|
+
|
|
77
112
|
Inspect agent facts:
|
|
78
113
|
|
|
79
114
|
```ruby
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Class AgentsHomedir::Agent <a id="class-AgentsHomedir-Agent"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | Object |
|
|
6
|
+
| **Defined in** | lib/agents_homedir/agent.rb |
|
|
7
|
+
|
|
8
|
+
## Public Instance Methods
|
|
9
|
+
### `candidates()` <a id="method-i-candidates"></a> <a id="candidates-instance_method"></a>
|
|
10
|
+
Not documented.
|
|
11
|
+
|
|
12
|
+
### `home()` <a id="method-i-home"></a> <a id="home-instance_method"></a>
|
|
13
|
+
Not documented.
|
|
14
|
+
|
|
15
|
+
### `initialize(name:, label:, env_override:, verified_on:, resolver:)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
16
|
+
Equality and hash intentionally cover only public facts. Resolver-specific
|
|
17
|
+
caches should key by resolver and agent name.
|
|
18
|
+
- **@return** [Agent] a new instance of Agent
|
|
19
|
+
|
|
20
|
+
### `installed?()` <a id="method-i-installed-3F"></a> <a id="installed?-instance_method"></a>
|
|
21
|
+
- **@return** [Boolean]
|
|
22
|
+
|
|
23
|
+
### `with(**changes)` <a id="method-i-with"></a> <a id="with-instance_method"></a>
|
|
24
|
+
Not documented.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Class AgentsHomedir::Resolver <a id="class-AgentsHomedir-Resolver"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | Object |
|
|
6
|
+
| **Defined in** | lib/agents_homedir/resolver.rb |
|
|
7
|
+
|
|
8
|
+
## Constants
|
|
9
|
+
### `VALID_OSES` <a id="constant-VALID_OSES"></a> <a id="VALID_OSES-constant"></a>
|
|
10
|
+
Not documented.
|
|
11
|
+
|
|
12
|
+
### `WINDOWS_DRIVE_PATH` <a id="constant-WINDOWS_DRIVE_PATH"></a> <a id="WINDOWS_DRIVE_PATH-constant"></a>
|
|
13
|
+
Not documented.
|
|
14
|
+
|
|
15
|
+
### `WINDOWS_UNC_PATH` <a id="constant-WINDOWS_UNC_PATH"></a> <a id="WINDOWS_UNC_PATH-constant"></a>
|
|
16
|
+
Not documented.
|
|
17
|
+
|
|
18
|
+
## Public Class Methods
|
|
19
|
+
### `default_os()` <a id="method-c-default_os"></a> <a id="default_os-class_method"></a>
|
|
20
|
+
Not documented.
|
|
21
|
+
|
|
22
|
+
## Public Instance Methods
|
|
23
|
+
### `[] (name)` <a id="method-i--5B-5D"></a> <a id="[]-instance_method"></a>
|
|
24
|
+
Not documented.
|
|
25
|
+
|
|
26
|
+
### `agents()` <a id="method-i-agents"></a> <a id="agents-instance_method"></a>
|
|
27
|
+
Not documented.
|
|
28
|
+
|
|
29
|
+
### `candidates(name)` <a id="method-i-candidates"></a> <a id="candidates-instance_method"></a>
|
|
30
|
+
Not documented.
|
|
31
|
+
|
|
32
|
+
### `home(name)` <a id="method-i-home"></a> <a id="home-instance_method"></a>
|
|
33
|
+
Not documented.
|
|
34
|
+
|
|
35
|
+
### `initialize(env: = ENV.to_h, home: = ENV["HOME"], os: = self.class.default_os, entries: = Registry.entries)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
36
|
+
- **@return** [Resolver] a new instance of Resolver
|
|
37
|
+
|
|
38
|
+
### `installed()` <a id="method-i-installed"></a> <a id="installed-instance_method"></a>
|
|
39
|
+
Not documented.
|
|
40
|
+
|
|
41
|
+
### `installed?(name)` <a id="method-i-installed-3F"></a> <a id="installed?-instance_method"></a>
|
|
42
|
+
- **@return** [Boolean]
|
|
43
|
+
|
|
44
|
+
### `names()` <a id="method-i-names"></a> <a id="names-instance_method"></a>
|
|
45
|
+
Not documented.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Module AgentsHomedir <a id="module-AgentsHomedir"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/agents_homedir.rb, lib/agents_homedir/agent.rb, lib/agents_homedir/error.rb, lib/agents_homedir/version.rb, lib/agents_homedir/registry.rb, lib/agents_homedir/resolver.rb, lib/agents_homedir/unknown_agent.rb, lib/agents_homedir/home_not_resolvable.rb |
|
|
6
|
+
|
|
7
|
+
## Constants
|
|
8
|
+
### `DEFAULT_RESOLVER_MONITOR` <a id="constant-DEFAULT_RESOLVER_MONITOR"></a> <a id="DEFAULT_RESOLVER_MONITOR-constant"></a>
|
|
9
|
+
Not documented.
|
|
10
|
+
|
|
11
|
+
### `VERSION` <a id="constant-VERSION"></a> <a id="VERSION-constant"></a>
|
|
12
|
+
Not documented.
|
|
13
|
+
|
|
14
|
+
## Public Class Methods
|
|
15
|
+
### `[] (name)` <a id="method-c--5B-5D"></a> <a id="[]-class_method"></a>
|
|
16
|
+
Returns the named agent from the default registry.
|
|
17
|
+
- **@param** `name` [String, Symbol]
|
|
18
|
+
- **@raise** [AgentsHomedir::UnknownAgent] if the name is not registered
|
|
19
|
+
- **@return** [AgentsHomedir::Agent]
|
|
20
|
+
|
|
21
|
+
### `agents()` <a id="method-c-agents"></a> <a id="agents-class_method"></a>
|
|
22
|
+
Returns all known agents in registry order.
|
|
23
|
+
- **@return** [Array<AgentsHomedir::Agent>]
|
|
24
|
+
|
|
25
|
+
### `default_resolver()` <a id="method-c-default_resolver"></a> <a id="default_resolver-class_method"></a>
|
|
26
|
+
Returns the memoized default resolver built from the current environment. ENV
|
|
27
|
+
and HOME are snapshotted on first access and reused for process lifetime.
|
|
28
|
+
- **@raise** [ArgumentError] if the current host OS is unsupported
|
|
29
|
+
- **@return** [AgentsHomedir::Resolver]
|
|
30
|
+
|
|
31
|
+
### `home(name)` <a id="method-c-home"></a> <a id="home-class_method"></a>
|
|
32
|
+
Returns the configured home directory for the named agent.
|
|
33
|
+
- **@param** `name` [String, Symbol]
|
|
34
|
+
- **@raise** [AgentsHomedir::UnknownAgent] if the name is not registered
|
|
35
|
+
- **@raise** [AgentsHomedir::HomeNotResolvable] if HOME is missing, blank, or not absolute
|
|
36
|
+
- **@return** [Pathname]
|
|
37
|
+
|
|
38
|
+
### `installed()` <a id="method-c-installed"></a> <a id="installed-class_method"></a>
|
|
39
|
+
Returns currently installed agents in registry order.
|
|
40
|
+
- **@raise** [AgentsHomedir::HomeNotResolvable] if HOME is missing, blank, or not absolute
|
|
41
|
+
- **@return** [Array<AgentsHomedir::Agent>]
|
|
42
|
+
|
|
43
|
+
### `installed?(name)` <a id="method-c-installed-3F"></a> <a id="installed?-class_method"></a>
|
|
44
|
+
Returns whether the named agent is currently installed.
|
|
45
|
+
- **@param** `name` [String, Symbol]
|
|
46
|
+
- **@raise** [AgentsHomedir::UnknownAgent] if the name is not registered
|
|
47
|
+
- **@raise** [AgentsHomedir::HomeNotResolvable] if HOME is missing, blank, or not absolute
|
|
48
|
+
- **@return** [Boolean]
|
|
49
|
+
|
|
50
|
+
### `names()` <a id="method-c-names"></a> <a id="names-class_method"></a>
|
|
51
|
+
Returns all known agent names in registry order.
|
|
52
|
+
- **@return** [Array<Symbol>]
|
|
53
|
+
|
|
54
|
+
# Documentation
|
|
55
|
+
|
|
56
|
+
- [AgentsHomedir/Agent.md](AgentsHomedir/Agent.md)
|
|
57
|
+
- [AgentsHomedir/Error.md](AgentsHomedir/Error.md)
|
|
58
|
+
- [AgentsHomedir/HomeNotResolvable.md](AgentsHomedir/HomeNotResolvable.md)
|
|
59
|
+
- [AgentsHomedir/Resolver.md](AgentsHomedir/Resolver.md)
|
|
60
|
+
- [AgentsHomedir/UnknownAgent.md](AgentsHomedir/UnknownAgent.md)
|
data/doc/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.2.0] - 2026-08-25
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `bin/prepare_release` to run tests, regenerate documentation, create
|
|
10
|
+
`llm.txt`, and build the release artifact in one fail-fast workflow.
|
|
11
|
+
- Added generated Markdown API documentation and an LLM-oriented entry point.
|
|
12
|
+
- Added regression coverage for documentation generation, release command
|
|
13
|
+
ordering, failure handling, and packaged documentation links.
|
|
14
|
+
- Added the usage demo image to the README.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Included `llm.txt` and every linked API document in the packaged gem.
|
|
19
|
+
- Corrected the gem author email metadata.
|
|
20
|
+
|
|
21
|
+
## [0.1.0] - 2026-08-25
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Initial release with home-directory resolution for supported AI coding
|
|
26
|
+
agents, immutable agent values, environment overrides, and OS-aware defaults.
|
data/doc/README.md
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# AgentsHomedir
|
|
2
|
+
|
|
3
|
+
Find the home folder an AI coding agent uses, without reading contents.
|
|
4
|
+
|
|
5
|
+
<img width="1400" height="850" alt="agents_homedir-demo" src="https://github.com/user-attachments/assets/8bccd83b-a81b-4f8e-9414-5eee67a127b4" />
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
Use Ruby 3.2 or newer. The gem ships with one runtime dependency: Zeitwerk 2.8.
|
|
11
|
+
|
|
12
|
+
Add this line to your application's **Gemfile**:
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
gem "agents_homedir"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Then run:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
bundle install
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or install it directly:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
gem install agents_homedir
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
Get a home path:
|
|
33
|
+
|
|
34
|
+
```ruby
|
|
35
|
+
require "agents_homedir"
|
|
36
|
+
|
|
37
|
+
AgentsHomedir.home(:claude_code)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Check installation:
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
require "agents_homedir"
|
|
44
|
+
|
|
45
|
+
AgentsHomedir.installed?(:codex)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Expect a `Pathname` and a boolean.
|
|
49
|
+
|
|
50
|
+
The module facade is snapshotted on first access.
|
|
51
|
+
That snapshots `ENV` and `HOME` for the rest of the process.
|
|
52
|
+
If you need a different snapshot, instantiate `AgentsHomedir::Resolver` directly.
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
Fetch an agent:
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
require "agents_homedir"
|
|
60
|
+
|
|
61
|
+
agent = AgentsHomedir[:codex]
|
|
62
|
+
|
|
63
|
+
agent.name
|
|
64
|
+
agent.label
|
|
65
|
+
agent.home
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Discover the catalog:
|
|
69
|
+
|
|
70
|
+
```ruby
|
|
71
|
+
require "agents_homedir"
|
|
72
|
+
|
|
73
|
+
AgentsHomedir.names
|
|
74
|
+
AgentsHomedir.agents
|
|
75
|
+
AgentsHomedir.installed
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Expect ordered, frozen arrays.
|
|
79
|
+
|
|
80
|
+
### Supported agents
|
|
81
|
+
|
|
82
|
+
Use these names with every lookup method:
|
|
83
|
+
|
|
84
|
+
| Agent | Name |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| Claude Code | `:claude_code` |
|
|
87
|
+
| Codex CLI | `:codex` |
|
|
88
|
+
| Gemini CLI | `:gemini` |
|
|
89
|
+
| Antigravity CLI | `:antigravity_cli` |
|
|
90
|
+
| Antigravity IDE | `:antigravity_ide` |
|
|
91
|
+
| Antigravity App | `:antigravity_app` |
|
|
92
|
+
| Qwen Code | `:qwen` |
|
|
93
|
+
| Pi | `:pi` |
|
|
94
|
+
| Amp | `:amp` |
|
|
95
|
+
| OpenCode | `:opencode` |
|
|
96
|
+
| Cursor | `:cursor` |
|
|
97
|
+
| Cursor IDE | `:cursor_ide` |
|
|
98
|
+
| GitHub Copilot CLI | `:github_copilot_cli` |
|
|
99
|
+
| VS Code Copilot Chat | `:vscode_copilot_chat` |
|
|
100
|
+
| Cline | `:cline` |
|
|
101
|
+
| Cline for VS Code | `:cline_vscode` |
|
|
102
|
+
| Grok Build | `:grok_build` |
|
|
103
|
+
| Vibe | `:vibe` |
|
|
104
|
+
| Muse Code | `:muse` |
|
|
105
|
+
| Prime Agent | `:prime_agent` |
|
|
106
|
+
| DeepSeek Harness | `:deepseek_harness` |
|
|
107
|
+
| Hermes Agent | `:hermes` |
|
|
108
|
+
| Factory Droid | `:factory_droid` |
|
|
109
|
+
| Devin CLI | `:devin_cli` |
|
|
110
|
+
| Devin Desktop | `:devin_desktop` |
|
|
111
|
+
|
|
112
|
+
Inspect agent facts:
|
|
113
|
+
|
|
114
|
+
```ruby
|
|
115
|
+
require "agents_homedir"
|
|
116
|
+
|
|
117
|
+
agent = AgentsHomedir[:claude_code]
|
|
118
|
+
|
|
119
|
+
agent.env_override
|
|
120
|
+
agent.verified_on
|
|
121
|
+
agent.candidates
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Resolution order:
|
|
125
|
+
|
|
126
|
+
- Use a nonblank native override.
|
|
127
|
+
- Use the first existing directory candidate.
|
|
128
|
+
- Use the first candidate otherwise.
|
|
129
|
+
|
|
130
|
+
Agent facts:
|
|
131
|
+
|
|
132
|
+
- `name` is a `Symbol`.
|
|
133
|
+
- `label` is a `String`.
|
|
134
|
+
- `home` returns a `Pathname`.
|
|
135
|
+
- `installed?` returns a boolean.
|
|
136
|
+
- `candidates` returns an ordered, frozen array of `Pathname` objects.
|
|
137
|
+
- `env_override` is a `String` or `nil`.
|
|
138
|
+
- `verified_on` is a `Date` or `nil`.
|
|
139
|
+
|
|
140
|
+
Errors:
|
|
141
|
+
|
|
142
|
+
- Catch `AgentsHomedir::UnknownAgent` to list valid names.
|
|
143
|
+
- Catch `AgentsHomedir::HomeNotResolvable` for missing, blank, or nonabsolute `HOME`.
|
|
144
|
+
|
|
145
|
+
## Testing
|
|
146
|
+
|
|
147
|
+
Pass `env`, `home`, and `os` explicitly.
|
|
148
|
+
Instantiate a fresh resolver when you need a different environment snapshot.
|
|
149
|
+
Do not stub global `ENV`.
|
|
150
|
+
|
|
151
|
+
```ruby
|
|
152
|
+
require "agents_homedir"
|
|
153
|
+
|
|
154
|
+
resolver = AgentsHomedir::Resolver.new(
|
|
155
|
+
env: { "CODEX_HOME" => "custom/codex" },
|
|
156
|
+
home: "/Users/me",
|
|
157
|
+
os: :linux
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
resolver.home(:codex)
|
|
161
|
+
# => #<Pathname:/Users/me/custom/codex>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Contributing
|
|
165
|
+
|
|
166
|
+
Activate Ruby 3.2 or newer.
|
|
167
|
+
|
|
168
|
+
Run the tests before sending a change.
|
|
169
|
+
|
|
170
|
+
```sh
|
|
171
|
+
bundle install
|
|
172
|
+
bundle exec rake test
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## License
|
|
176
|
+
|
|
177
|
+
MIT
|
data/doc/index.csv
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name,type,path
|
|
2
|
+
README.md,File,README.md
|
|
3
|
+
CHANGELOG.md,File,CHANGELOG.md
|
|
4
|
+
AgentsHomedir,Module,AgentsHomedir.md
|
|
5
|
+
AgentsHomedir.DEFAULT_RESOLVER_MONITOR,Constant,AgentsHomedir.md#constant-DEFAULT_RESOLVER_MONITOR
|
|
6
|
+
AgentsHomedir.VERSION,Constant,AgentsHomedir.md#constant-VERSION
|
|
7
|
+
AgentsHomedir.[],Method,AgentsHomedir.md#method-c--5B-5D
|
|
8
|
+
AgentsHomedir.agents,Method,AgentsHomedir.md#method-c-agents
|
|
9
|
+
AgentsHomedir.default_resolver,Method,AgentsHomedir.md#method-c-default_resolver
|
|
10
|
+
AgentsHomedir.home,Method,AgentsHomedir.md#method-c-home
|
|
11
|
+
AgentsHomedir.installed,Method,AgentsHomedir.md#method-c-installed
|
|
12
|
+
AgentsHomedir.installed?,Method,AgentsHomedir.md#method-c-installed-3F
|
|
13
|
+
AgentsHomedir.names,Method,AgentsHomedir.md#method-c-names
|
|
14
|
+
AgentsHomedir::Agent,Class,AgentsHomedir/Agent.md
|
|
15
|
+
AgentsHomedir::Agent.candidates,Method,AgentsHomedir/Agent.md#method-i-candidates
|
|
16
|
+
AgentsHomedir::Agent.home,Method,AgentsHomedir/Agent.md#method-i-home
|
|
17
|
+
AgentsHomedir::Agent.initialize,Method,AgentsHomedir/Agent.md#method-i-initialize
|
|
18
|
+
AgentsHomedir::Agent.installed?,Method,AgentsHomedir/Agent.md#method-i-installed-3F
|
|
19
|
+
AgentsHomedir::Agent.with,Method,AgentsHomedir/Agent.md#method-i-with
|
|
20
|
+
AgentsHomedir::Error,Class,AgentsHomedir/Error.md
|
|
21
|
+
AgentsHomedir::Resolver,Class,AgentsHomedir/Resolver.md
|
|
22
|
+
AgentsHomedir::Resolver.VALID_OSES,Constant,AgentsHomedir/Resolver.md#constant-VALID_OSES
|
|
23
|
+
AgentsHomedir::Resolver.WINDOWS_DRIVE_PATH,Constant,AgentsHomedir/Resolver.md#constant-WINDOWS_DRIVE_PATH
|
|
24
|
+
AgentsHomedir::Resolver.WINDOWS_UNC_PATH,Constant,AgentsHomedir/Resolver.md#constant-WINDOWS_UNC_PATH
|
|
25
|
+
AgentsHomedir::Resolver.[],Method,AgentsHomedir/Resolver.md#method-i--5B-5D
|
|
26
|
+
AgentsHomedir::Resolver.agents,Method,AgentsHomedir/Resolver.md#method-i-agents
|
|
27
|
+
AgentsHomedir::Resolver.candidates,Method,AgentsHomedir/Resolver.md#method-i-candidates
|
|
28
|
+
AgentsHomedir::Resolver.home,Method,AgentsHomedir/Resolver.md#method-i-home
|
|
29
|
+
AgentsHomedir::Resolver.initialize,Method,AgentsHomedir/Resolver.md#method-i-initialize
|
|
30
|
+
AgentsHomedir::Resolver.installed,Method,AgentsHomedir/Resolver.md#method-i-installed
|
|
31
|
+
AgentsHomedir::Resolver.installed?,Method,AgentsHomedir/Resolver.md#method-i-installed-3F
|
|
32
|
+
AgentsHomedir::Resolver.names,Method,AgentsHomedir/Resolver.md#method-i-names
|
|
33
|
+
AgentsHomedir::Resolver.default_os,Method,AgentsHomedir/Resolver.md#method-c-default_os
|
|
34
|
+
AgentsHomedir::UnknownAgent,Class,AgentsHomedir/UnknownAgent.md
|
|
35
|
+
AgentsHomedir::HomeNotResolvable,Class,AgentsHomedir/HomeNotResolvable.md
|
data/llm.txt
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Module AgentsHomedir <a id="module-AgentsHomedir"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/agents_homedir.rb, lib/agents_homedir/agent.rb, lib/agents_homedir/error.rb, lib/agents_homedir/version.rb, lib/agents_homedir/registry.rb, lib/agents_homedir/resolver.rb, lib/agents_homedir/unknown_agent.rb, lib/agents_homedir/home_not_resolvable.rb |
|
|
6
|
+
|
|
7
|
+
## Constants
|
|
8
|
+
### `DEFAULT_RESOLVER_MONITOR` <a id="constant-DEFAULT_RESOLVER_MONITOR"></a> <a id="DEFAULT_RESOLVER_MONITOR-constant"></a>
|
|
9
|
+
Not documented.
|
|
10
|
+
|
|
11
|
+
### `VERSION` <a id="constant-VERSION"></a> <a id="VERSION-constant"></a>
|
|
12
|
+
Not documented.
|
|
13
|
+
|
|
14
|
+
## Public Class Methods
|
|
15
|
+
### `[] (name)` <a id="method-c--5B-5D"></a> <a id="[]-class_method"></a>
|
|
16
|
+
Returns the named agent from the default registry.
|
|
17
|
+
- **@param** `name` [String, Symbol]
|
|
18
|
+
- **@raise** [AgentsHomedir::UnknownAgent] if the name is not registered
|
|
19
|
+
- **@return** [AgentsHomedir::Agent]
|
|
20
|
+
|
|
21
|
+
### `agents()` <a id="method-c-agents"></a> <a id="agents-class_method"></a>
|
|
22
|
+
Returns all known agents in registry order.
|
|
23
|
+
- **@return** [Array<AgentsHomedir::Agent>]
|
|
24
|
+
|
|
25
|
+
### `default_resolver()` <a id="method-c-default_resolver"></a> <a id="default_resolver-class_method"></a>
|
|
26
|
+
Returns the memoized default resolver built from the current environment. ENV
|
|
27
|
+
and HOME are snapshotted on first access and reused for process lifetime.
|
|
28
|
+
- **@raise** [ArgumentError] if the current host OS is unsupported
|
|
29
|
+
- **@return** [AgentsHomedir::Resolver]
|
|
30
|
+
|
|
31
|
+
### `home(name)` <a id="method-c-home"></a> <a id="home-class_method"></a>
|
|
32
|
+
Returns the configured home directory for the named agent.
|
|
33
|
+
- **@param** `name` [String, Symbol]
|
|
34
|
+
- **@raise** [AgentsHomedir::UnknownAgent] if the name is not registered
|
|
35
|
+
- **@raise** [AgentsHomedir::HomeNotResolvable] if HOME is missing, blank, or not absolute
|
|
36
|
+
- **@return** [Pathname]
|
|
37
|
+
|
|
38
|
+
### `installed()` <a id="method-c-installed"></a> <a id="installed-class_method"></a>
|
|
39
|
+
Returns currently installed agents in registry order.
|
|
40
|
+
- **@raise** [AgentsHomedir::HomeNotResolvable] if HOME is missing, blank, or not absolute
|
|
41
|
+
- **@return** [Array<AgentsHomedir::Agent>]
|
|
42
|
+
|
|
43
|
+
### `installed?(name)` <a id="method-c-installed-3F"></a> <a id="installed?-class_method"></a>
|
|
44
|
+
Returns whether the named agent is currently installed.
|
|
45
|
+
- **@param** `name` [String, Symbol]
|
|
46
|
+
- **@raise** [AgentsHomedir::UnknownAgent] if the name is not registered
|
|
47
|
+
- **@raise** [AgentsHomedir::HomeNotResolvable] if HOME is missing, blank, or not absolute
|
|
48
|
+
- **@return** [Boolean]
|
|
49
|
+
|
|
50
|
+
### `names()` <a id="method-c-names"></a> <a id="names-class_method"></a>
|
|
51
|
+
Returns all known agent names in registry order.
|
|
52
|
+
- **@return** [Array<Symbol>]
|
|
53
|
+
|
|
54
|
+
# Documentation
|
|
55
|
+
|
|
56
|
+
- [doc/AgentsHomedir/Agent.md](doc/AgentsHomedir/Agent.md)
|
|
57
|
+
- [doc/AgentsHomedir/Error.md](doc/AgentsHomedir/Error.md)
|
|
58
|
+
- [doc/AgentsHomedir/HomeNotResolvable.md](doc/AgentsHomedir/HomeNotResolvable.md)
|
|
59
|
+
- [doc/AgentsHomedir/Resolver.md](doc/AgentsHomedir/Resolver.md)
|
|
60
|
+
- [doc/AgentsHomedir/UnknownAgent.md](doc/AgentsHomedir/UnknownAgent.md)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: agents_homedir
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lucian Ghinda
|
|
@@ -71,16 +71,54 @@ dependencies:
|
|
|
71
71
|
- - "~>"
|
|
72
72
|
- !ruby/object:Gem::Version
|
|
73
73
|
version: '13.0'
|
|
74
|
+
- !ruby/object:Gem::Dependency
|
|
75
|
+
name: yard
|
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
|
77
|
+
requirements:
|
|
78
|
+
- - "~>"
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: '0.9'
|
|
81
|
+
type: :development
|
|
82
|
+
prerelease: false
|
|
83
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
84
|
+
requirements:
|
|
85
|
+
- - "~>"
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: '0.9'
|
|
88
|
+
- !ruby/object:Gem::Dependency
|
|
89
|
+
name: yard-markdown
|
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - "~>"
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: '0.9'
|
|
95
|
+
type: :development
|
|
96
|
+
prerelease: false
|
|
97
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
98
|
+
requirements:
|
|
99
|
+
- - "~>"
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: '0.9'
|
|
74
102
|
description: Helpers for resolving and normalizing home directories used by AI coding
|
|
75
103
|
agents.
|
|
76
104
|
email:
|
|
77
|
-
-
|
|
105
|
+
- lucian@ghinda.com
|
|
78
106
|
executables: []
|
|
79
107
|
extensions: []
|
|
80
108
|
extra_rdoc_files: []
|
|
81
109
|
files:
|
|
110
|
+
- CHANGELOG.md
|
|
82
111
|
- LICENSE.txt
|
|
83
112
|
- README.md
|
|
113
|
+
- doc/AgentsHomedir.md
|
|
114
|
+
- doc/AgentsHomedir/Agent.md
|
|
115
|
+
- doc/AgentsHomedir/Error.md
|
|
116
|
+
- doc/AgentsHomedir/HomeNotResolvable.md
|
|
117
|
+
- doc/AgentsHomedir/Resolver.md
|
|
118
|
+
- doc/AgentsHomedir/UnknownAgent.md
|
|
119
|
+
- doc/CHANGELOG.md
|
|
120
|
+
- doc/README.md
|
|
121
|
+
- doc/index.csv
|
|
84
122
|
- lib/agents_homedir.rb
|
|
85
123
|
- lib/agents_homedir/agent.rb
|
|
86
124
|
- lib/agents_homedir/error.rb
|
|
@@ -89,12 +127,14 @@ files:
|
|
|
89
127
|
- lib/agents_homedir/resolver.rb
|
|
90
128
|
- lib/agents_homedir/unknown_agent.rb
|
|
91
129
|
- lib/agents_homedir/version.rb
|
|
130
|
+
- llm.txt
|
|
92
131
|
homepage: https://github.com/lucianghinda/agents_homedir
|
|
93
132
|
licenses:
|
|
94
133
|
- MIT
|
|
95
134
|
metadata:
|
|
96
135
|
source_code_uri: https://github.com/lucianghinda/agents_homedir
|
|
97
136
|
bug_tracker_uri: https://github.com/lucianghinda/agents_homedir/issues
|
|
137
|
+
changelog_uri: https://github.com/lucianghinda/agents_homedir/blob/main/CHANGELOG.md
|
|
98
138
|
rubygems_mfa_required: 'true'
|
|
99
139
|
rdoc_options: []
|
|
100
140
|
require_paths:
|