@cleocode/core 2026.3.45 → 2026.3.46

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 (137) hide show
  1. package/dist/bootstrap.d.ts.map +1 -1
  2. package/dist/index.js +1475 -372
  3. package/dist/index.js.map +4 -4
  4. package/dist/init.d.ts.map +1 -1
  5. package/dist/injection.d.ts +1 -1
  6. package/dist/injection.d.ts.map +1 -1
  7. package/dist/routing/capability-matrix.d.ts +6 -4
  8. package/dist/routing/capability-matrix.d.ts.map +1 -1
  9. package/dist/scaffold.d.ts +16 -9
  10. package/dist/scaffold.d.ts.map +1 -1
  11. package/dist/skills/agents/install.d.ts.map +1 -1
  12. package/dist/skills/routing-table.d.ts +17 -16
  13. package/dist/skills/routing-table.d.ts.map +1 -1
  14. package/dist/skills/skill-paths.d.ts.map +1 -1
  15. package/dist/system/health.d.ts.map +1 -1
  16. package/dist/ui/index.d.ts +0 -1
  17. package/dist/ui/index.d.ts.map +1 -1
  18. package/package.json +9 -4
  19. package/schemas/adr-frontmatter.schema.json +72 -0
  20. package/schemas/agent-configs.schema.json +120 -0
  21. package/schemas/agent-registry.json +243 -0
  22. package/schemas/agent-registry.schema.json +132 -0
  23. package/schemas/archive/research-manifest.schema.json +257 -0
  24. package/schemas/archive.schema.json +450 -0
  25. package/schemas/brain-decision.schema.json +69 -0
  26. package/schemas/brain-learning.schema.json +57 -0
  27. package/schemas/brain-pattern.schema.json +72 -0
  28. package/schemas/config.schema.json +2606 -0
  29. package/schemas/context-state.schema.json +137 -0
  30. package/schemas/contribution.schema.json +722 -0
  31. package/schemas/critical-path.schema.json +246 -0
  32. package/schemas/deps-cache.schema.json +97 -0
  33. package/schemas/doctor-output.schema.json +283 -0
  34. package/schemas/error.schema.json +161 -0
  35. package/schemas/export-package.schema.json +375 -0
  36. package/schemas/global-config.schema.json +219 -0
  37. package/schemas/grade.schema.json +49 -0
  38. package/schemas/log.schema.json +250 -0
  39. package/schemas/metrics.schema.json +328 -0
  40. package/schemas/migrations.schema.json +150 -0
  41. package/schemas/nexus-registry.schema.json +90 -0
  42. package/schemas/operation-constitution.schema.json +438 -0
  43. package/schemas/output.schema.json +164 -0
  44. package/schemas/project-context.schema.json +164 -0
  45. package/schemas/project-info.schema.json +180 -0
  46. package/schemas/projects-registry.schema.json +107 -0
  47. package/schemas/protocol-frontmatter.schema.json +72 -0
  48. package/schemas/rcasd-consensus-report.schema.json +10 -0
  49. package/schemas/rcasd-evidence.schema.json +42 -0
  50. package/schemas/rcasd-gate-result.schema.json +46 -0
  51. package/schemas/rcasd-hitl-resolution.schema.json +10 -0
  52. package/schemas/rcasd-index.schema.json +10 -0
  53. package/schemas/rcasd-manifest.schema.json +10 -0
  54. package/schemas/rcasd-research-output.schema.json +10 -0
  55. package/schemas/rcasd-spec-frontmatter.schema.json +10 -0
  56. package/schemas/rcasd-stage-transition.schema.json +38 -0
  57. package/schemas/releases.schema.json +267 -0
  58. package/schemas/skills-manifest.schema.json +91 -0
  59. package/schemas/skillsmp.schema.json +208 -0
  60. package/schemas/spec-index.schema.json +196 -0
  61. package/schemas/system-flow-atlas.schema.json +125 -0
  62. package/src/__tests__/injection-chain.test.ts +11 -10
  63. package/src/__tests__/injection-mvi-tiers.test.ts +4 -2
  64. package/src/agents/__tests__/capacity.test.d.ts +7 -0
  65. package/src/agents/__tests__/capacity.test.d.ts.map +1 -0
  66. package/src/agents/__tests__/capacity.test.js +173 -0
  67. package/src/agents/__tests__/capacity.test.js.map +1 -0
  68. package/src/agents/__tests__/registry.test.d.ts +8 -0
  69. package/src/agents/__tests__/registry.test.d.ts.map +1 -0
  70. package/src/agents/__tests__/registry.test.js +348 -0
  71. package/src/agents/__tests__/registry.test.js.map +1 -0
  72. package/src/agents/__tests__/retry.test.d.ts +7 -0
  73. package/src/agents/__tests__/retry.test.d.ts.map +1 -0
  74. package/src/agents/__tests__/retry.test.js +225 -0
  75. package/src/agents/__tests__/retry.test.js.map +1 -0
  76. package/src/bootstrap.ts +3 -1
  77. package/src/init.ts +63 -18
  78. package/src/injection.ts +11 -5
  79. package/src/intelligence/__tests__/impact.test.d.ts +15 -0
  80. package/src/intelligence/__tests__/impact.test.d.ts.map +1 -0
  81. package/src/intelligence/__tests__/impact.test.js +384 -0
  82. package/src/intelligence/__tests__/impact.test.js.map +1 -0
  83. package/src/intelligence/__tests__/patterns.test.d.ts +8 -0
  84. package/src/intelligence/__tests__/patterns.test.d.ts.map +1 -0
  85. package/src/intelligence/__tests__/patterns.test.js +370 -0
  86. package/src/intelligence/__tests__/patterns.test.js.map +1 -0
  87. package/src/intelligence/__tests__/prediction.test.d.ts +8 -0
  88. package/src/intelligence/__tests__/prediction.test.d.ts.map +1 -0
  89. package/src/intelligence/__tests__/prediction.test.js +314 -0
  90. package/src/intelligence/__tests__/prediction.test.js.map +1 -0
  91. package/src/nexus/__tests__/nexus-e2e.test.d.ts +12 -0
  92. package/src/nexus/__tests__/nexus-e2e.test.d.ts.map +1 -0
  93. package/src/nexus/__tests__/nexus-e2e.test.js +1220 -0
  94. package/src/nexus/__tests__/nexus-e2e.test.js.map +1 -0
  95. package/src/nexus/__tests__/transfer.test.d.ts +8 -0
  96. package/src/nexus/__tests__/transfer.test.d.ts.map +1 -0
  97. package/src/nexus/__tests__/transfer.test.js +372 -0
  98. package/src/nexus/__tests__/transfer.test.js.map +1 -0
  99. package/src/nexus/__tests__/transfer.test.ts +1 -1
  100. package/src/routing/capability-matrix.ts +1435 -205
  101. package/src/scaffold.ts +18 -11
  102. package/src/skills/__tests__/routing-table.test.ts +53 -33
  103. package/src/skills/agents/install.ts +9 -1
  104. package/src/skills/routing-table.ts +39 -253
  105. package/src/skills/skill-paths.ts +3 -2
  106. package/src/store/__tests__/project-detect.test.ts +1 -1
  107. package/src/system/health.ts +18 -7
  108. package/src/ui/index.ts +0 -6
  109. package/src/validation/operation-gate-validators.ts +2 -2
  110. package/templates/CLEO-INJECTION.md +120 -0
  111. package/templates/README.md +29 -0
  112. package/templates/agent-registry.json +305 -0
  113. package/templates/cleo-gitignore +74 -0
  114. package/templates/config.template.json +187 -0
  115. package/templates/git-hooks/commit-msg +149 -0
  116. package/templates/git-hooks/pre-commit +40 -0
  117. package/templates/git-hooks/pre-push +79 -0
  118. package/templates/github/ISSUE_TEMPLATE/bug_report.yml +143 -0
  119. package/templates/github/ISSUE_TEMPLATE/config.yml +8 -0
  120. package/templates/github/ISSUE_TEMPLATE/feature_request.yml +125 -0
  121. package/templates/github/ISSUE_TEMPLATE/help_question.yml +99 -0
  122. package/templates/global-config.template.json +56 -0
  123. package/templates/hooks/precompact-safestop.sh +89 -0
  124. package/templates/issue-templates/bug_report.yml +143 -0
  125. package/templates/issue-templates/config.yml +8 -0
  126. package/templates/issue-templates/feature_request.yml +125 -0
  127. package/templates/issue-templates/help_question.yml +99 -0
  128. package/templates/skillsmp.json.example +28 -0
  129. package/templates/skillsmp.json.example.md +214 -0
  130. package/dist/ui/injection-legacy.d.ts +0 -26
  131. package/dist/ui/injection-legacy.d.ts.map +0 -1
  132. package/src/ui/__tests__/injection-registry.test.d.ts +0 -11
  133. package/src/ui/__tests__/injection-registry.test.d.ts.map +0 -1
  134. package/src/ui/__tests__/injection-registry.test.js +0 -46
  135. package/src/ui/__tests__/injection-registry.test.js.map +0 -1
  136. package/src/ui/__tests__/injection-registry.test.ts +0 -57
  137. package/src/ui/injection-legacy.ts +0 -44
@@ -0,0 +1,137 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://cleo-dev.com/schemas/v1/context-state.schema.json",
4
+ "schemaVersion": "1.0.0",
5
+ "title": "CLEO Context State Schema",
6
+ "description": "Real-time context window state from Claude Code status line integration",
7
+ "type": "object",
8
+ "required": ["version", "timestamp", "contextWindow", "status"],
9
+ "additionalProperties": false,
10
+
11
+ "properties": {
12
+ "$schema": {
13
+ "type": "string",
14
+ "description": "JSON Schema reference for validation."
15
+ },
16
+ "version": {
17
+ "type": "string",
18
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
19
+ "description": "Context state schema version."
20
+ },
21
+ "timestamp": {
22
+ "type": "string",
23
+ "format": "date-time",
24
+ "description": "ISO 8601 timestamp when context state was captured."
25
+ },
26
+ "staleAfterMs": {
27
+ "type": "integer",
28
+ "minimum": 1000,
29
+ "default": 5000,
30
+ "description": "Milliseconds after which this context state should be considered stale."
31
+ },
32
+
33
+ "contextWindow": {
34
+ "type": "object",
35
+ "description": "Current context window usage metrics.",
36
+ "required": ["maxTokens", "currentTokens", "percentage"],
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "maxTokens": {
40
+ "type": "integer",
41
+ "minimum": 0,
42
+ "description": "Maximum context window size in tokens."
43
+ },
44
+ "currentTokens": {
45
+ "type": "integer",
46
+ "minimum": 0,
47
+ "description": "Current tokens used in context window."
48
+ },
49
+ "percentage": {
50
+ "type": "integer",
51
+ "minimum": 0,
52
+ "maximum": 100,
53
+ "description": "Percentage of context window used."
54
+ },
55
+ "breakdown": {
56
+ "type": "object",
57
+ "description": "Detailed token usage breakdown.",
58
+ "additionalProperties": false,
59
+ "properties": {
60
+ "inputTokens": {
61
+ "type": "integer",
62
+ "minimum": 0,
63
+ "description": "Input tokens consumed."
64
+ },
65
+ "outputTokens": {
66
+ "type": "integer",
67
+ "minimum": 0,
68
+ "description": "Output tokens generated."
69
+ },
70
+ "cacheCreationTokens": {
71
+ "type": "integer",
72
+ "minimum": 0,
73
+ "description": "Tokens used for cache creation."
74
+ },
75
+ "cacheReadTokens": {
76
+ "type": "integer",
77
+ "minimum": 0,
78
+ "description": "Tokens read from cache."
79
+ }
80
+ }
81
+ }
82
+ }
83
+ },
84
+
85
+ "thresholds": {
86
+ "type": "object",
87
+ "description": "Percentage thresholds for context window alerts.",
88
+ "additionalProperties": false,
89
+ "properties": {
90
+ "warning": {
91
+ "type": "integer",
92
+ "minimum": 0,
93
+ "maximum": 100,
94
+ "default": 70,
95
+ "description": "Warning threshold percentage."
96
+ },
97
+ "caution": {
98
+ "type": "integer",
99
+ "minimum": 0,
100
+ "maximum": 100,
101
+ "default": 85,
102
+ "description": "Caution threshold percentage."
103
+ },
104
+ "critical": {
105
+ "type": "integer",
106
+ "minimum": 0,
107
+ "maximum": 100,
108
+ "default": 90,
109
+ "description": "Critical threshold percentage."
110
+ },
111
+ "emergency": {
112
+ "type": "integer",
113
+ "minimum": 0,
114
+ "maximum": 100,
115
+ "default": 95,
116
+ "description": "Emergency threshold percentage."
117
+ }
118
+ }
119
+ },
120
+
121
+ "status": {
122
+ "type": "string",
123
+ "enum": ["ok", "warning", "caution", "critical", "emergency", "stale", "unknown"],
124
+ "description": "Current context window status level."
125
+ },
126
+
127
+ "claudeSessionId": {
128
+ "type": "string",
129
+ "description": "Claude Code session identifier."
130
+ },
131
+
132
+ "cleoSessionId": {
133
+ "type": "string",
134
+ "description": "CLEO session identifier for correlation."
135
+ }
136
+ }
137
+ }