@codeguide/core 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -41
- package/__tests__/services/codespace/codespace-v2.test.ts +29 -18
- package/__tests__/services/usage/usage-service.test.ts +597 -85
- package/codeguide.ts +6 -0
- package/dist/codeguide.d.ts +3 -1
- package/dist/codeguide.js +2 -0
- package/dist/index.d.ts +4 -3
- package/dist/services/base/base-service.d.ts +21 -0
- package/dist/services/base/base-service.js +114 -0
- package/dist/services/codespace/codespace-service.d.ts +55 -1
- package/dist/services/codespace/codespace-service.js +260 -5
- package/dist/services/codespace/codespace-types.d.ts +193 -13
- package/dist/services/codespace/index.d.ts +1 -1
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.js +7 -1
- package/dist/services/projects/project-types.d.ts +66 -32
- package/dist/services/repository-analysis/repository-types.d.ts +1 -0
- package/dist/services/starter-kits/index.d.ts +2 -0
- package/dist/services/starter-kits/index.js +20 -0
- package/dist/services/starter-kits/starter-kits-service.d.ts +13 -0
- package/dist/services/starter-kits/starter-kits-service.js +27 -0
- package/dist/services/starter-kits/starter-kits-types.d.ts +34 -0
- package/dist/services/starter-kits/starter-kits-types.js +2 -0
- package/dist/services/tasks/task-service.d.ts +2 -1
- package/dist/services/tasks/task-service.js +8 -0
- package/dist/services/tasks/task-types.d.ts +26 -7
- package/dist/services/usage/usage-service.d.ts +5 -2
- package/dist/services/usage/usage-service.js +58 -9
- package/dist/services/usage/usage-types.d.ts +207 -34
- package/dist/services/users/index.d.ts +2 -0
- package/dist/services/users/index.js +20 -0
- package/dist/services/users/user-service.d.ts +12 -0
- package/dist/services/users/user-service.js +17 -0
- package/dist/services/users/user-types.d.ts +55 -0
- package/dist/services/users/user-types.js +2 -0
- package/docs/.vitepress/README.md +51 -0
- package/docs/.vitepress/config.ts +139 -0
- package/docs/.vitepress/theme/custom.css +80 -0
- package/docs/.vitepress/theme/index.ts +13 -0
- package/docs/.vitepress/tsconfig.json +19 -0
- package/docs/QUICKSTART.md +77 -0
- package/docs/README.md +134 -0
- package/docs/README_SETUP.md +46 -0
- package/docs/authentication.md +351 -0
- package/docs/codeguide-client.md +350 -0
- package/docs/codespace-models.md +1004 -0
- package/docs/codespace-service.md +558 -81
- package/docs/index.md +135 -0
- package/docs/package.json +14 -0
- package/docs/projects-service.md +688 -0
- package/docs/security-keys-service.md +773 -0
- package/docs/starter-kits-service.md +249 -0
- package/docs/task-service.md +955 -0
- package/docs/testsprite_tests/TC001_Homepage_Load_and_Hero_Section_Display.py +70 -0
- package/docs/testsprite_tests/TC002_Sidebar_Navigation_ExpandCollapse_Functionality.py +73 -0
- package/docs/testsprite_tests/TC003_Full_Text_Local_Search_with_Keyboard_Shortcut.py +90 -0
- package/docs/testsprite_tests/TC004_Dark_Mode_Toggle_and_Persistence.py +73 -0
- package/docs/testsprite_tests/TC005_Mobile_Responsiveness_and_Touch_Navigation.py +113 -0
- package/docs/testsprite_tests/TC006_GitHub_Integration_Edit_this_page_Links.py +73 -0
- package/docs/testsprite_tests/TC007_Syntax_Highlighting_and_Code_Copy_Functionality.py +73 -0
- package/docs/testsprite_tests/TC008_Auto_Generated_Table_of_Contents_Accuracy.py +73 -0
- package/docs/testsprite_tests/TC009_SEO_and_Content_Discoverability_Verification.py +73 -0
- package/docs/testsprite_tests/TC010_Accessibility_Compliance_WCAG_AA.py +73 -0
- package/docs/testsprite_tests/TC011_Local_Development_Workflow_Build_and_Hot_Reload.py +74 -0
- package/docs/testsprite_tests/TC012_Performance_Metrics_Compliance.py +73 -0
- package/docs/testsprite_tests/standard_prd.json +122 -0
- package/docs/testsprite_tests/testsprite-mcp-test-report.html +2508 -0
- package/docs/testsprite_tests/testsprite-mcp-test-report.md +273 -0
- package/docs/testsprite_tests/testsprite_frontend_test_plan.json +390 -0
- package/docs/usage-service.md +616 -0
- package/index.ts +11 -3
- package/package.json +16 -2
- package/plans/CODESPACE_LOGS_STREAMING_GUIDE.md +320 -0
- package/plans/CODESPACE_TASK_LOGS_API_COMPLETE_GUIDE.md +821 -0
- package/services/base/base-service.ts +130 -0
- package/services/codespace/codespace-service.ts +347 -8
- package/services/codespace/codespace-types.ts +263 -14
- package/services/codespace/index.ts +16 -1
- package/services/index.ts +4 -0
- package/services/projects/README.md +107 -34
- package/services/projects/project-types.ts +69 -32
- package/services/repository-analysis/repository-types.ts +1 -0
- package/services/starter-kits/index.ts +2 -0
- package/services/starter-kits/starter-kits-service.ts +33 -0
- package/services/starter-kits/starter-kits-types.ts +38 -0
- package/services/tasks/task-service.ts +10 -0
- package/services/tasks/task-types.ts +29 -7
- package/services/usage/usage-service.ts +59 -10
- package/services/usage/usage-types.ts +239 -34
- package/services/users/index.ts +2 -0
- package/services/users/user-service.ts +15 -0
- package/services/users/user-types.ts +59 -0
package/docs/index.md
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: home
|
|
3
|
+
|
|
4
|
+
hero:
|
|
5
|
+
name: '@codeguide/core'
|
|
6
|
+
text: 'TypeScript SDK'
|
|
7
|
+
tagline: Complete TypeScript SDK for integrating CodeGuide functionality into your applications
|
|
8
|
+
actions:
|
|
9
|
+
- theme: brand
|
|
10
|
+
text: Get Started
|
|
11
|
+
link: /codeguide-client
|
|
12
|
+
- theme: alt
|
|
13
|
+
text: View on GitHub
|
|
14
|
+
link: https://github.com/CodeGuide-dev/codeguide
|
|
15
|
+
|
|
16
|
+
features:
|
|
17
|
+
- title: 🔑 Multiple Authentication Methods
|
|
18
|
+
details: Database API keys, legacy keys, and JWT tokens with automatic fallback
|
|
19
|
+
- title: 📝 Project Management
|
|
20
|
+
details: Create, update, and manage projects programmatically with full CRUD operations
|
|
21
|
+
- title: 🤖 Codespace Tasks
|
|
22
|
+
details: Create and manage AI-powered coding tasks with support for multiple execution modes
|
|
23
|
+
- title: 🎯 Model Management
|
|
24
|
+
details: Query and manage LLM models and providers for your codespace tasks
|
|
25
|
+
- title: 🔐 Security Keys
|
|
26
|
+
details: Securely manage provider API keys and GitHub tokens with encryption
|
|
27
|
+
- title: 🛡️ TypeScript Support
|
|
28
|
+
details: Full type safety and IntelliSense support for all API methods
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install @codeguide/core
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Basic Usage
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { CodeGuide } from '@codeguide/core'
|
|
43
|
+
|
|
44
|
+
// Initialize the CodeGuide client
|
|
45
|
+
const codeguide = new CodeGuide({
|
|
46
|
+
baseUrl: 'https://api.codeguide.ai',
|
|
47
|
+
databaseApiKey: 'sk_your_database_api_key', // Recommended
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
// Access services
|
|
51
|
+
const projects = await codeguide.projects.getAllProjects()
|
|
52
|
+
const tasks = await codeguide.codespace.getCodespaceTasksByProject({
|
|
53
|
+
project_id: 'your_project_id',
|
|
54
|
+
})
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Documentation Structure
|
|
58
|
+
|
|
59
|
+
### Core Components
|
|
60
|
+
|
|
61
|
+
- **[CodeGuide Client](./codeguide-client.md)** - Main client class and initialization
|
|
62
|
+
- **[Authentication](./authentication.md)** - Authentication methods and configuration
|
|
63
|
+
|
|
64
|
+
### Services
|
|
65
|
+
|
|
66
|
+
- **[Projects Service](./projects-service.md)** - Project management and repository connections
|
|
67
|
+
- **[Codespace Service](./codespace-service.md)** - AI-powered coding tasks and workflows
|
|
68
|
+
- **[Codespace Models](./codespace-models.md)** - LLM model providers and model management
|
|
69
|
+
- **[Security Keys Service](./security-keys-service.md)** - Provider API keys and GitHub token management
|
|
70
|
+
- **[Usage Service](./usage-service.md)** - Usage tracking and authorization
|
|
71
|
+
- **[Starter Kits Service](./starter-kits-service.md)** - Retrieve starter kits for bootstrapping projects
|
|
72
|
+
|
|
73
|
+
## Features
|
|
74
|
+
|
|
75
|
+
- 🔑 **Multiple Authentication Methods** - Database API keys, legacy keys, and JWT tokens
|
|
76
|
+
- 📝 **Project Management** - Create, update, and manage projects programmatically
|
|
77
|
+
- 🤖 **Codespace Tasks** - Create and manage AI-powered coding tasks
|
|
78
|
+
- 🎯 **Model Management** - Query and manage LLM models and providers
|
|
79
|
+
- 🔐 **Security Keys** - Securely manage provider API keys and GitHub tokens
|
|
80
|
+
- 📊 **Usage Tracking** - Monitor API usage and credits
|
|
81
|
+
- 🛡️ **TypeScript Support** - Full type safety and IntelliSense
|
|
82
|
+
|
|
83
|
+
## Getting Started
|
|
84
|
+
|
|
85
|
+
1. **Install the package**: `npm install @codeguide/core`
|
|
86
|
+
2. **Get your API key**: Sign up at [codeguide.ai](https://codeguide.ai) to get your API key
|
|
87
|
+
3. **Initialize the client**: See [CodeGuide Client](./codeguide-client.md) for setup instructions
|
|
88
|
+
4. **Authenticate**: See [Authentication](./authentication.md) for authentication options
|
|
89
|
+
5. **Start building**: Explore the service documentation to learn about available features
|
|
90
|
+
|
|
91
|
+
## Common Use Cases
|
|
92
|
+
|
|
93
|
+
### Creating a Project
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
const project = await codeguide.projects.createProject({
|
|
97
|
+
title: 'My New Project',
|
|
98
|
+
description: 'Project description here',
|
|
99
|
+
})
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Creating a Codespace Task
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
const task = await codeguide.codespace.createCodespaceTaskV2({
|
|
106
|
+
project_id: project.id,
|
|
107
|
+
task_description: 'Implement user authentication',
|
|
108
|
+
execution_mode: 'implementation',
|
|
109
|
+
})
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Managing Security Keys
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
// Store a provider API key
|
|
116
|
+
await codeguide.securityKeys.createProviderAPIKey({
|
|
117
|
+
provider_key: 'openai',
|
|
118
|
+
api_key: 'sk-your-openai-key',
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
// Store a GitHub token
|
|
122
|
+
await codeguide.securityKeys.createGitHubToken({
|
|
123
|
+
github_token: 'ghp_your_github_token',
|
|
124
|
+
})
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Support
|
|
128
|
+
|
|
129
|
+
- **GitHub**: [CodeGuide Repository](https://github.com/CodeGuide-dev/codeguide)
|
|
130
|
+
- **Issues**: [GitHub Issues](https://github.com/CodeGuide-dev/codeguide/issues)
|
|
131
|
+
- **Documentation**: This documentation site
|
|
132
|
+
|
|
133
|
+
## License
|
|
134
|
+
|
|
135
|
+
MIT License - see the LICENSE file for details.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codeguide/core-docs",
|
|
3
|
+
"version": "0.0.28",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vitepress dev .",
|
|
7
|
+
"build": "vitepress build .",
|
|
8
|
+
"preview": "vitepress preview ."
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"vitepress": "^1.0.0",
|
|
12
|
+
"vue": "^3.3.0"
|
|
13
|
+
}
|
|
14
|
+
}
|