gthinking 1.2.0 → 1.3.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 (72) hide show
  1. package/README.md +10 -0
  2. package/dist/engine.d.ts +15 -1
  3. package/dist/engine.d.ts.map +1 -1
  4. package/dist/engine.js +53 -12
  5. package/dist/engine.js.map +1 -1
  6. package/dist/llm-service.d.ts +1 -0
  7. package/dist/llm-service.d.ts.map +1 -1
  8. package/dist/llm-service.js +34 -16
  9. package/dist/llm-service.js.map +1 -1
  10. package/dist/planning.d.ts +5 -1
  11. package/dist/planning.d.ts.map +1 -1
  12. package/dist/planning.js +62 -0
  13. package/dist/planning.js.map +1 -1
  14. package/dist/types/analysis.d.ts +54 -0
  15. package/dist/types/analysis.d.ts.map +1 -0
  16. package/dist/types/analysis.js +3 -0
  17. package/dist/types/analysis.js.map +1 -0
  18. package/dist/types/core.d.ts +66 -0
  19. package/dist/types/core.d.ts.map +1 -0
  20. package/dist/types/core.js +61 -0
  21. package/dist/types/core.js.map +1 -0
  22. package/dist/types/creativity.d.ts +58 -0
  23. package/dist/types/creativity.d.ts.map +1 -0
  24. package/dist/types/creativity.js +3 -0
  25. package/dist/types/creativity.js.map +1 -0
  26. package/dist/types/engine.d.ts +55 -0
  27. package/dist/types/engine.d.ts.map +1 -0
  28. package/dist/types/engine.js +3 -0
  29. package/dist/types/engine.js.map +1 -0
  30. package/dist/types/index.d.ts +10 -0
  31. package/dist/types/index.d.ts.map +1 -0
  32. package/dist/types/index.js +26 -0
  33. package/dist/types/index.js.map +1 -0
  34. package/dist/types/learning.d.ts +62 -0
  35. package/dist/types/learning.d.ts.map +1 -0
  36. package/dist/types/learning.js +3 -0
  37. package/dist/types/learning.js.map +1 -0
  38. package/dist/types/planning.d.ts +78 -0
  39. package/dist/types/planning.d.ts.map +1 -0
  40. package/dist/types/planning.js +3 -0
  41. package/dist/types/planning.js.map +1 -0
  42. package/dist/types/reasoning.d.ts +83 -0
  43. package/dist/types/reasoning.d.ts.map +1 -0
  44. package/dist/types/reasoning.js +13 -0
  45. package/dist/types/reasoning.js.map +1 -0
  46. package/dist/types/search.d.ts +56 -0
  47. package/dist/types/search.d.ts.map +1 -0
  48. package/dist/types/search.js +3 -0
  49. package/dist/types/search.js.map +1 -0
  50. package/dist/types/synthesis.d.ts +40 -0
  51. package/dist/types/synthesis.d.ts.map +1 -0
  52. package/dist/types/synthesis.js +3 -0
  53. package/dist/types/synthesis.js.map +1 -0
  54. package/dist/types.d.ts +1 -530
  55. package/dist/types.d.ts.map +1 -1
  56. package/dist/types.js +15 -70
  57. package/dist/types.js.map +1 -1
  58. package/engine.ts +85 -9
  59. package/llm-service.ts +39 -18
  60. package/package.json +1 -1
  61. package/planning.ts +73 -0
  62. package/types/analysis.ts +69 -0
  63. package/types/core.ts +90 -0
  64. package/types/creativity.ts +72 -0
  65. package/types/engine.ts +60 -0
  66. package/types/index.ts +9 -0
  67. package/types/learning.ts +69 -0
  68. package/types/planning.ts +85 -0
  69. package/types/reasoning.ts +92 -0
  70. package/types/search.ts +58 -0
  71. package/types/synthesis.ts +43 -0
  72. package/types.ts +1 -669
@@ -0,0 +1,85 @@
1
+ import { TaskStatus, Priority } from './core';
2
+
3
+ export interface Plan {
4
+ id: string;
5
+ goal: string;
6
+ tasks: Task[];
7
+ milestones: Milestone[];
8
+ resources: Resource[];
9
+ timeline: Timeline;
10
+ status: TaskStatus;
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ }
14
+
15
+ export interface Task {
16
+ id: string;
17
+ title: string;
18
+ description: string;
19
+ priority: Priority;
20
+ status: TaskStatus;
21
+ estimatedDuration: number;
22
+ actualDuration?: number;
23
+ dependencies: string[];
24
+ subtasks: string[];
25
+ assignedTo?: string;
26
+ tags: string[];
27
+ startTime?: Date;
28
+ endTime?: Date;
29
+ }
30
+
31
+ export interface Milestone {
32
+ id: string;
33
+ title: string;
34
+ description: string;
35
+ criteria: string[];
36
+ deadline?: Date;
37
+ completedAt?: Date;
38
+ status: TaskStatus;
39
+ }
40
+
41
+ export interface Resource {
42
+ id: string;
43
+ type: 'human' | 'tool' | 'data' | 'time' | 'budget';
44
+ name: string;
45
+ availability: number;
46
+ cost?: number;
47
+ skills?: string[];
48
+ }
49
+
50
+ export interface Timeline {
51
+ startDate: Date;
52
+ endDate?: Date;
53
+ phases: Phase[];
54
+ criticalPath: string[];
55
+ buffer: number;
56
+ }
57
+
58
+ export interface Phase {
59
+ id: string;
60
+ name: string;
61
+ startDate: Date;
62
+ endDate: Date;
63
+ tasks: string[];
64
+ dependencies: string[];
65
+ }
66
+
67
+ export interface ProgressReport {
68
+ planId: string;
69
+ timestamp: Date;
70
+ overallProgress: number;
71
+ completedTasks: number;
72
+ totalTasks: number;
73
+ onTrack: boolean;
74
+ risks: Risk[];
75
+ nextActions: string[];
76
+ }
77
+
78
+ export interface Risk {
79
+ id: string;
80
+ description: string;
81
+ probability: number;
82
+ impact: number;
83
+ mitigation: string;
84
+ status: 'identified' | 'mitigating' | 'resolved' | 'occurred';
85
+ }
@@ -0,0 +1,92 @@
1
+ import { TaskStatus } from './core';
2
+ import { Evidence } from './analysis';
3
+
4
+ export enum ReasoningType {
5
+ DEDUCTIVE = 'deductive',
6
+ INDUCTIVE = 'inductive',
7
+ ABDUCTIVE = 'abductive',
8
+ ANALOGICAL = 'analogical',
9
+ CAUSAL = 'causal',
10
+ COUNTERFACTUAL = 'counterfactual'
11
+ }
12
+
13
+ export interface ReasoningSession {
14
+ id: string;
15
+ problem: string;
16
+ type: ReasoningType;
17
+ steps: ReasoningStep[];
18
+ conclusion?: string;
19
+ confidence: number;
20
+ startTime: Date;
21
+ endTime?: Date;
22
+ }
23
+
24
+ export interface ReasoningStep {
25
+ id: string;
26
+ stepNumber: number;
27
+ premise: string;
28
+ inference: string;
29
+ evidence: Evidence[];
30
+ assumptions: string[];
31
+ confidence: number;
32
+ nextSteps: string[];
33
+ }
34
+
35
+ export interface Hypothesis {
36
+ id: string;
37
+ statement: string;
38
+ supportingEvidence: Evidence[];
39
+ contradictingEvidence: Evidence[];
40
+ tests: HypothesisTest[];
41
+ status: 'proposed' | 'testing' | 'confirmed' | 'rejected';
42
+ confidence: number;
43
+ }
44
+
45
+ export interface HypothesisTest {
46
+ id: string;
47
+ description: string;
48
+ expectedOutcome: string;
49
+ actualOutcome?: string;
50
+ passed?: boolean;
51
+ }
52
+
53
+ export interface ChainOfThought {
54
+ id: string;
55
+ initialQuestion: string;
56
+ thoughts: ThoughtNode[];
57
+ finalAnswer?: string;
58
+ completeness: number;
59
+ }
60
+
61
+ export interface ThoughtNode {
62
+ id: string;
63
+ content: string;
64
+ parentId?: string;
65
+ children: string[];
66
+ depth: number;
67
+ confidence: number;
68
+ type: 'question' | 'observation' | 'inference' | 'conclusion';
69
+ }
70
+
71
+ export interface ProblemDecomposition {
72
+ id: string;
73
+ originalProblem: string;
74
+ subProblems: SubProblem[];
75
+ dependencies: Dependency[];
76
+ solutionStrategy: string;
77
+ }
78
+
79
+ export interface SubProblem {
80
+ id: string;
81
+ description: string;
82
+ difficulty: number;
83
+ estimatedTime: number;
84
+ prerequisites: string[];
85
+ status: TaskStatus;
86
+ }
87
+
88
+ export interface Dependency {
89
+ from: string;
90
+ to: string;
91
+ type: 'requires' | 'enables' | 'conflicts';
92
+ }
@@ -0,0 +1,58 @@
1
+ import { SourceType } from './core';
2
+
3
+ export interface SearchQuery {
4
+ id: string;
5
+ query: string;
6
+ sources: SourceType[];
7
+ filters: SearchFilters;
8
+ maxResults: number;
9
+ timeout: number;
10
+ timestamp: Date;
11
+ }
12
+
13
+ export interface SearchFilters {
14
+ dateRange?: { start: Date; end: Date };
15
+ domains?: string[];
16
+ excludeDomains?: string[];
17
+ language?: string;
18
+ contentType?: ('article' | 'video' | 'image' | 'pdf' | 'forum')[];
19
+ minCredibility?: number;
20
+ }
21
+
22
+ export interface SearchResult {
23
+ id: string;
24
+ title: string;
25
+ url: string;
26
+ snippet: string;
27
+ source: SourceType;
28
+ credibility: number;
29
+ relevance: number;
30
+ timestamp: Date;
31
+ metadata: ResultMetadata;
32
+ }
33
+
34
+ export interface ResultMetadata {
35
+ author?: string;
36
+ publishDate?: Date;
37
+ wordCount?: number;
38
+ readingTime?: number;
39
+ relatedTopics?: string[];
40
+ citations?: number;
41
+ }
42
+
43
+ export interface SearchSession {
44
+ id: string;
45
+ queries: SearchQuery[];
46
+ results: SearchResult[];
47
+ aggregatedResults: AggregatedResult[];
48
+ startTime: Date;
49
+ endTime?: Date;
50
+ }
51
+
52
+ export interface AggregatedResult {
53
+ topic: string;
54
+ results: SearchResult[];
55
+ consensusScore: number;
56
+ conflictingInfo: boolean;
57
+ keyInsights: string[];
58
+ }
@@ -0,0 +1,43 @@
1
+ import { Priority } from './core';
2
+
3
+ export interface SynthesisResult {
4
+ id: string;
5
+ sources: string[];
6
+ summary: string;
7
+ keyInsights: string[];
8
+ recommendations: Recommendation[];
9
+ confidence: number;
10
+ gaps: string[];
11
+ uncertainties: string[];
12
+ critique?: string;
13
+ }
14
+
15
+ export interface Recommendation {
16
+ id: string;
17
+ action: string;
18
+ rationale: string;
19
+ priority: Priority;
20
+ expectedOutcome: string;
21
+ risks: string[];
22
+ confidence: number;
23
+ }
24
+
25
+ export interface EvaluationResult {
26
+ id: string;
27
+ target: string;
28
+ criteria: EvaluationCriteria[];
29
+ scores: Record<string, number>;
30
+ overallScore: number;
31
+ strengths: string[];
32
+ weaknesses: string[];
33
+ improvements: string[];
34
+ }
35
+
36
+ export interface EvaluationCriteria {
37
+ id: string;
38
+ name: string;
39
+ weight: number;
40
+ description: string;
41
+ minScore: number;
42
+ maxScore: number;
43
+ }