@omaikit/models 0.1.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.
Files changed (42) hide show
  1. package/README.md +29 -0
  2. package/dist/code-generation.d.ts +18 -0
  3. package/dist/code-generation.d.ts.map +1 -0
  4. package/dist/code-generation.js +2 -0
  5. package/dist/code-generation.js.map +1 -0
  6. package/dist/index.d.ts +13 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +13 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/models/index.d.ts +7 -0
  11. package/dist/models/index.d.ts.map +1 -0
  12. package/dist/models/index.js +5 -0
  13. package/dist/models/index.js.map +1 -0
  14. package/dist/patterns.d.ts +8 -0
  15. package/dist/patterns.d.ts.map +1 -0
  16. package/dist/patterns.js +9 -0
  17. package/dist/patterns.js.map +1 -0
  18. package/dist/plan.d.ts +51 -0
  19. package/dist/plan.d.ts.map +1 -0
  20. package/dist/plan.js +2 -0
  21. package/dist/plan.js.map +1 -0
  22. package/dist/project.d.ts +20 -0
  23. package/dist/project.d.ts.map +1 -0
  24. package/dist/project.js +2 -0
  25. package/dist/project.js.map +1 -0
  26. package/dist/review.d.ts +21 -0
  27. package/dist/review.d.ts.map +1 -0
  28. package/dist/review.js +2 -0
  29. package/dist/review.js.map +1 -0
  30. package/dist/test-suite.d.ts +23 -0
  31. package/dist/test-suite.d.ts.map +1 -0
  32. package/dist/test-suite.js +2 -0
  33. package/dist/test-suite.js.map +1 -0
  34. package/dist/types/index.d.ts +8 -0
  35. package/dist/types/index.d.ts.map +1 -0
  36. package/dist/types/index.js +5 -0
  37. package/dist/types/index.js.map +1 -0
  38. package/dist/validators/index.d.ts +897 -0
  39. package/dist/validators/index.d.ts.map +1 -0
  40. package/dist/validators/index.js +121 -0
  41. package/dist/validators/index.js.map +1 -0
  42. package/package.json +30 -0
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ ## @omaikit/models
2
+
3
+ Shared data models and validators for Omaikit. These types define plans, tasks, code generation outputs, tests, and reviews.
4
+
5
+ ### Exports
6
+
7
+ - `Plan`, `Task`, `Milestone`
8
+ - `CodeGeneration`, `CodeFile`
9
+ - `TestSuite`, `TestFile`
10
+ - `CodeReview`, `ReviewFinding`
11
+ - Zod validators in `src/validators`
12
+
13
+ ### Example
14
+
15
+ ```ts
16
+ import type { Plan } from '@omaikit/models';
17
+
18
+ const plan: Plan = {
19
+ id: 'P-0',
20
+ title: 'Example',
21
+ description: 'Demo plan',
22
+ milestones: [],
23
+ };
24
+ ```
25
+
26
+ ### Notes
27
+
28
+ - Validation schemas live in packages/models/src/validators.
29
+ - Type declarations are consolidated at the repo root in types.d.ts for local development.
@@ -0,0 +1,18 @@
1
+ export interface CodeFile {
2
+ path: string;
3
+ language: string;
4
+ content: string;
5
+ dependencies?: string[];
6
+ }
7
+ export interface CodeGeneration {
8
+ id: string;
9
+ taskId: string;
10
+ prompt: string;
11
+ files: CodeFile[];
12
+ metadata?: {
13
+ model?: string;
14
+ tokensUsed?: number;
15
+ generatedAt?: string;
16
+ };
17
+ }
18
+ //# sourceMappingURL=code-generation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-generation.d.ts","sourceRoot":"","sources":["../src/code-generation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=code-generation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-generation.js","sourceRoot":"","sources":["../src/code-generation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Core data models and types for Omaikit
3
+ */
4
+ export * from './types/index.js';
5
+ export * from './models/index.js';
6
+ export * from './plan.js';
7
+ export * from './code-generation.js';
8
+ export * from './test-suite.js';
9
+ export * from './review.js';
10
+ export * from './project.js';
11
+ export * from './patterns.js';
12
+ export * from './validators/index.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Core data models and types for Omaikit
3
+ */
4
+ export * from './types/index.js';
5
+ export * from './models/index.js';
6
+ export * from './plan.js';
7
+ export * from './code-generation.js';
8
+ export * from './test-suite.js';
9
+ export * from './review.js';
10
+ export * from './project.js';
11
+ export * from './patterns.js';
12
+ export * from './validators/index.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Data model implementations
3
+ */
4
+ export interface Model {
5
+ id: string;
6
+ }
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Data model implementations
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,8 @@
1
+ export interface CodePattern {
2
+ id: string;
3
+ description: string;
4
+ regex: string;
5
+ severity?: 'info' | 'warn' | 'error';
6
+ }
7
+ export declare const DEFAULT_PATTERNS: CodePattern[];
8
+ //# sourceMappingURL=patterns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../src/patterns.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACtC;AAED,eAAO,MAAM,gBAAgB,EAAE,WAAW,EAOzC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export const DEFAULT_PATTERNS = [
2
+ {
3
+ id: 'TODO_COMMENT',
4
+ description: 'Find TODO comments left in code',
5
+ regex: '\\/\\/\\s*TODO',
6
+ severity: 'info',
7
+ },
8
+ ];
9
+ //# sourceMappingURL=patterns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.js","sourceRoot":"","sources":["../src/patterns.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,gBAAgB,GAAkB;IAC7C;QACE,EAAE,EAAE,cAAc;QAClB,WAAW,EAAE,iCAAiC;QAC9C,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC"}
package/dist/plan.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ export interface RiskFactor {
2
+ description: string;
3
+ likelihood: 'low' | 'medium' | 'high';
4
+ impact: 'low' | 'medium' | 'high';
5
+ mitigation: string;
6
+ }
7
+ export interface Task {
8
+ id: string;
9
+ title: string;
10
+ description: string;
11
+ type: 'feature' | 'refactor' | 'bugfix' | 'test' | 'documentation' | 'infrastructure';
12
+ estimatedEffort: number;
13
+ effortBreakdown?: {
14
+ analysis: number;
15
+ implementation: number;
16
+ testing: number;
17
+ documentation: number;
18
+ };
19
+ acceptanceCriteria: string[];
20
+ inputDependencies: string[];
21
+ outputDependencies: string[];
22
+ targetModule?: string;
23
+ affectedModules: string[];
24
+ suggestedApproach?: string;
25
+ technicalNotes?: string;
26
+ riskFactors?: RiskFactor[];
27
+ status: 'planned' | 'in-progress' | 'blocked' | 'completed' | 'deferred';
28
+ blockers?: string[];
29
+ }
30
+ export interface Milestone {
31
+ id: string;
32
+ title: string;
33
+ description: string;
34
+ duration: number;
35
+ tasks: Task[];
36
+ successCriteria: string[];
37
+ }
38
+ export interface Plan {
39
+ id: string;
40
+ title: string;
41
+ description: string;
42
+ milestones: Milestone[];
43
+ clarifications?: string[];
44
+ projectContext?: any;
45
+ }
46
+ export interface PlanInput {
47
+ description: string;
48
+ projectType?: 'backend' | 'frontend' | 'fullstack' | 'mobile' | 'monorepo' | 'tool' | 'web';
49
+ techStack?: string[];
50
+ }
51
+ //# sourceMappingURL=plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan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ACd,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC;IAC5F,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB"}
package/dist/plan.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.js","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ export interface Module {
2
+ name: string;
3
+ path: string;
4
+ language?: string;
5
+ dependencies?: string[];
6
+ }
7
+ export interface DependencyGraph {
8
+ modules: Record<string, Module>;
9
+ edges: Array<{
10
+ from: string;
11
+ to: string;
12
+ }>;
13
+ }
14
+ export interface Project {
15
+ name: string;
16
+ root: string;
17
+ modules: Module[];
18
+ dependencyGraph?: DependencyGraph;
19
+ }
20
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ export interface ReviewFinding {
2
+ id: string;
3
+ severity: 'info' | 'warn' | 'error';
4
+ code: string;
5
+ message: string;
6
+ line?: number;
7
+ suggestion?: string;
8
+ }
9
+ export interface CodeReview {
10
+ id: string;
11
+ taskId: string;
12
+ codeId: string;
13
+ findings: ReviewFinding[];
14
+ score: number;
15
+ approved: boolean;
16
+ metadata?: {
17
+ reviewedAt?: string;
18
+ model?: string;
19
+ };
20
+ }
21
+ //# sourceMappingURL=review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../src/review.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
package/dist/review.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.js","sourceRoot":"","sources":["../src/review.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ export interface TestCase {
2
+ name: string;
3
+ description?: string;
4
+ type: 'unit' | 'integration' | 'e2e';
5
+ }
6
+ export interface TestFile {
7
+ path: string;
8
+ language: string;
9
+ framework: string;
10
+ testCases: TestCase[];
11
+ content: string;
12
+ }
13
+ export interface TestSuite {
14
+ id: string;
15
+ taskId: string;
16
+ files: TestFile[];
17
+ coverage?: number;
18
+ metadata?: {
19
+ generatedAt?: string;
20
+ model?: string;
21
+ };
22
+ }
23
+ //# sourceMappingURL=test-suite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-suite.d.ts","sourceRoot":"","sources":["../src/test-suite.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,CAAC;CACtC;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE;QACT,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=test-suite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-suite.js","sourceRoot":"","sources":["../src/test-suite.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Type definitions for Omaikit models
3
+ */
4
+ export interface ProjectMetadata {
5
+ name: string;
6
+ version: string;
7
+ }
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Type definitions for Omaikit models
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG"}