geeto 0.1.0-beta.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.
- package/LICENSE +21 -0
- package/README.md +152 -0
- package/lib/api/copilot-adapter.d.ts +11 -0
- package/lib/api/copilot-adapter.d.ts.map +1 -0
- package/lib/api/copilot-adapter.js +41 -0
- package/lib/api/copilot-adapter.js.map +1 -0
- package/lib/api/copilot-sdk.d.ts +48 -0
- package/lib/api/copilot-sdk.d.ts.map +1 -0
- package/lib/api/copilot-sdk.js +451 -0
- package/lib/api/copilot-sdk.js.map +1 -0
- package/lib/api/copilot.d.ts +21 -0
- package/lib/api/copilot.d.ts.map +1 -0
- package/lib/api/copilot.js +87 -0
- package/lib/api/copilot.js.map +1 -0
- package/lib/api/gemini-sdk.d.ts +24 -0
- package/lib/api/gemini-sdk.d.ts.map +1 -0
- package/lib/api/gemini-sdk.js +245 -0
- package/lib/api/gemini-sdk.js.map +1 -0
- package/lib/api/gemini.d.ts +21 -0
- package/lib/api/gemini.d.ts.map +1 -0
- package/lib/api/gemini.js +87 -0
- package/lib/api/gemini.js.map +1 -0
- package/lib/api/openrouter-sdk.d.ts +58 -0
- package/lib/api/openrouter-sdk.d.ts.map +1 -0
- package/lib/api/openrouter-sdk.js +341 -0
- package/lib/api/openrouter-sdk.js.map +1 -0
- package/lib/api/openrouter.d.ts +17 -0
- package/lib/api/openrouter.d.ts.map +1 -0
- package/lib/api/openrouter.js +111 -0
- package/lib/api/openrouter.js.map +1 -0
- package/lib/api/trello.d.ts +17 -0
- package/lib/api/trello.d.ts.map +1 -0
- package/lib/api/trello.js +72 -0
- package/lib/api/trello.js.map +1 -0
- package/lib/cli/input.d.ts +39 -0
- package/lib/cli/input.d.ts.map +1 -0
- package/lib/cli/input.js +119 -0
- package/lib/cli/input.js.map +1 -0
- package/lib/cli/menu.d.ts +9 -0
- package/lib/cli/menu.d.ts.map +1 -0
- package/lib/cli/menu.js +201 -0
- package/lib/cli/menu.js.map +1 -0
- package/lib/core/constants.d.ts +22 -0
- package/lib/core/constants.d.ts.map +1 -0
- package/lib/core/constants.js +24 -0
- package/lib/core/constants.js.map +1 -0
- package/lib/core/copilot-setup.d.ts +13 -0
- package/lib/core/copilot-setup.d.ts.map +1 -0
- package/lib/core/copilot-setup.js +447 -0
- package/lib/core/copilot-setup.js.map +1 -0
- package/lib/core/gemini-setup.d.ts +8 -0
- package/lib/core/gemini-setup.d.ts.map +1 -0
- package/lib/core/gemini-setup.js +84 -0
- package/lib/core/gemini-setup.js.map +1 -0
- package/lib/core/menu-constants.d.ts +24 -0
- package/lib/core/menu-constants.d.ts.map +1 -0
- package/lib/core/menu-constants.js +22 -0
- package/lib/core/menu-constants.js.map +1 -0
- package/lib/core/openrouter-setup.d.ts +8 -0
- package/lib/core/openrouter-setup.d.ts.map +1 -0
- package/lib/core/openrouter-setup.js +73 -0
- package/lib/core/openrouter-setup.js.map +1 -0
- package/lib/core/setup.d.ts +21 -0
- package/lib/core/setup.d.ts.map +1 -0
- package/lib/core/setup.js +88 -0
- package/lib/core/setup.js.map +1 -0
- package/lib/core/trello-setup.d.ts +8 -0
- package/lib/core/trello-setup.d.ts.map +1 -0
- package/lib/core/trello-setup.js +107 -0
- package/lib/core/trello-setup.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +250 -0
- package/lib/index.js.map +1 -0
- package/lib/types/index.d.ts +78 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utils/branch-naming.d.ts +11 -0
- package/lib/utils/branch-naming.d.ts.map +1 -0
- package/lib/utils/branch-naming.js +396 -0
- package/lib/utils/branch-naming.js.map +1 -0
- package/lib/utils/colors.d.ts +14 -0
- package/lib/utils/colors.d.ts.map +1 -0
- package/lib/utils/colors.js +14 -0
- package/lib/utils/colors.js.map +1 -0
- package/lib/utils/commit-helpers.d.ts +53 -0
- package/lib/utils/commit-helpers.d.ts.map +1 -0
- package/lib/utils/commit-helpers.js +177 -0
- package/lib/utils/commit-helpers.js.map +1 -0
- package/lib/utils/config.d.ts +87 -0
- package/lib/utils/config.d.ts.map +1 -0
- package/lib/utils/config.js +326 -0
- package/lib/utils/config.js.map +1 -0
- package/lib/utils/display.d.ts +27 -0
- package/lib/utils/display.d.ts.map +1 -0
- package/lib/utils/display.js +116 -0
- package/lib/utils/display.js.map +1 -0
- package/lib/utils/error-helpers.d.ts +27 -0
- package/lib/utils/error-helpers.d.ts.map +1 -0
- package/lib/utils/error-helpers.js +102 -0
- package/lib/utils/error-helpers.js.map +1 -0
- package/lib/utils/exec.d.ts +18 -0
- package/lib/utils/exec.d.ts.map +1 -0
- package/lib/utils/exec.js +96 -0
- package/lib/utils/exec.js.map +1 -0
- package/lib/utils/git-ai-errors.d.ts +10 -0
- package/lib/utils/git-ai-errors.d.ts.map +1 -0
- package/lib/utils/git-ai-errors.js +71 -0
- package/lib/utils/git-ai-errors.js.map +1 -0
- package/lib/utils/git-ai.d.ts +26 -0
- package/lib/utils/git-ai.d.ts.map +1 -0
- package/lib/utils/git-ai.js +603 -0
- package/lib/utils/git-ai.js.map +1 -0
- package/lib/utils/git-commands.d.ts +21 -0
- package/lib/utils/git-commands.d.ts.map +1 -0
- package/lib/utils/git-commands.js +58 -0
- package/lib/utils/git-commands.js.map +1 -0
- package/lib/utils/git-errors.d.ts +76 -0
- package/lib/utils/git-errors.d.ts.map +1 -0
- package/lib/utils/git-errors.js +565 -0
- package/lib/utils/git-errors.js.map +1 -0
- package/lib/utils/git.d.ts +61 -0
- package/lib/utils/git.d.ts.map +1 -0
- package/lib/utils/git.js +245 -0
- package/lib/utils/git.js.map +1 -0
- package/lib/utils/logging.d.ts +25 -0
- package/lib/utils/logging.d.ts.map +1 -0
- package/lib/utils/logging.js +71 -0
- package/lib/utils/logging.js.map +1 -0
- package/lib/utils/menu-builders.d.ts +47 -0
- package/lib/utils/menu-builders.d.ts.map +1 -0
- package/lib/utils/menu-builders.js +34 -0
- package/lib/utils/menu-builders.js.map +1 -0
- package/lib/utils/platform.d.ts +13 -0
- package/lib/utils/platform.d.ts.map +1 -0
- package/lib/utils/platform.js +32 -0
- package/lib/utils/platform.js.map +1 -0
- package/lib/utils/spinner-wrapper.d.ts +16 -0
- package/lib/utils/spinner-wrapper.d.ts.map +1 -0
- package/lib/utils/spinner-wrapper.js +56 -0
- package/lib/utils/spinner-wrapper.js.map +1 -0
- package/lib/utils/state.d.ts +22 -0
- package/lib/utils/state.d.ts.map +1 -0
- package/lib/utils/state.js +75 -0
- package/lib/utils/state.js.map +1 -0
- package/lib/utils/time.d.ts +4 -0
- package/lib/utils/time.d.ts.map +1 -0
- package/lib/utils/time.js +29 -0
- package/lib/utils/time.js.map +1 -0
- package/lib/utils/type-guards.d.ts +10 -0
- package/lib/utils/type-guards.d.ts.map +1 -0
- package/lib/utils/type-guards.js +29 -0
- package/lib/utils/type-guards.js.map +1 -0
- package/lib/workflows/ai-provider.d.ts +13 -0
- package/lib/workflows/ai-provider.d.ts.map +1 -0
- package/lib/workflows/ai-provider.js +55 -0
- package/lib/workflows/ai-provider.js.map +1 -0
- package/lib/workflows/author.d.ts +4 -0
- package/lib/workflows/author.d.ts.map +1 -0
- package/lib/workflows/author.js +80 -0
- package/lib/workflows/author.js.map +1 -0
- package/lib/workflows/branch-helpers.d.ts +9 -0
- package/lib/workflows/branch-helpers.d.ts.map +1 -0
- package/lib/workflows/branch-helpers.js +406 -0
- package/lib/workflows/branch-helpers.js.map +1 -0
- package/lib/workflows/branch-utils.d.ts +9 -0
- package/lib/workflows/branch-utils.d.ts.map +1 -0
- package/lib/workflows/branch-utils.js +61 -0
- package/lib/workflows/branch-utils.js.map +1 -0
- package/lib/workflows/branch.d.ts +12 -0
- package/lib/workflows/branch.d.ts.map +1 -0
- package/lib/workflows/branch.js +555 -0
- package/lib/workflows/branch.js.map +1 -0
- package/lib/workflows/cleanup.d.ts +10 -0
- package/lib/workflows/cleanup.d.ts.map +1 -0
- package/lib/workflows/cleanup.js +287 -0
- package/lib/workflows/cleanup.js.map +1 -0
- package/lib/workflows/commit.d.ts +10 -0
- package/lib/workflows/commit.d.ts.map +1 -0
- package/lib/workflows/commit.js +771 -0
- package/lib/workflows/commit.js.map +1 -0
- package/lib/workflows/main-steps.d.ts +12 -0
- package/lib/workflows/main-steps.d.ts.map +1 -0
- package/lib/workflows/main-steps.js +407 -0
- package/lib/workflows/main-steps.js.map +1 -0
- package/lib/workflows/main.d.ts +8 -0
- package/lib/workflows/main.d.ts.map +1 -0
- package/lib/workflows/main.js +720 -0
- package/lib/workflows/main.js.map +1 -0
- package/lib/workflows/security-gate.d.ts +8 -0
- package/lib/workflows/security-gate.d.ts.map +1 -0
- package/lib/workflows/security-gate.js +447 -0
- package/lib/workflows/security-gate.js.map +1 -0
- package/lib/workflows/settings.d.ts +15 -0
- package/lib/workflows/settings.d.ts.map +1 -0
- package/lib/workflows/settings.js +438 -0
- package/lib/workflows/settings.js.map +1 -0
- package/lib/workflows/trello-menu.d.ts +16 -0
- package/lib/workflows/trello-menu.d.ts.map +1 -0
- package/lib/workflows/trello-menu.js +361 -0
- package/lib/workflows/trello-menu.js.map +1 -0
- package/package.json +112 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Geeto
|
|
2
|
+
|
|
3
|
+
> AI-Powered Git Workflow Automation
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/js/%40geeto%2Fcore)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
|
|
9
|
+
Streamline your Git workflow with intelligent branch naming, commit messages, and Trello integration—powered by AI (Gemini, GitHub Copilot, OpenRouter).
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Multiple AI Providers** - Gemini, GitHub Copilot, OpenRouter
|
|
14
|
+
- **Smart Branch Naming** - AI-generated branch names from diffs or Trello cards
|
|
15
|
+
- **Conventional Commits** - Auto-generated commit messages following best practices
|
|
16
|
+
- **Trello Integration** - Link branches to Trello cards, generate task lists for AI agents
|
|
17
|
+
- **Checkpoint Recovery** - Resume interrupted workflows from any step
|
|
18
|
+
- **Cross-Platform** - macOS, Linux, Windows
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
### NPM/Bun
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g @geeto/core
|
|
26
|
+
# or
|
|
27
|
+
bun install -g @geeto/core
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### From Source
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
curl -fsSL https://raw.githubusercontent.com/rust142/geeto/main/tools/install.sh | bash -s -- --no-label
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Requirements:** Node.js ≥ 18, Bun ≥ 1.0, Git ≥ 2.0
|
|
37
|
+
|
|
38
|
+
## Uninstallation
|
|
39
|
+
|
|
40
|
+
### NPM/Bun
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm uninstall -g @geeto/core
|
|
44
|
+
# or
|
|
45
|
+
bun remove -g @geeto/core
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### From Source
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
curl -fsSL https://raw.githubusercontent.com/rust142/geeto/main/tools/uninstall.sh | bash
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Quick Start
|
|
55
|
+
|
|
56
|
+
### 1. Run
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
geeto
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
On first run, Geeto will automatically guide you through AI provider setup:
|
|
63
|
+
|
|
64
|
+
- **Gemini** - Enter your API key (get one at [Google AI Studio](https://makersuite.google.com/app/apikey))
|
|
65
|
+
- **OpenRouter** - Enter your API key (get one at [OpenRouter](https://openrouter.ai/keys))
|
|
66
|
+
- **GitHub Copilot** - Auto-configured (requires [GitHub CLI](https://cli.github.com/))
|
|
67
|
+
|
|
68
|
+
All configurations are saved locally in `.geeto/` directory.
|
|
69
|
+
|
|
70
|
+
### 2. Follow the Workflow
|
|
71
|
+
|
|
72
|
+
Geeto guides you through 6 steps:
|
|
73
|
+
|
|
74
|
+
1. **Stage** - Select files to commit
|
|
75
|
+
2. **Branch** - AI-generated branch name
|
|
76
|
+
3. **Commit** - AI-generated commit message
|
|
77
|
+
4. **Push** - Push to remote
|
|
78
|
+
5. **Merge** - Merge to target branch
|
|
79
|
+
6. **Cleanup** - Delete merged branches
|
|
80
|
+
|
|
81
|
+
### CLI Flags
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
geeto --stage # Start from stage step
|
|
85
|
+
geeto --branch # Start from branch creation
|
|
86
|
+
geeto --commit # Start from commit step
|
|
87
|
+
geeto --push # Start from push step
|
|
88
|
+
geeto --merge # Start from merge step
|
|
89
|
+
geeto --cleanup # Branch cleanup workflow
|
|
90
|
+
geeto --trello # Trello integration menu
|
|
91
|
+
geeto --settings # Configure AI providers
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Trello Integration
|
|
95
|
+
|
|
96
|
+
Generate task instruction files for AI agents:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
geeto --trello-generate
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Creates `.github/instructions/tasks.instructions.md` (VSCode) or editor-specific paths with:
|
|
103
|
+
|
|
104
|
+
- Step-by-step task list from Trello
|
|
105
|
+
- AI agent instructions (execute one task at a time)
|
|
106
|
+
- Backend/Frontend best practices
|
|
107
|
+
|
|
108
|
+
## Development
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Setup
|
|
112
|
+
git clone https://github.com/rust142/geeto.git
|
|
113
|
+
cd geeto
|
|
114
|
+
bun install
|
|
115
|
+
|
|
116
|
+
# Build
|
|
117
|
+
bun run build
|
|
118
|
+
|
|
119
|
+
# Development mode
|
|
120
|
+
bun run dev
|
|
121
|
+
|
|
122
|
+
# Lint & Type Check
|
|
123
|
+
bun run check:fast
|
|
124
|
+
bun run check:full
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
|
|
128
|
+
|
|
129
|
+
## Contributing
|
|
130
|
+
|
|
131
|
+
We welcome contributions! Please:
|
|
132
|
+
|
|
133
|
+
1. Fork the repository
|
|
134
|
+
2. Create a branch: `dev#your-feature`
|
|
135
|
+
3. Make your changes
|
|
136
|
+
4. Run tests: `bun run check:fast && bun run check:full`
|
|
137
|
+
5. Submit a Pull Request to `develop` branch
|
|
138
|
+
|
|
139
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
|
140
|
+
|
|
141
|
+
## Support
|
|
142
|
+
|
|
143
|
+
If you find Geeto helpful, consider supporting the project:
|
|
144
|
+
|
|
145
|
+
- ☕ [Buy me a coffee on Saweria](https://saweria.co/rust142)
|
|
146
|
+
- ⭐ Star this repository
|
|
147
|
+
- 🐛 Report bugs and suggest features
|
|
148
|
+
- 📢 Share with others
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
This project is licensed under the MIT License.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Try SDK availability first; fallback to CLI ping for model enable checks.
|
|
3
|
+
*/
|
|
4
|
+
export declare const pingModel: (model: string) => Promise<boolean>;
|
|
5
|
+
export declare const isCliAvailable: () => boolean;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
pingModel: (model: string) => Promise<boolean>;
|
|
8
|
+
isCliAvailable: () => boolean;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=copilot-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-adapter.d.ts","sourceRoot":"","sources":["../../src/api/copilot-adapter.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,SAAS,GAAU,OAAO,MAAM,KAAG,OAAO,CAAC,OAAO,CAoB9D,CAAA;AAED,eAAO,MAAM,cAAc,QAAO,OAOjC,CAAA;;uBA7BsC,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;0BAsB9B,OAAO;;AASzC,wBAGC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { exec } from '../utils/exec.js';
|
|
2
|
+
import { log } from '../utils/logging.js';
|
|
3
|
+
/**
|
|
4
|
+
* Try SDK availability first; fallback to CLI ping for model enable checks.
|
|
5
|
+
*/
|
|
6
|
+
export const pingModel = async (model) => {
|
|
7
|
+
try {
|
|
8
|
+
const sdk = await import('./copilot-sdk.js');
|
|
9
|
+
if (sdk && typeof sdk.isAvailable === 'function') {
|
|
10
|
+
const ok = await sdk.isAvailable();
|
|
11
|
+
if (ok) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
// ignore
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
exec(`copilot -p "ping" --model ${model}`, true);
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
log.info('Copilot CLI ping failed: ' + String(error));
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export const isCliAvailable = () => {
|
|
29
|
+
try {
|
|
30
|
+
exec('copilot --version', true);
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export default {
|
|
38
|
+
pingModel,
|
|
39
|
+
isCliAvailable,
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=copilot-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-adapter.js","sourceRoot":"","sources":["../../src/api/copilot-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,KAAa,EAAoB,EAAE;IACjE,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;QAC5C,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;YACjD,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,WAAW,EAAE,CAAA;YAClC,IAAI,EAAE,EAAE,CAAC;gBACP,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;IAED,IAAI,CAAC;QACH,IAAI,CAAC,6BAA6B,KAAK,EAAE,EAAE,IAAI,CAAC,CAAA;QAChD,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,GAAG,CAAC,IAAI,CAAC,2BAA2B,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;QACrD,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,GAAY,EAAE;IAC1C,IAAI,CAAC;QACH,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAA;QAC/B,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC,CAAA;AAED,eAAe;IACb,SAAS;IACT,cAAc;CACf,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const MIN_COPILOT_VERSION = "0.0.400";
|
|
2
|
+
/**
|
|
3
|
+
* Parse version string to numeric value for comparison.
|
|
4
|
+
*/
|
|
5
|
+
export declare const parseParts: (v: string) => number;
|
|
6
|
+
/**
|
|
7
|
+
* Find the best (newest) copilot binary from known locations.
|
|
8
|
+
* Uses file-based caching to avoid slow exec calls on every startup.
|
|
9
|
+
*/
|
|
10
|
+
export declare const findBestCopilotBinary: () => {
|
|
11
|
+
path: string;
|
|
12
|
+
version: string;
|
|
13
|
+
} | null;
|
|
14
|
+
/**
|
|
15
|
+
* Check if Copilot CLI version is compatible with SDK.
|
|
16
|
+
* Automatically finds the newest copilot binary to bypass PATH cache issues.
|
|
17
|
+
* Returns true if compatible, false otherwise.
|
|
18
|
+
*/
|
|
19
|
+
export declare const checkCopilotCliVersion: () => boolean;
|
|
20
|
+
export declare const isAvailable: () => Promise<boolean>;
|
|
21
|
+
export declare const stopClient: () => Promise<void>;
|
|
22
|
+
export declare const generateBranchName: (text: string, correction?: string, model?: string) => Promise<string | null>;
|
|
23
|
+
export declare const generateCommitMessage: (diff: string, correction?: string, model?: string) => Promise<string | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Detailed model info and helpers for formatted choices
|
|
26
|
+
*/
|
|
27
|
+
type ModelDetail = {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
inputTokenLimit: number | null;
|
|
31
|
+
outputTokenLimit: number | null;
|
|
32
|
+
needsEnable: boolean;
|
|
33
|
+
isPremium: boolean;
|
|
34
|
+
multiplier: number | null;
|
|
35
|
+
label: string;
|
|
36
|
+
value: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const getAvailableModelsDetailed: () => Promise<ModelDetail[] | null>;
|
|
39
|
+
export declare const getAvailableModelChoices: (defaultModelId?: string) => Promise<{
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}[]>;
|
|
43
|
+
declare const _default: {
|
|
44
|
+
generateBranchName: (text: string, correction?: string, model?: string) => Promise<string | null>;
|
|
45
|
+
generateCommitMessage: (diff: string, correction?: string, model?: string) => Promise<string | null>;
|
|
46
|
+
};
|
|
47
|
+
export default _default;
|
|
48
|
+
//# sourceMappingURL=copilot-sdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-sdk.d.ts","sourceRoot":"","sources":["../../src/api/copilot-sdk.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,mBAAmB,YAAY,CAAA;AAY5C;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,KAAG,MAItC,CAAA;AA+CD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAO;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAoD5E,CAAA;AAKD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,QAAO,OAuBzC,CAAA;AAwED,eAAO,MAAM,WAAW,QAAa,OAAO,CAAC,OAAO,CAEnD,CAAA;AAED,eAAO,MAAM,UAAU,QAAa,OAAO,CAAC,IAAI,CAe/C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,MAAM,MAAM,EACZ,aAAa,MAAM,EACnB,QAAQ,MAAM,KACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAiCvB,CAAA;AAED,eAAO,MAAM,qBAAqB,GAChC,MAAM,MAAM,EACZ,aAAa,MAAM,EACnB,QAAQ,MAAM,KACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAgCvB,CAAA;AAED;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,0BAA0B,QAAa,OAAO,CAAC,WAAW,EAAE,GAAG,IAAI,CAyG/E,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAU,iBAAiB,MAAM;WA6B/B,MAAM;WAAS,MAAM;IAsB3D,CAAA;;+BAzPO,MAAM,eACC,MAAM,UACX,MAAM,KACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;kCAoCjB,MAAM,eACC,MAAM,UACX,MAAM,KACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;;AAiNzB,wBAGC"}
|