@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.
Files changed (92) hide show
  1. package/README.md +50 -41
  2. package/__tests__/services/codespace/codespace-v2.test.ts +29 -18
  3. package/__tests__/services/usage/usage-service.test.ts +597 -85
  4. package/codeguide.ts +6 -0
  5. package/dist/codeguide.d.ts +3 -1
  6. package/dist/codeguide.js +2 -0
  7. package/dist/index.d.ts +4 -3
  8. package/dist/services/base/base-service.d.ts +21 -0
  9. package/dist/services/base/base-service.js +114 -0
  10. package/dist/services/codespace/codespace-service.d.ts +55 -1
  11. package/dist/services/codespace/codespace-service.js +260 -5
  12. package/dist/services/codespace/codespace-types.d.ts +193 -13
  13. package/dist/services/codespace/index.d.ts +1 -1
  14. package/dist/services/index.d.ts +4 -0
  15. package/dist/services/index.js +7 -1
  16. package/dist/services/projects/project-types.d.ts +66 -32
  17. package/dist/services/repository-analysis/repository-types.d.ts +1 -0
  18. package/dist/services/starter-kits/index.d.ts +2 -0
  19. package/dist/services/starter-kits/index.js +20 -0
  20. package/dist/services/starter-kits/starter-kits-service.d.ts +13 -0
  21. package/dist/services/starter-kits/starter-kits-service.js +27 -0
  22. package/dist/services/starter-kits/starter-kits-types.d.ts +34 -0
  23. package/dist/services/starter-kits/starter-kits-types.js +2 -0
  24. package/dist/services/tasks/task-service.d.ts +2 -1
  25. package/dist/services/tasks/task-service.js +8 -0
  26. package/dist/services/tasks/task-types.d.ts +26 -7
  27. package/dist/services/usage/usage-service.d.ts +5 -2
  28. package/dist/services/usage/usage-service.js +58 -9
  29. package/dist/services/usage/usage-types.d.ts +207 -34
  30. package/dist/services/users/index.d.ts +2 -0
  31. package/dist/services/users/index.js +20 -0
  32. package/dist/services/users/user-service.d.ts +12 -0
  33. package/dist/services/users/user-service.js +17 -0
  34. package/dist/services/users/user-types.d.ts +55 -0
  35. package/dist/services/users/user-types.js +2 -0
  36. package/docs/.vitepress/README.md +51 -0
  37. package/docs/.vitepress/config.ts +139 -0
  38. package/docs/.vitepress/theme/custom.css +80 -0
  39. package/docs/.vitepress/theme/index.ts +13 -0
  40. package/docs/.vitepress/tsconfig.json +19 -0
  41. package/docs/QUICKSTART.md +77 -0
  42. package/docs/README.md +134 -0
  43. package/docs/README_SETUP.md +46 -0
  44. package/docs/authentication.md +351 -0
  45. package/docs/codeguide-client.md +350 -0
  46. package/docs/codespace-models.md +1004 -0
  47. package/docs/codespace-service.md +558 -81
  48. package/docs/index.md +135 -0
  49. package/docs/package.json +14 -0
  50. package/docs/projects-service.md +688 -0
  51. package/docs/security-keys-service.md +773 -0
  52. package/docs/starter-kits-service.md +249 -0
  53. package/docs/task-service.md +955 -0
  54. package/docs/testsprite_tests/TC001_Homepage_Load_and_Hero_Section_Display.py +70 -0
  55. package/docs/testsprite_tests/TC002_Sidebar_Navigation_ExpandCollapse_Functionality.py +73 -0
  56. package/docs/testsprite_tests/TC003_Full_Text_Local_Search_with_Keyboard_Shortcut.py +90 -0
  57. package/docs/testsprite_tests/TC004_Dark_Mode_Toggle_and_Persistence.py +73 -0
  58. package/docs/testsprite_tests/TC005_Mobile_Responsiveness_and_Touch_Navigation.py +113 -0
  59. package/docs/testsprite_tests/TC006_GitHub_Integration_Edit_this_page_Links.py +73 -0
  60. package/docs/testsprite_tests/TC007_Syntax_Highlighting_and_Code_Copy_Functionality.py +73 -0
  61. package/docs/testsprite_tests/TC008_Auto_Generated_Table_of_Contents_Accuracy.py +73 -0
  62. package/docs/testsprite_tests/TC009_SEO_and_Content_Discoverability_Verification.py +73 -0
  63. package/docs/testsprite_tests/TC010_Accessibility_Compliance_WCAG_AA.py +73 -0
  64. package/docs/testsprite_tests/TC011_Local_Development_Workflow_Build_and_Hot_Reload.py +74 -0
  65. package/docs/testsprite_tests/TC012_Performance_Metrics_Compliance.py +73 -0
  66. package/docs/testsprite_tests/standard_prd.json +122 -0
  67. package/docs/testsprite_tests/testsprite-mcp-test-report.html +2508 -0
  68. package/docs/testsprite_tests/testsprite-mcp-test-report.md +273 -0
  69. package/docs/testsprite_tests/testsprite_frontend_test_plan.json +390 -0
  70. package/docs/usage-service.md +616 -0
  71. package/index.ts +11 -3
  72. package/package.json +16 -2
  73. package/plans/CODESPACE_LOGS_STREAMING_GUIDE.md +320 -0
  74. package/plans/CODESPACE_TASK_LOGS_API_COMPLETE_GUIDE.md +821 -0
  75. package/services/base/base-service.ts +130 -0
  76. package/services/codespace/codespace-service.ts +347 -8
  77. package/services/codespace/codespace-types.ts +263 -14
  78. package/services/codespace/index.ts +16 -1
  79. package/services/index.ts +4 -0
  80. package/services/projects/README.md +107 -34
  81. package/services/projects/project-types.ts +69 -32
  82. package/services/repository-analysis/repository-types.ts +1 -0
  83. package/services/starter-kits/index.ts +2 -0
  84. package/services/starter-kits/starter-kits-service.ts +33 -0
  85. package/services/starter-kits/starter-kits-types.ts +38 -0
  86. package/services/tasks/task-service.ts +10 -0
  87. package/services/tasks/task-types.ts +29 -7
  88. package/services/usage/usage-service.ts +59 -10
  89. package/services/usage/usage-types.ts +239 -34
  90. package/services/users/index.ts +2 -0
  91. package/services/users/user-service.ts +15 -0
  92. 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
+ }