bunsane 0.1.4 → 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.
- package/.claude/settings.local.json +47 -0
- package/.claude/skills/update-memory.md +74 -0
- package/.prettierrc +4 -0
- package/.serena/memories/architectural-decision-no-dependency-injection.md +76 -0
- package/.serena/memories/architecture.md +154 -0
- package/.serena/memories/cache-interface-refactoring-2026-01-24.md +165 -0
- package/.serena/memories/code_style_and_conventions.md +76 -0
- package/.serena/memories/project_overview.md +43 -0
- package/.serena/memories/schema-dsl-plan.md +107 -0
- package/.serena/memories/suggested_commands.md +80 -0
- package/.serena/memories/typescript-compilation-status.md +54 -0
- package/.serena/project.yml +114 -0
- package/TODO.md +1 -7
- package/bun.lock +150 -4
- package/bunfig.toml +10 -0
- package/config/cache.config.ts +77 -0
- package/config/upload.config.ts +4 -5
- package/core/App.ts +870 -123
- package/core/ArcheType.ts +2268 -377
- package/core/BatchLoader.ts +181 -71
- package/core/Config.ts +153 -0
- package/core/Decorators.ts +4 -1
- package/core/Entity.ts +621 -92
- package/core/EntityHookManager.ts +1 -1
- package/core/EntityInterface.ts +3 -1
- package/core/EntityManager.ts +1 -13
- package/core/ErrorHandler.ts +8 -2
- package/core/Logger.ts +9 -0
- package/core/Middleware.ts +34 -0
- package/core/RequestContext.ts +5 -1
- package/core/RequestLoaders.ts +227 -93
- package/core/SchedulerManager.ts +193 -52
- package/core/cache/CacheAnalytics.ts +399 -0
- package/core/cache/CacheFactory.ts +145 -0
- package/core/cache/CacheManager.ts +520 -0
- package/core/cache/CacheProvider.ts +34 -0
- package/core/cache/CacheWarmer.ts +157 -0
- package/core/cache/CompressionUtils.ts +110 -0
- package/core/cache/MemoryCache.ts +251 -0
- package/core/cache/MultiLevelCache.ts +180 -0
- package/core/cache/NoOpCache.ts +53 -0
- package/core/cache/RedisCache.ts +464 -0
- package/core/cache/TTLStrategy.ts +254 -0
- package/core/cache/index.ts +6 -0
- package/core/components/BaseComponent.ts +120 -0
- package/core/{ComponentRegistry.ts → components/ComponentRegistry.ts} +148 -54
- package/core/components/Decorators.ts +88 -0
- package/core/components/Interfaces.ts +7 -0
- package/core/components/index.ts +5 -0
- package/core/decorators/EntityHooks.ts +0 -3
- package/core/decorators/IndexedField.ts +26 -0
- package/core/decorators/ScheduledTask.ts +0 -47
- package/core/events/EntityLifecycleEvents.ts +1 -1
- package/core/health.ts +112 -0
- package/core/metadata/definitions/ArcheType.ts +14 -0
- package/core/metadata/definitions/Component.ts +9 -0
- package/core/metadata/definitions/gqlObject.ts +1 -1
- package/core/metadata/index.ts +42 -1
- package/core/metadata/metadata-storage.ts +28 -2
- package/core/middleware/AccessLog.ts +59 -0
- package/core/middleware/RequestId.ts +38 -0
- package/core/middleware/SecurityHeaders.ts +62 -0
- package/core/middleware/index.ts +3 -0
- package/core/scheduler/DistributedLock.ts +266 -0
- package/core/scheduler/index.ts +15 -0
- package/core/validateEnv.ts +92 -0
- package/database/DatabaseHelper.ts +416 -40
- package/database/IndexingStrategy.ts +342 -0
- package/database/PreparedStatementCache.ts +226 -0
- package/database/index.ts +32 -7
- package/database/sqlHelpers.ts +14 -2
- package/endpoints/archetypes.ts +362 -0
- package/endpoints/components.ts +58 -0
- package/endpoints/entity.ts +80 -0
- package/endpoints/index.ts +27 -0
- package/endpoints/query.ts +93 -0
- package/endpoints/stats.ts +76 -0
- package/endpoints/tables.ts +212 -0
- package/endpoints/types.ts +155 -0
- package/gql/ArchetypeOperations.ts +32 -86
- package/gql/Generator.ts +27 -315
- package/gql/GeneratorV2.ts +37 -0
- package/gql/builders/InputTypeBuilder.ts +99 -0
- package/gql/builders/ResolverBuilder.ts +234 -0
- package/gql/builders/TypeDefBuilder.ts +105 -0
- package/gql/builders/index.ts +3 -0
- package/gql/decorators/Upload.ts +1 -1
- package/gql/depthLimit.ts +85 -0
- package/gql/graph/GraphNode.ts +224 -0
- package/gql/graph/SchemaGraph.ts +278 -0
- package/gql/helpers.ts +8 -2
- package/gql/index.ts +56 -4
- package/gql/middleware.ts +79 -0
- package/gql/orchestration/GraphQLSchemaOrchestrator.ts +241 -0
- package/gql/orchestration/index.ts +1 -0
- package/gql/scanner/ServiceScanner.ts +347 -0
- package/gql/schema/index.ts +458 -0
- package/gql/strategies/TypeGenerationStrategy.ts +329 -0
- package/gql/types.ts +1 -0
- package/gql/utils/TypeSignature.ts +220 -0
- package/gql/utils/index.ts +1 -0
- package/gql/visitors/ArchetypePreprocessorVisitor.ts +80 -0
- package/gql/visitors/DeduplicationVisitor.ts +82 -0
- package/gql/visitors/GraphVisitor.ts +78 -0
- package/gql/visitors/ResolverGeneratorVisitor.ts +122 -0
- package/gql/visitors/SchemaGeneratorVisitor.ts +851 -0
- package/gql/visitors/TypeCollectorVisitor.ts +79 -0
- package/gql/visitors/VisitorComposer.ts +96 -0
- package/gql/visitors/index.ts +7 -0
- package/package.json +59 -37
- package/plugins/index.ts +2 -2
- package/query/CTENode.ts +97 -0
- package/query/ComponentInclusionNode.ts +689 -0
- package/query/FilterBuilder.ts +127 -0
- package/query/FilterBuilderRegistry.ts +202 -0
- package/query/OrNode.ts +517 -0
- package/query/OrQuery.ts +42 -0
- package/query/Query.ts +1022 -0
- package/query/QueryContext.ts +170 -0
- package/query/QueryDAG.ts +122 -0
- package/query/QueryNode.ts +65 -0
- package/query/SourceNode.ts +53 -0
- package/query/builders/FullTextSearchBuilder.ts +236 -0
- package/query/index.ts +21 -0
- package/scheduler/index.ts +40 -8
- package/service/Service.ts +2 -1
- package/service/ServiceRegistry.ts +6 -5
- package/{core/storage → storage}/LocalStorageProvider.ts +2 -2
- package/storage/S3StorageProvider.ts +316 -0
- package/{core/storage → storage}/StorageProvider.ts +7 -3
- package/studio/bun.lock +482 -0
- package/studio/index.html +13 -0
- package/studio/package.json +39 -0
- package/studio/postcss.config.js +6 -0
- package/studio/src/components/DataTable.tsx +211 -0
- package/studio/src/components/Layout.tsx +13 -0
- package/studio/src/components/PageContainer.tsx +9 -0
- package/studio/src/components/PageHeader.tsx +13 -0
- package/studio/src/components/SearchBar.tsx +57 -0
- package/studio/src/components/Sidebar.tsx +294 -0
- package/studio/src/components/ui/button.tsx +56 -0
- package/studio/src/components/ui/checkbox.tsx +26 -0
- package/studio/src/components/ui/input.tsx +25 -0
- package/studio/src/hooks/useDataTable.ts +131 -0
- package/studio/src/index.css +36 -0
- package/studio/src/lib/api.ts +186 -0
- package/studio/src/lib/utils.ts +13 -0
- package/studio/src/main.tsx +17 -0
- package/studio/src/pages/ArcheType.tsx +239 -0
- package/studio/src/pages/Components.tsx +124 -0
- package/studio/src/pages/EntityInspector.tsx +302 -0
- package/studio/src/pages/QueryRunner.tsx +246 -0
- package/studio/src/pages/Table.tsx +94 -0
- package/studio/src/pages/Welcome.tsx +241 -0
- package/studio/src/routes.tsx +45 -0
- package/studio/src/store/archeTypeSettings.ts +30 -0
- package/studio/src/store/studio.ts +65 -0
- package/studio/src/utils/columnHelpers.tsx +114 -0
- package/studio/studio-instructions.md +81 -0
- package/studio/tailwind.config.js +77 -0
- package/studio/tsconfig.json +24 -0
- package/studio/utils.ts +54 -0
- package/studio/vite.config.js +19 -0
- package/swagger/generator.ts +1 -1
- package/tests/e2e/http.test.ts +126 -0
- package/tests/fixtures/archetypes/TestUserArchetype.ts +21 -0
- package/tests/fixtures/components/TestOrder.ts +23 -0
- package/tests/fixtures/components/TestProduct.ts +23 -0
- package/tests/fixtures/components/TestUser.ts +20 -0
- package/tests/fixtures/components/index.ts +6 -0
- package/tests/graphql/SchemaGeneration.test.ts +90 -0
- package/tests/graphql/builders/ResolverBuilder.test.ts +223 -0
- package/tests/graphql/builders/TypeDefBuilder.test.ts +153 -0
- package/tests/integration/archetype/ArcheType.persistence.test.ts +241 -0
- package/tests/integration/cache/CacheInvalidation.test.ts +259 -0
- package/tests/integration/entity/Entity.persistence.test.ts +333 -0
- package/tests/integration/query/Query.exec.test.ts +523 -0
- package/tests/pglite-setup.ts +61 -0
- package/tests/setup.ts +164 -0
- package/tests/stress/BenchmarkRunner.ts +203 -0
- package/tests/stress/DataSeeder.ts +190 -0
- package/tests/stress/StressTestReporter.ts +229 -0
- package/tests/stress/cursor-perf-test.ts +171 -0
- package/tests/stress/fixtures/StressTestComponents.ts +58 -0
- package/tests/stress/index.ts +7 -0
- package/tests/stress/scenarios/query-benchmarks.test.ts +285 -0
- package/tests/unit/BatchLoader.test.ts +82 -0
- package/tests/unit/archetype/ArcheType.test.ts +107 -0
- package/tests/unit/cache/CacheManager.test.ts +347 -0
- package/tests/unit/cache/MemoryCache.test.ts +260 -0
- package/tests/unit/cache/RedisCache.test.ts +411 -0
- package/tests/unit/entity/Entity.components.test.ts +244 -0
- package/tests/unit/entity/Entity.test.ts +345 -0
- package/tests/unit/gql/depthLimit.test.ts +203 -0
- package/tests/unit/gql/operationMiddleware.test.ts +293 -0
- package/tests/unit/health/Health.test.ts +129 -0
- package/tests/unit/middleware/AccessLog.test.ts +37 -0
- package/tests/unit/middleware/Middleware.test.ts +98 -0
- package/tests/unit/middleware/RequestId.test.ts +54 -0
- package/tests/unit/middleware/SecurityHeaders.test.ts +66 -0
- package/tests/unit/query/FilterBuilder.test.ts +111 -0
- package/tests/unit/query/Query.test.ts +308 -0
- package/tests/unit/scheduler/DistributedLock.test.ts +274 -0
- package/tests/unit/schema/schema-integration.test.ts +426 -0
- package/tests/unit/schema/schema.test.ts +580 -0
- package/tests/unit/storage/S3StorageProvider.test.ts +571 -0
- package/tests/unit/upload/RestUpload.test.ts +267 -0
- package/tests/unit/validateEnv.test.ts +82 -0
- package/tests/utils/entity-tracker.ts +57 -0
- package/tests/utils/index.ts +13 -0
- package/tests/utils/test-context.ts +149 -0
- package/tsconfig.json +5 -1
- package/types/archetype.types.ts +6 -0
- package/types/hooks.types.ts +1 -1
- package/types/query.types.ts +110 -0
- package/types/scheduler.types.ts +68 -7
- package/types/upload.types.ts +1 -0
- package/{core → upload}/FileValidator.ts +10 -1
- package/upload/RestUpload.ts +130 -0
- package/{core/components → upload}/UploadComponent.ts +11 -11
- package/{core → upload}/UploadManager.ts +3 -3
- package/upload/index.ts +23 -7
- package/utils/UploadHelper.ts +27 -6
- package/utils/cronParser.ts +16 -6
- package/.github/workflows/deploy-docs.yml +0 -57
- package/core/Components.ts +0 -202
- package/core/EntityCache.ts +0 -15
- package/core/Query.ts +0 -880
- package/docs/README.md +0 -149
- package/docs/_coverpage.md +0 -36
- package/docs/_sidebar.md +0 -23
- package/docs/api/core.md +0 -568
- package/docs/api/hooks.md +0 -554
- package/docs/api/index.md +0 -222
- package/docs/api/query.md +0 -678
- package/docs/api/service.md +0 -744
- package/docs/core-concepts/archetypes.md +0 -512
- package/docs/core-concepts/components.md +0 -498
- package/docs/core-concepts/entity.md +0 -314
- package/docs/core-concepts/hooks.md +0 -683
- package/docs/core-concepts/query.md +0 -588
- package/docs/core-concepts/services.md +0 -647
- package/docs/examples/code-examples.md +0 -425
- package/docs/getting-started.md +0 -337
- package/docs/index.html +0 -97
- package/tests/bench/insert.bench.ts +0 -60
- package/tests/bench/relations.bench.ts +0 -270
- package/tests/bench/sorting.bench.ts +0 -416
- package/tests/component-hooks-simple.test.ts +0 -117
- package/tests/component-hooks.test.ts +0 -1461
- package/tests/component.test.ts +0 -339
- package/tests/errorHandling.test.ts +0 -155
- package/tests/hooks.test.ts +0 -667
- package/tests/query-sorting.test.ts +0 -101
- package/tests/query.test.ts +0 -81
- package/tests/relations.test.ts +0 -170
- package/tests/scheduler.test.ts +0 -724
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Schema DSL for GraphQL Operation Inputs
|
|
2
|
+
|
|
3
|
+
## Status: Planning Complete, Ready for Implementation
|
|
4
|
+
|
|
5
|
+
**Date**: 2026-02-02
|
|
6
|
+
|
|
7
|
+
## Problem Statement
|
|
8
|
+
|
|
9
|
+
The current Zod → @gqloom → GraphQL pipeline is broken for complex input types:
|
|
10
|
+
- `zod: 4.1.5` (Zod v4 has breaking internal changes)
|
|
11
|
+
- `@gqloom/zod: ^0.12.2` (designed for Zod v3)
|
|
12
|
+
- `generateInputTypeFromZod()` is 360 lines of workarounds that still fail
|
|
13
|
+
|
|
14
|
+
### What's Broken
|
|
15
|
+
- Nested `z.object()` - Broken
|
|
16
|
+
- `.omit()`, `.extend()`, `.partial()` - Broken (empty `_def`)
|
|
17
|
+
- Arrays of objects - Broken
|
|
18
|
+
- Unions - Broken
|
|
19
|
+
- Effects/transforms - Broken
|
|
20
|
+
- Only basic scalars work: `z.string()`, `z.number()`, `z.boolean()`
|
|
21
|
+
|
|
22
|
+
## Solution: Custom Schema DSL
|
|
23
|
+
|
|
24
|
+
Build a purpose-built DSL (~400 lines) that:
|
|
25
|
+
1. Generates GraphQL SDL directly (bypasses @gqloom for inputs)
|
|
26
|
+
2. Uses Zod only for runtime validation
|
|
27
|
+
3. Coexists with existing system (ArcheTypes still use @gqloom for outputs)
|
|
28
|
+
|
|
29
|
+
## API Design
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { t } from 'bunsane/schema';
|
|
33
|
+
|
|
34
|
+
@GraphQLOperation({
|
|
35
|
+
type: "Mutation",
|
|
36
|
+
input: {
|
|
37
|
+
email: t.string().email().required(),
|
|
38
|
+
password: t.string().minLength(8).required(),
|
|
39
|
+
settings: t.object({
|
|
40
|
+
theme: t.enum(['light', 'dark'] as const, 'Theme'),
|
|
41
|
+
notifications: t.boolean(),
|
|
42
|
+
}, 'SettingsInput'),
|
|
43
|
+
},
|
|
44
|
+
output: User
|
|
45
|
+
})
|
|
46
|
+
async createUser(input: InferInput<typeof input>) { ... }
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## File Structure
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
schema/
|
|
53
|
+
├── index.ts # Public exports: t, InferInput, SchemaType
|
|
54
|
+
├── types.ts # Core interfaces and constraint types
|
|
55
|
+
├── builders/
|
|
56
|
+
│ ├── index.ts # Export all builders
|
|
57
|
+
│ ├── base.ts # BaseSchemaType abstract class
|
|
58
|
+
│ ├── scalars.ts # StringType, IntType, FloatType, BooleanType, IDType
|
|
59
|
+
│ ├── enum.ts # EnumType
|
|
60
|
+
│ ├── object.ts # ObjectType (nested inputs)
|
|
61
|
+
│ ├── list.ts # ListType (arrays)
|
|
62
|
+
│ └── ref.ts # RefType (reference existing GraphQL types)
|
|
63
|
+
├── generators/
|
|
64
|
+
│ ├── graphql.ts # Generate GraphQL SDL from schema
|
|
65
|
+
│ └── zod.ts # Generate Zod schema from schema
|
|
66
|
+
└── inference.ts # TypeScript type inference helpers
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Implementation Phases
|
|
70
|
+
|
|
71
|
+
### Phase 1: Foundation (Design Complete)
|
|
72
|
+
- [x] Core types and interfaces
|
|
73
|
+
- [x] Scalar types (String, Int, Float, Boolean, ID)
|
|
74
|
+
- [x] `.required()` / `.optional()` / `.nullable()`
|
|
75
|
+
- [x] Basic `toGraphQL()` and `toZod()` generation
|
|
76
|
+
- [ ] Integration point in SchemaGeneratorVisitor
|
|
77
|
+
- [ ] Basic tests
|
|
78
|
+
|
|
79
|
+
### Phase 2: Validation Constraints
|
|
80
|
+
- [ ] String: `.minLength()`, `.maxLength()`, `.email()`, `.url()`, `.uuid()`, `.pattern()`
|
|
81
|
+
- [ ] Number: `.min()`, `.max()`, `.positive()`, `.negative()`
|
|
82
|
+
- [ ] Zod schema generation with constraints
|
|
83
|
+
|
|
84
|
+
### Phase 3: Complex Types
|
|
85
|
+
- [ ] `ObjectType` for nested inputs
|
|
86
|
+
- [ ] `ListType` for arrays
|
|
87
|
+
- [ ] `EnumType` with proper GraphQL enum generation
|
|
88
|
+
- [ ] Nested type definition collection
|
|
89
|
+
|
|
90
|
+
### Phase 4: Polish & Migration
|
|
91
|
+
- [ ] `InferInput<>` type helper
|
|
92
|
+
- [ ] Error messages with field paths
|
|
93
|
+
- [ ] Documentation
|
|
94
|
+
- [ ] Migration guide
|
|
95
|
+
|
|
96
|
+
## Key Design Decisions
|
|
97
|
+
|
|
98
|
+
1. **Single source of truth** - One declaration generates GraphQL SDL + Zod validation + TypeScript types
|
|
99
|
+
2. **No @gqloom for inputs** - Generate SDL directly, use Zod only for runtime validation
|
|
100
|
+
3. **Coexist with existing system** - ArcheTypes still use @gqloom for output types
|
|
101
|
+
4. **Incremental adoption** - Support legacy `GraphQLFieldTypes` alongside new `t.` API
|
|
102
|
+
|
|
103
|
+
## Related Files
|
|
104
|
+
|
|
105
|
+
- Plan document: `plan/schema-dsl-analysis.md`
|
|
106
|
+
- Current broken implementation: `gql/generators/SchemaGeneratorVisitor.ts` (`generateInputTypeFromZod()`)
|
|
107
|
+
- Integration target: `gql/generators/SchemaGeneratorVisitor.ts`
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Suggested Commands
|
|
2
|
+
|
|
3
|
+
## Development Commands
|
|
4
|
+
|
|
5
|
+
### Running Tests
|
|
6
|
+
```bash
|
|
7
|
+
# Run all tests
|
|
8
|
+
bun test
|
|
9
|
+
|
|
10
|
+
# Run specific test file
|
|
11
|
+
bun test path/to/file.test.ts
|
|
12
|
+
|
|
13
|
+
# Run tests matching a pattern
|
|
14
|
+
bun test --filter "pattern"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Test configuration is in `bunfig.toml`:
|
|
18
|
+
- Preloads `./test/setup.ts` for database initialization
|
|
19
|
+
- 30-second timeout for integration tests
|
|
20
|
+
- Uses `smol = true` to limit parallelism (avoids DB connection pool exhaustion)
|
|
21
|
+
|
|
22
|
+
### Building
|
|
23
|
+
```bash
|
|
24
|
+
# Full build (includes studio)
|
|
25
|
+
bun run build
|
|
26
|
+
|
|
27
|
+
# Build studio only
|
|
28
|
+
bun run build:studio
|
|
29
|
+
|
|
30
|
+
# Watch mode for development
|
|
31
|
+
bun run dev
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Type Checking
|
|
35
|
+
```bash
|
|
36
|
+
# Run TypeScript compiler
|
|
37
|
+
tsc
|
|
38
|
+
|
|
39
|
+
# Watch mode
|
|
40
|
+
tsc --watch
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Dead Code Detection
|
|
44
|
+
```bash
|
|
45
|
+
# Run knip for dead code detection
|
|
46
|
+
bunx knip
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Git Commands (Windows)
|
|
50
|
+
```bash
|
|
51
|
+
git status
|
|
52
|
+
git add .
|
|
53
|
+
git commit -m "message"
|
|
54
|
+
git push
|
|
55
|
+
git pull
|
|
56
|
+
git log --oneline -10
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## File Operations (Windows)
|
|
60
|
+
```bash
|
|
61
|
+
# List directory
|
|
62
|
+
dir
|
|
63
|
+
ls # works in Git Bash / PowerShell
|
|
64
|
+
|
|
65
|
+
# Find files
|
|
66
|
+
dir /s /b *.ts
|
|
67
|
+
Get-ChildItem -Recurse -Filter "*.ts" # PowerShell
|
|
68
|
+
|
|
69
|
+
# Search in files
|
|
70
|
+
findstr /s /i "pattern" *.ts
|
|
71
|
+
Select-String -Path "*.ts" -Pattern "pattern" -Recurse # PowerShell
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Database
|
|
75
|
+
The framework uses PostgreSQL. Ensure a PostgreSQL instance is running and configured via `.env.test` or environment variables.
|
|
76
|
+
|
|
77
|
+
## Environment Setup
|
|
78
|
+
1. Copy `.env.test` to `.env` for local development
|
|
79
|
+
2. Configure PostgreSQL connection
|
|
80
|
+
3. Run `bun install` for dependencies
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# TypeScript Compilation Status
|
|
2
|
+
|
|
3
|
+
**Last Updated**: 2026-02-05
|
|
4
|
+
**Current Error Count**: 69 (down from 100+)
|
|
5
|
+
|
|
6
|
+
## Recent Improvements
|
|
7
|
+
|
|
8
|
+
### Cache Interface Standardization (2026-01-24)
|
|
9
|
+
**Errors Resolved**: 30+ cache-related errors
|
|
10
|
+
**Status**: COMPLETE
|
|
11
|
+
|
|
12
|
+
All cache-related TypeScript errors have been resolved by standardizing implementations of the `CacheProvider` interface. See `cache-interface-refactoring-2026-01-24` memory for details.
|
|
13
|
+
|
|
14
|
+
## Remaining Error Categories
|
|
15
|
+
|
|
16
|
+
### 1. SchedulerManager (Priority: High)
|
|
17
|
+
- Location: `scheduler/` directory
|
|
18
|
+
- Issue: Interface or implementation mismatches
|
|
19
|
+
- Status: Not yet addressed
|
|
20
|
+
|
|
21
|
+
### 2. GraphQL Builders (Priority: Medium)
|
|
22
|
+
- Location: `gql/builders/` directory
|
|
23
|
+
- Issue: Schema generation type issues
|
|
24
|
+
- Status: Not yet addressed
|
|
25
|
+
|
|
26
|
+
### 3. Test Access to Private Members (Priority: Low)
|
|
27
|
+
- Location: Various test files
|
|
28
|
+
- Issue: Tests accessing private class members
|
|
29
|
+
- Status: Not yet addressed
|
|
30
|
+
- Note: These are test-specific and don't affect production code
|
|
31
|
+
|
|
32
|
+
## Strategy for Further Reduction
|
|
33
|
+
|
|
34
|
+
1. **Next Target**: SchedulerManager errors (highest priority)
|
|
35
|
+
2. **Approach**: Similar to cache refactoring - identify interface, ensure implementations match
|
|
36
|
+
3. **Goal**: Reduce to <50 errors by addressing scheduler issues
|
|
37
|
+
4. **Long-term**: Aim for zero compilation errors
|
|
38
|
+
|
|
39
|
+
## Metrics
|
|
40
|
+
|
|
41
|
+
| Date | Error Count | Category Resolved | Notes |
|
|
42
|
+
|------|-------------|-------------------|-------|
|
|
43
|
+
| 2026-02-05 | 69 | Import Resolution | Converted 37 bare imports to relative paths across 18 files |
|
|
44
|
+
| 2026-01-24 | 69 | Cache System | Standardized CacheProvider interface |
|
|
45
|
+
| Prior | 100+ | - | Baseline before cache refactoring |
|
|
46
|
+
|
|
47
|
+
## Best Practices Established
|
|
48
|
+
|
|
49
|
+
1. Define clear interfaces before implementations
|
|
50
|
+
2. Use `import type` for type-only imports
|
|
51
|
+
3. Keep wrapper classes in sync with base interfaces
|
|
52
|
+
4. Add explicit type parameters in tests for type safety
|
|
53
|
+
5. Document interface contracts in code and memories
|
|
54
|
+
6. Always use relative imports - bare imports relying on baseUrl break consumer typechecking
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# list of languages for which language servers are started; choose from:
|
|
2
|
+
# al bash clojure cpp csharp
|
|
3
|
+
# csharp_omnisharp dart elixir elm erlang
|
|
4
|
+
# fortran fsharp go groovy haskell
|
|
5
|
+
# java julia kotlin lua markdown
|
|
6
|
+
# matlab nix pascal perl php
|
|
7
|
+
# powershell python python_jedi r rego
|
|
8
|
+
# ruby ruby_solargraph rust scala swift
|
|
9
|
+
# terraform toml typescript typescript_vts vue
|
|
10
|
+
# yaml zig
|
|
11
|
+
# (This list may be outdated. For the current list, see values of Language enum here:
|
|
12
|
+
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
|
|
13
|
+
# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
|
|
14
|
+
# Note:
|
|
15
|
+
# - For C, use cpp
|
|
16
|
+
# - For JavaScript, use typescript
|
|
17
|
+
# - For Free Pascal/Lazarus, use pascal
|
|
18
|
+
# Special requirements:
|
|
19
|
+
# - csharp: Requires the presence of a .sln file in the project folder.
|
|
20
|
+
# - pascal: Requires Free Pascal Compiler (fpc) and optionally Lazarus.
|
|
21
|
+
# When using multiple languages, the first language server that supports a given file will be used for that file.
|
|
22
|
+
# The first language is the default language and the respective language server will be used as a fallback.
|
|
23
|
+
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
|
|
24
|
+
languages:
|
|
25
|
+
- typescript
|
|
26
|
+
|
|
27
|
+
# the encoding used by text files in the project
|
|
28
|
+
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
|
|
29
|
+
encoding: "utf-8"
|
|
30
|
+
|
|
31
|
+
# whether to use project's .gitignore files to ignore files
|
|
32
|
+
ignore_all_files_in_gitignore: true
|
|
33
|
+
|
|
34
|
+
# list of additional paths to ignore in all projects
|
|
35
|
+
# same syntax as gitignore, so you can use * and **
|
|
36
|
+
ignored_paths: []
|
|
37
|
+
|
|
38
|
+
# whether the project is in read-only mode
|
|
39
|
+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
|
40
|
+
# Added on 2025-04-18
|
|
41
|
+
read_only: false
|
|
42
|
+
|
|
43
|
+
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
|
44
|
+
# Below is the complete list of tools for convenience.
|
|
45
|
+
# To make sure you have the latest list of tools, and to view their descriptions,
|
|
46
|
+
# execute `uv run scripts/print_tool_overview.py`.
|
|
47
|
+
#
|
|
48
|
+
# * `activate_project`: Activates a project by name.
|
|
49
|
+
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
|
|
50
|
+
# * `create_text_file`: Creates/overwrites a file in the project directory.
|
|
51
|
+
# * `delete_lines`: Deletes a range of lines within a file.
|
|
52
|
+
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
|
|
53
|
+
# * `execute_shell_command`: Executes a shell command.
|
|
54
|
+
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
|
|
55
|
+
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
|
|
56
|
+
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
|
|
57
|
+
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
|
|
58
|
+
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
|
|
59
|
+
# * `initial_instructions`: Gets the initial instructions for the current project.
|
|
60
|
+
# Should only be used in settings where the system prompt cannot be set,
|
|
61
|
+
# e.g. in clients you have no control over, like Claude Desktop.
|
|
62
|
+
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
|
|
63
|
+
# * `insert_at_line`: Inserts content at a given line in a file.
|
|
64
|
+
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
|
|
65
|
+
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
|
|
66
|
+
# * `list_memories`: Lists memories in Serena's project-specific memory store.
|
|
67
|
+
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
|
|
68
|
+
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
|
|
69
|
+
# * `read_file`: Reads a file within the project directory.
|
|
70
|
+
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
|
|
71
|
+
# * `remove_project`: Removes a project from the Serena configuration.
|
|
72
|
+
# * `replace_lines`: Replaces a range of lines within a file with new content.
|
|
73
|
+
# * `replace_symbol_body`: Replaces the full definition of a symbol.
|
|
74
|
+
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
|
|
75
|
+
# * `search_for_pattern`: Performs a search for a pattern in the project.
|
|
76
|
+
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
|
|
77
|
+
# * `switch_modes`: Activates modes by providing a list of their names
|
|
78
|
+
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
|
|
79
|
+
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
|
|
80
|
+
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
|
|
81
|
+
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
|
82
|
+
excluded_tools: []
|
|
83
|
+
|
|
84
|
+
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
|
85
|
+
# (contrary to the memories, which are loaded on demand).
|
|
86
|
+
initial_prompt: ""
|
|
87
|
+
# the name by which the project can be referenced within Serena
|
|
88
|
+
project_name: "bunsane"
|
|
89
|
+
|
|
90
|
+
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
|
|
91
|
+
included_optional_tools: []
|
|
92
|
+
|
|
93
|
+
# list of mode names to that are always to be included in the set of active modes
|
|
94
|
+
# The full set of modes to be activated is base_modes + default_modes.
|
|
95
|
+
# If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply.
|
|
96
|
+
# Otherwise, this setting overrides the global configuration.
|
|
97
|
+
# Set this to [] to disable base modes for this project.
|
|
98
|
+
# Set this to a list of mode names to always include the respective modes for this project.
|
|
99
|
+
base_modes:
|
|
100
|
+
|
|
101
|
+
# list of mode names that are to be activated by default.
|
|
102
|
+
# The full set of modes to be activated is base_modes + default_modes.
|
|
103
|
+
# If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
|
|
104
|
+
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
|
|
105
|
+
# This setting can, in turn, be overridden by CLI parameters (--mode).
|
|
106
|
+
default_modes:
|
|
107
|
+
|
|
108
|
+
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
|
|
109
|
+
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
|
|
110
|
+
fixed_tools: []
|
|
111
|
+
|
|
112
|
+
# override of the corresponding setting in serena_config.yml, see the documentation there.
|
|
113
|
+
# If null or missing, the value from the global config is used.
|
|
114
|
+
symbol_info_budget:
|
package/TODO.md
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
// CORE FEATURE
|
|
2
|
-
TODO: Custom Component Table with Direct Column instead of jsonb
|
|
3
|
-
TODO: Add GraphQL type registration for Interface, Enum, etc
|
|
4
|
-
|
|
5
|
-
// QOL FEATURE
|
|
6
|
-
TODO: Filesystem
|
|
7
|
-
TODO: Field Constraint
|
|
8
|
-
// TODO: Add OpenAPI Swagger Spec - COMPLETED
|
|
2
|
+
TODO: Custom Component Table with Direct Column instead of jsonb. (Risk: Introduce schema migration)
|