pikakit 3.0.4 → 3.7.1

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 (94) hide show
  1. package/README.md +1 -1
  2. package/bin/lib/commands/install.js +97 -242
  3. package/package.json +2 -3
  4. package/lib/agent-cli/bin/agent.js +0 -187
  5. package/lib/agent-cli/dashboard/dashboard_server.js +0 -312
  6. package/lib/agent-cli/lib/audit.js +0 -154
  7. package/lib/agent-cli/lib/audit.test.js +0 -100
  8. package/lib/agent-cli/lib/auto-learn.js +0 -319
  9. package/lib/agent-cli/lib/backup.js +0 -138
  10. package/lib/agent-cli/lib/backup.test.js +0 -78
  11. package/lib/agent-cli/lib/cognitive-lesson.js +0 -476
  12. package/lib/agent-cli/lib/completion.js +0 -149
  13. package/lib/agent-cli/lib/config.js +0 -35
  14. package/lib/agent-cli/lib/eslint-fix.js +0 -238
  15. package/lib/agent-cli/lib/evolution-signal.js +0 -215
  16. package/lib/agent-cli/lib/export.js +0 -86
  17. package/lib/agent-cli/lib/export.test.js +0 -65
  18. package/lib/agent-cli/lib/fix.js +0 -337
  19. package/lib/agent-cli/lib/fix.test.js +0 -80
  20. package/lib/agent-cli/lib/gemini-export.js +0 -83
  21. package/lib/agent-cli/lib/generate-registry.js +0 -42
  22. package/lib/agent-cli/lib/hooks/install-hooks.js +0 -152
  23. package/lib/agent-cli/lib/hooks/lint-learn.js +0 -172
  24. package/lib/agent-cli/lib/icons.js +0 -93
  25. package/lib/agent-cli/lib/ignore.js +0 -116
  26. package/lib/agent-cli/lib/ignore.test.js +0 -58
  27. package/lib/agent-cli/lib/init.js +0 -124
  28. package/lib/agent-cli/lib/knowledge-index.js +0 -326
  29. package/lib/agent-cli/lib/knowledge-metrics.js +0 -335
  30. package/lib/agent-cli/lib/knowledge-retention.js +0 -398
  31. package/lib/agent-cli/lib/knowledge-validator.js +0 -312
  32. package/lib/agent-cli/lib/learn.js +0 -255
  33. package/lib/agent-cli/lib/learn.test.js +0 -70
  34. package/lib/agent-cli/lib/proposals.js +0 -199
  35. package/lib/agent-cli/lib/proposals.test.js +0 -56
  36. package/lib/agent-cli/lib/recall.js +0 -835
  37. package/lib/agent-cli/lib/recall.test.js +0 -107
  38. package/lib/agent-cli/lib/selfevolution-bridge.js +0 -167
  39. package/lib/agent-cli/lib/settings.js +0 -203
  40. package/lib/agent-cli/lib/skill-learn.js +0 -296
  41. package/lib/agent-cli/lib/stats.js +0 -132
  42. package/lib/agent-cli/lib/stats.test.js +0 -94
  43. package/lib/agent-cli/lib/types.js +0 -33
  44. package/lib/agent-cli/lib/ui/audit-ui.js +0 -146
  45. package/lib/agent-cli/lib/ui/backup-ui.js +0 -107
  46. package/lib/agent-cli/lib/ui/clack-helpers.js +0 -317
  47. package/lib/agent-cli/lib/ui/common.js +0 -83
  48. package/lib/agent-cli/lib/ui/completion-ui.js +0 -126
  49. package/lib/agent-cli/lib/ui/custom-select.js +0 -69
  50. package/lib/agent-cli/lib/ui/dashboard-ui.js +0 -222
  51. package/lib/agent-cli/lib/ui/evolution-signals-ui.js +0 -107
  52. package/lib/agent-cli/lib/ui/export-ui.js +0 -94
  53. package/lib/agent-cli/lib/ui/fix-all-ui.js +0 -191
  54. package/lib/agent-cli/lib/ui/help-ui.js +0 -49
  55. package/lib/agent-cli/lib/ui/index.js +0 -199
  56. package/lib/agent-cli/lib/ui/init-ui.js +0 -56
  57. package/lib/agent-cli/lib/ui/knowledge-ui.js +0 -55
  58. package/lib/agent-cli/lib/ui/learn-ui.js +0 -706
  59. package/lib/agent-cli/lib/ui/lessons-ui.js +0 -148
  60. package/lib/agent-cli/lib/ui/pretty.js +0 -145
  61. package/lib/agent-cli/lib/ui/proposals-ui.js +0 -99
  62. package/lib/agent-cli/lib/ui/recall-ui.js +0 -342
  63. package/lib/agent-cli/lib/ui/routing-demo.js +0 -79
  64. package/lib/agent-cli/lib/ui/routing-ui.js +0 -325
  65. package/lib/agent-cli/lib/ui/settings-ui.js +0 -381
  66. package/lib/agent-cli/lib/ui/stats-ui.js +0 -123
  67. package/lib/agent-cli/lib/ui/watch-ui.js +0 -236
  68. package/lib/agent-cli/lib/watcher.js +0 -181
  69. package/lib/agent-cli/lib/watcher.test.js +0 -85
  70. package/lib/agent-cli/src/MIGRATION.md +0 -418
  71. package/lib/agent-cli/src/README.md +0 -367
  72. package/lib/agent-cli/src/core/evolution/evolution-signal.js +0 -42
  73. package/lib/agent-cli/src/core/evolution/index.js +0 -17
  74. package/lib/agent-cli/src/core/evolution/review-gate.js +0 -40
  75. package/lib/agent-cli/src/core/evolution/signal-detector.js +0 -137
  76. package/lib/agent-cli/src/core/evolution/signal-queue.js +0 -79
  77. package/lib/agent-cli/src/core/evolution/threshold-checker.js +0 -79
  78. package/lib/agent-cli/src/core/index.js +0 -15
  79. package/lib/agent-cli/src/core/learning/cognitive-enhancer.js +0 -282
  80. package/lib/agent-cli/src/core/learning/index.js +0 -12
  81. package/lib/agent-cli/src/core/learning/lesson-synthesizer.js +0 -83
  82. package/lib/agent-cli/src/core/scanning/index.js +0 -14
  83. package/lib/agent-cli/src/data/index.js +0 -13
  84. package/lib/agent-cli/src/data/repositories/index.js +0 -8
  85. package/lib/agent-cli/src/data/repositories/lesson-repository.js +0 -130
  86. package/lib/agent-cli/src/data/repositories/signal-repository.js +0 -119
  87. package/lib/agent-cli/src/data/storage/index.js +0 -8
  88. package/lib/agent-cli/src/data/storage/json-storage.js +0 -64
  89. package/lib/agent-cli/src/data/storage/yaml-storage.js +0 -66
  90. package/lib/agent-cli/src/infrastructure/index.js +0 -13
  91. package/lib/agent-cli/src/presentation/formatters/skill-formatter.js +0 -232
  92. package/lib/agent-cli/src/services/export-service.js +0 -162
  93. package/lib/agent-cli/src/services/index.js +0 -13
  94. package/lib/agent-cli/src/services/learning-service.js +0 -99
@@ -1,99 +0,0 @@
1
- /**
2
- * LearningService - Application Service
3
- *
4
- * Orchestrates learning workflow:
5
- * - Load raw data (mistakes, improvements)
6
- * - Synthesize cognitive lessons
7
- * - Manage lesson CRUD operations
8
- */
9
-
10
- import { LessonSynthesizer } from '../core/learning/lesson-synthesizer.js';
11
-
12
- export class LearningService {
13
- constructor(lessonRepository) {
14
- this.lessonRepository = lessonRepository;
15
- }
16
-
17
- /**
18
- * Get all cognitive lessons
19
- * @returns {Promise<Array>}
20
- */
21
- async getCognitiveLessons() {
22
- const mistakesDb = await this.lessonRepository.loadMistakes();
23
- const improvementsDb = await this.lessonRepository.loadImprovements();
24
-
25
- return LessonSynthesizer.synthesize(
26
- mistakesDb.mistakes || [],
27
- improvementsDb.improvements || []
28
- );
29
- }
30
-
31
- /**
32
- * Add a lesson to legacy format
33
- * @param {string} pattern - Regex pattern
34
- * @param {string} message - Explanation message
35
- * @param {string} severity - WARNING or ERROR
36
- * @param {string} category - Category tag
37
- * @returns {Promise<object>}
38
- */
39
- async addLesson(pattern, message, severity = 'WARNING', category = 'general') {
40
- // Validate Regex
41
- try {
42
- new RegExp(pattern);
43
- } catch (e) {
44
- throw new Error(`Invalid Regex pattern: ${e.message}`);
45
- }
46
-
47
- // Validate severity
48
- if (!['WARNING', 'ERROR'].includes(severity.toUpperCase())) {
49
- throw new Error('Invalid severity. Must be WARNING or ERROR');
50
- }
51
-
52
- // Check for duplicates
53
- const db = await this.lessonRepository.loadLegacyLessons();
54
- const exists = db.lessons.some(l => l.pattern === pattern);
55
-
56
- if (exists) {
57
- throw new Error('Pattern already exists in knowledge base');
58
- }
59
-
60
- const id = `LEARN-${String(db.lessons.length + 1).padStart(3, '0')}`;
61
-
62
- const lesson = {
63
- id,
64
- pattern,
65
- message,
66
- severity: severity.toUpperCase(),
67
- category,
68
- source: 'manual',
69
- hitCount: 0,
70
- lastHit: null,
71
- autoEscalated: false,
72
- addedAt: new Date().toISOString()
73
- };
74
-
75
- return this.lessonRepository.addLegacyLesson(lesson);
76
- }
77
-
78
- /**
79
- * Remove a lesson
80
- * @param {string} lessonId
81
- */
82
- async removeLesson(lessonId) {
83
- return this.lessonRepository.removeLegacyLesson(lessonId);
84
- }
85
-
86
- /**
87
- * List all lessons
88
- * @param {string} category - Optional category filter
89
- */
90
- async listLessons(category = null) {
91
- const db = await this.lessonRepository.loadLegacyLessons();
92
-
93
- if (category) {
94
- return db.lessons.filter(l => l.category === category);
95
- }
96
-
97
- return db.lessons;
98
- }
99
- }