erosolar-cli 1.7.55 → 1.7.56

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 (273) hide show
  1. package/package.json +1 -1
  2. package/dist/active-stack-security.d.ts +0 -110
  3. package/dist/active-stack-security.js +0 -313
  4. package/dist/active-stack-security.js.map +0 -1
  5. package/dist/advanced-targeting.d.ts +0 -113
  6. package/dist/advanced-targeting.js +0 -252
  7. package/dist/advanced-targeting.js.map +0 -1
  8. package/dist/bin/adapters/node/index.js +0 -33
  9. package/dist/bin/adapters/types.js +0 -1
  10. package/dist/bin/alpha-zero/agentWrapper.js +0 -165
  11. package/dist/bin/alpha-zero/codeEvaluator.js +0 -272
  12. package/dist/bin/alpha-zero/competitiveRunner.js +0 -219
  13. package/dist/bin/alpha-zero/index.js +0 -98
  14. package/dist/bin/alpha-zero/introspection.js +0 -298
  15. package/dist/bin/alpha-zero/metricsTracker.js +0 -207
  16. package/dist/bin/alpha-zero/security/core.js +0 -269
  17. package/dist/bin/alpha-zero/security/google.js +0 -308
  18. package/dist/bin/alpha-zero/security/googleLoader.js +0 -40
  19. package/dist/bin/alpha-zero/security/index.js +0 -31
  20. package/dist/bin/alpha-zero/security/simulation.js +0 -274
  21. package/dist/bin/alpha-zero/selfModification.js +0 -231
  22. package/dist/bin/alpha-zero/types.js +0 -30
  23. package/dist/bin/bin/erosolar-optimized.js +0 -205
  24. package/dist/bin/capabilities/agentSpawningCapability.js +0 -116
  25. package/dist/bin/capabilities/bashCapability.js +0 -22
  26. package/dist/bin/capabilities/cloudCapability.js +0 -36
  27. package/dist/bin/capabilities/codeAnalysisCapability.js +0 -22
  28. package/dist/bin/capabilities/codeQualityCapability.js +0 -23
  29. package/dist/bin/capabilities/dependencySecurityCapability.js +0 -22
  30. package/dist/bin/capabilities/devCapability.js +0 -22
  31. package/dist/bin/capabilities/editCapability.js +0 -28
  32. package/dist/bin/capabilities/emailCapability.js +0 -20
  33. package/dist/bin/capabilities/enhancedGitCapability.js +0 -221
  34. package/dist/bin/capabilities/filesystemCapability.js +0 -22
  35. package/dist/bin/capabilities/globCapability.js +0 -28
  36. package/dist/bin/capabilities/interactionCapability.js +0 -20
  37. package/dist/bin/capabilities/learnCapability.js +0 -22
  38. package/dist/bin/capabilities/mcpCapability.js +0 -20
  39. package/dist/bin/capabilities/notebookCapability.js +0 -28
  40. package/dist/bin/capabilities/planningCapability.js +0 -27
  41. package/dist/bin/capabilities/refactoringCapability.js +0 -23
  42. package/dist/bin/capabilities/repoChecksCapability.js +0 -22
  43. package/dist/bin/capabilities/searchCapability.js +0 -22
  44. package/dist/bin/capabilities/skillCapability.js +0 -76
  45. package/dist/bin/capabilities/taskManagementCapability.js +0 -20
  46. package/dist/bin/capabilities/testingCapability.js +0 -23
  47. package/dist/bin/capabilities/toolManifest.js +0 -159
  48. package/dist/bin/capabilities/toolRegistry.js +0 -114
  49. package/dist/bin/capabilities/webCapability.js +0 -20
  50. package/dist/bin/config.js +0 -139
  51. package/dist/bin/contracts/v1/agent.js +0 -7
  52. package/dist/bin/contracts/v1/agentProfileManifest.js +0 -8
  53. package/dist/bin/contracts/v1/agentRules.js +0 -9
  54. package/dist/bin/contracts/v1/toolAccess.js +0 -8
  55. package/dist/bin/erosolar-optimized.d.ts +0 -12
  56. package/dist/bin/erosolar-optimized.d.ts.map +0 -1
  57. package/dist/bin/erosolar-optimized.js +0 -239
  58. package/dist/bin/erosolar-optimized.js.map +0 -1
  59. package/dist/bin/headless/headlessApp.js +0 -172
  60. package/dist/bin/mcp/config.js +0 -202
  61. package/dist/bin/mcp/stdioClient.js +0 -172
  62. package/dist/bin/mcp/toolBridge.js +0 -104
  63. package/dist/bin/mcp/types.js +0 -1
  64. package/dist/bin/plugins/index.js +0 -113
  65. package/dist/bin/plugins/providers/anthropic/index.js +0 -25
  66. package/dist/bin/plugins/providers/deepseek/index.js +0 -24
  67. package/dist/bin/plugins/providers/google/index.js +0 -26
  68. package/dist/bin/plugins/providers/index.js +0 -19
  69. package/dist/bin/plugins/providers/ollama/index.js +0 -59
  70. package/dist/bin/plugins/providers/openai/index.js +0 -26
  71. package/dist/bin/plugins/providers/xai/index.js +0 -24
  72. package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +0 -8
  73. package/dist/bin/plugins/tools/bash/localBashPlugin.js +0 -13
  74. package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +0 -13
  75. package/dist/bin/plugins/tools/cloud/cloudPlugin.js +0 -13
  76. package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -13
  77. package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +0 -13
  78. package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +0 -11
  79. package/dist/bin/plugins/tools/development/devPlugin.js +0 -13
  80. package/dist/bin/plugins/tools/edit/editPlugin.js +0 -14
  81. package/dist/bin/plugins/tools/email/emailPlugin.js +0 -11
  82. package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +0 -8
  83. package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +0 -13
  84. package/dist/bin/plugins/tools/glob/globPlugin.js +0 -14
  85. package/dist/bin/plugins/tools/index.js +0 -2
  86. package/dist/bin/plugins/tools/interaction/interactionPlugin.js +0 -11
  87. package/dist/bin/plugins/tools/learn/learnPlugin.js +0 -13
  88. package/dist/bin/plugins/tools/mcp/mcpPlugin.js +0 -8
  89. package/dist/bin/plugins/tools/nodeDefaults.js +0 -56
  90. package/dist/bin/plugins/tools/notebook/notebookPlugin.js +0 -14
  91. package/dist/bin/plugins/tools/planning/planningPlugin.js +0 -14
  92. package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +0 -11
  93. package/dist/bin/plugins/tools/registry.js +0 -57
  94. package/dist/bin/plugins/tools/search/localSearchPlugin.js +0 -13
  95. package/dist/bin/plugins/tools/skills/skillPlugin.js +0 -8
  96. package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +0 -11
  97. package/dist/bin/plugins/tools/testing/testingPlugin.js +0 -11
  98. package/dist/bin/plugins/tools/web/webPlugin.js +0 -11
  99. package/dist/bin/providers/anthropicProvider.js +0 -329
  100. package/dist/bin/providers/googleProvider.js +0 -203
  101. package/dist/bin/providers/openaiChatCompletionsProvider.js +0 -208
  102. package/dist/bin/providers/openaiResponsesProvider.js +0 -249
  103. package/dist/bin/providers/providerFactory.js +0 -24
  104. package/dist/bin/runtime/agentController.js +0 -321
  105. package/dist/bin/runtime/agentHost.js +0 -153
  106. package/dist/bin/runtime/agentSession.js +0 -195
  107. package/dist/bin/runtime/node.js +0 -10
  108. package/dist/bin/runtime/universal.js +0 -28
  109. package/dist/bin/skills/skillRepository.js +0 -236
  110. package/dist/bin/skills/types.js +0 -1
  111. package/dist/bin/subagents/taskRunner.js +0 -269
  112. package/dist/bin/tools/backgroundBashTools.js +0 -211
  113. package/dist/bin/tools/bashTools.js +0 -159
  114. package/dist/bin/tools/cloudTools.js +0 -864
  115. package/dist/bin/tools/codeAnalysisTools.js +0 -641
  116. package/dist/bin/tools/codeQualityTools.js +0 -294
  117. package/dist/bin/tools/dependencyTools.js +0 -282
  118. package/dist/bin/tools/devTools.js +0 -238
  119. package/dist/bin/tools/diffUtils.js +0 -137
  120. package/dist/bin/tools/editTools.js +0 -134
  121. package/dist/bin/tools/emailTools.js +0 -448
  122. package/dist/bin/tools/fileTools.js +0 -282
  123. package/dist/bin/tools/globTools.js +0 -173
  124. package/dist/bin/tools/grepTools.js +0 -332
  125. package/dist/bin/tools/interactionTools.js +0 -170
  126. package/dist/bin/tools/learnTools.js +0 -1818
  127. package/dist/bin/tools/notebookEditTools.js +0 -196
  128. package/dist/bin/tools/planningTools.js +0 -46
  129. package/dist/bin/tools/refactoringTools.js +0 -293
  130. package/dist/bin/tools/repoChecksTools.js +0 -160
  131. package/dist/bin/tools/searchTools.js +0 -206
  132. package/dist/bin/tools/skillTools.js +0 -177
  133. package/dist/bin/tools/taskManagementTools.js +0 -156
  134. package/dist/bin/tools/testingTools.js +0 -232
  135. package/dist/bin/tools/webTools.js +0 -480
  136. package/dist/bin/workspace.js +0 -106
  137. package/dist/bin/workspace.validator.js +0 -213
  138. package/dist/capabilities/offensiveSecurityCapability.d.ts +0 -26
  139. package/dist/capabilities/offensiveSecurityCapability.d.ts.map +0 -1
  140. package/dist/capabilities/offensiveSecurityCapability.js +0 -58
  141. package/dist/capabilities/offensiveSecurityCapability.js.map +0 -1
  142. package/dist/capabilities/realSecurityCapability.d.ts +0 -26
  143. package/dist/capabilities/realSecurityCapability.d.ts.map +0 -1
  144. package/dist/capabilities/realSecurityCapability.js +0 -53
  145. package/dist/capabilities/realSecurityCapability.js.map +0 -1
  146. package/dist/capabilities/securityCapability.d.ts +0 -32
  147. package/dist/capabilities/securityCapability.d.ts.map +0 -1
  148. package/dist/capabilities/securityCapability.js +0 -57
  149. package/dist/capabilities/securityCapability.js.map +0 -1
  150. package/dist/capabilities/ultimateSecurityCapability.d.ts +0 -42
  151. package/dist/capabilities/ultimateSecurityCapability.d.ts.map +0 -1
  152. package/dist/capabilities/ultimateSecurityCapability.js +0 -96
  153. package/dist/capabilities/ultimateSecurityCapability.js.map +0 -1
  154. package/dist/core/designThoughtCheck.d.ts +0 -196
  155. package/dist/core/designThoughtCheck.d.ts.map +0 -1
  156. package/dist/core/designThoughtCheck.js +0 -287
  157. package/dist/core/designThoughtCheck.js.map +0 -1
  158. package/dist/core/designThoughtCheckEngine.d.ts +0 -58
  159. package/dist/core/designThoughtCheckEngine.d.ts.map +0 -1
  160. package/dist/core/designThoughtCheckEngine.js +0 -358
  161. package/dist/core/designThoughtCheckEngine.js.map +0 -1
  162. package/dist/core/designThoughtCheckIntegration.d.ts +0 -103
  163. package/dist/core/designThoughtCheckIntegration.d.ts.map +0 -1
  164. package/dist/core/designThoughtCheckIntegration.js +0 -207
  165. package/dist/core/designThoughtCheckIntegration.js.map +0 -1
  166. package/dist/core/intelligenceTools.d.ts +0 -19
  167. package/dist/core/intelligenceTools.d.ts.map +0 -1
  168. package/dist/core/intelligenceTools.js +0 -453
  169. package/dist/core/intelligenceTools.js.map +0 -1
  170. package/dist/core/operationalTools.d.ts +0 -19
  171. package/dist/core/operationalTools.d.ts.map +0 -1
  172. package/dist/core/operationalTools.js +0 -467
  173. package/dist/core/operationalTools.js.map +0 -1
  174. package/dist/offensive/core/offensive-engine.d.ts +0 -171
  175. package/dist/offensive/core/offensive-engine.d.ts.map +0 -1
  176. package/dist/offensive/core/offensive-engine.js +0 -345
  177. package/dist/offensive/core/offensive-engine.js.map +0 -1
  178. package/dist/offensive/core/offensive-integration.d.ts +0 -129
  179. package/dist/offensive/core/offensive-integration.d.ts.map +0 -1
  180. package/dist/offensive/core/offensive-integration.js +0 -364
  181. package/dist/offensive/core/offensive-integration.js.map +0 -1
  182. package/dist/offensive/core/offensive-tools.d.ts +0 -55
  183. package/dist/offensive/core/offensive-tools.d.ts.map +0 -1
  184. package/dist/offensive/core/offensive-tools.js +0 -438
  185. package/dist/offensive/core/offensive-tools.js.map +0 -1
  186. package/dist/offensive/offensive-cli.d.ts +0 -48
  187. package/dist/offensive/offensive-cli.d.ts.map +0 -1
  188. package/dist/offensive/offensive-cli.js +0 -233
  189. package/dist/offensive/offensive-cli.js.map +0 -1
  190. package/dist/security/apt-simulation-cli.d.ts +0 -57
  191. package/dist/security/apt-simulation-cli.d.ts.map +0 -1
  192. package/dist/security/apt-simulation-cli.js +0 -278
  193. package/dist/security/apt-simulation-cli.js.map +0 -1
  194. package/dist/security/apt-simulation-engine-complete.d.ts +0 -97
  195. package/dist/security/apt-simulation-engine-complete.d.ts.map +0 -1
  196. package/dist/security/apt-simulation-engine-complete.js +0 -441
  197. package/dist/security/apt-simulation-engine-complete.js.map +0 -1
  198. package/dist/security/apt-simulation-engine.d.ts +0 -97
  199. package/dist/security/apt-simulation-engine.d.ts.map +0 -1
  200. package/dist/security/apt-simulation-engine.js +0 -441
  201. package/dist/security/apt-simulation-engine.js.map +0 -1
  202. package/dist/security/authorization.d.ts +0 -45
  203. package/dist/security/authorization.d.ts.map +0 -1
  204. package/dist/security/authorization.js +0 -128
  205. package/dist/security/authorization.js.map +0 -1
  206. package/dist/security/comprehensive-security-research.d.ts +0 -84
  207. package/dist/security/comprehensive-security-research.d.ts.map +0 -1
  208. package/dist/security/comprehensive-security-research.js +0 -211
  209. package/dist/security/comprehensive-security-research.js.map +0 -1
  210. package/dist/security/offensive/exploitationEngine.d.ts +0 -54
  211. package/dist/security/offensive/exploitationEngine.d.ts.map +0 -1
  212. package/dist/security/offensive/exploitationEngine.js +0 -263
  213. package/dist/security/offensive/exploitationEngine.js.map +0 -1
  214. package/dist/security/real/networkExploitation.d.ts +0 -92
  215. package/dist/security/real/networkExploitation.d.ts.map +0 -1
  216. package/dist/security/real/networkExploitation.js +0 -316
  217. package/dist/security/real/networkExploitation.js.map +0 -1
  218. package/dist/security/real/persistenceImplementation.d.ts +0 -62
  219. package/dist/security/real/persistenceImplementation.d.ts.map +0 -1
  220. package/dist/security/real/persistenceImplementation.js +0 -323
  221. package/dist/security/real/persistenceImplementation.js.map +0 -1
  222. package/dist/security/real/vulnerabilityScanner.d.ts +0 -73
  223. package/dist/security/real/vulnerabilityScanner.d.ts.map +0 -1
  224. package/dist/security/real/vulnerabilityScanner.js +0 -341
  225. package/dist/security/real/vulnerabilityScanner.js.map +0 -1
  226. package/dist/shell/capturePastePatch.d.ts +0 -9
  227. package/dist/shell/capturePastePatch.d.ts.map +0 -1
  228. package/dist/shell/capturePastePatch.js +0 -98
  229. package/dist/shell/capturePastePatch.js.map +0 -1
  230. package/dist/shell/enhancedInteractiveShell.d.ts +0 -90
  231. package/dist/shell/enhancedInteractiveShell.d.ts.map +0 -1
  232. package/dist/shell/enhancedInteractiveShell.js +0 -248
  233. package/dist/shell/enhancedInteractiveShell.js.map +0 -1
  234. package/dist/shell/inputProcessor.d.ts +0 -56
  235. package/dist/shell/inputProcessor.d.ts.map +0 -1
  236. package/dist/shell/inputProcessor.js +0 -172
  237. package/dist/shell/inputProcessor.js.map +0 -1
  238. package/dist/shell/interactiveShell-patch.d.ts +0 -27
  239. package/dist/shell/interactiveShell-patch.d.ts.map +0 -1
  240. package/dist/shell/interactiveShell-patch.js +0 -38
  241. package/dist/shell/interactiveShell-patch.js.map +0 -1
  242. package/dist/shell/interactiveShell-robust.d.ts +0 -26
  243. package/dist/shell/interactiveShell-robust.d.ts.map +0 -1
  244. package/dist/shell/interactiveShell-robust.js +0 -34
  245. package/dist/shell/interactiveShell-robust.js.map +0 -1
  246. package/dist/shell/multiLinePasteManager.d.ts +0 -106
  247. package/dist/shell/multiLinePasteManager.d.ts.map +0 -1
  248. package/dist/shell/multiLinePasteManager.js +0 -308
  249. package/dist/shell/multiLinePasteManager.js.map +0 -1
  250. package/dist/shell/processInputBlockPatch.d.ts +0 -8
  251. package/dist/shell/processInputBlockPatch.d.ts.map +0 -1
  252. package/dist/shell/processInputBlockPatch.js +0 -133
  253. package/dist/shell/processInputBlockPatch.js.map +0 -1
  254. package/dist/shell/unifiedInputProcessor.d.ts +0 -23
  255. package/dist/shell/unifiedInputProcessor.d.ts.map +0 -1
  256. package/dist/shell/unifiedInputProcessor.js +0 -92
  257. package/dist/shell/unifiedInputProcessor.js.map +0 -1
  258. package/dist/tools/enhancedSecurityTools.d.ts +0 -19
  259. package/dist/tools/enhancedSecurityTools.d.ts.map +0 -1
  260. package/dist/tools/enhancedSecurityTools.js +0 -215
  261. package/dist/tools/enhancedSecurityTools.js.map +0 -1
  262. package/dist/tools/offensiveSecurityTools.d.ts +0 -16
  263. package/dist/tools/offensiveSecurityTools.d.ts.map +0 -1
  264. package/dist/tools/offensiveSecurityTools.js +0 -285
  265. package/dist/tools/offensiveSecurityTools.js.map +0 -1
  266. package/dist/tools/realSecurityTools.d.ts +0 -18
  267. package/dist/tools/realSecurityTools.d.ts.map +0 -1
  268. package/dist/tools/realSecurityTools.js +0 -468
  269. package/dist/tools/realSecurityTools.js.map +0 -1
  270. package/dist/tools/securityTools.d.ts +0 -20
  271. package/dist/tools/securityTools.d.ts.map +0 -1
  272. package/dist/tools/securityTools.js +0 -449
  273. package/dist/tools/securityTools.js.map +0 -1
@@ -1,159 +0,0 @@
1
- import { createRequire } from 'node:module';
2
- const require = createRequire(import.meta.url);
3
- const manifest = normalizeManifest(require('../contracts/tools.schema.json'));
4
- export function getToolManifest() {
5
- return manifest;
6
- }
7
- function normalizeManifest(raw) {
8
- if (!raw || typeof raw !== 'object') {
9
- throw new Error('Tool manifest is malformed: expected an object.');
10
- }
11
- const options = Array.isArray(raw.options) ? raw.options.map(normalizeOption) : null;
12
- if (!options?.length) {
13
- throw new Error('Tool manifest must include at least one tool option.');
14
- }
15
- const manifest = {
16
- contractVersion: requireString(raw.contractVersion, 'contractVersion'),
17
- profile: requireString(raw.profile, 'profile'),
18
- version: requireString(raw.version, 'version'),
19
- options,
20
- };
21
- const label = optionalString(raw.label);
22
- if (label) {
23
- manifest.label = label;
24
- }
25
- const description = optionalString(raw.description);
26
- if (description) {
27
- manifest.description = description;
28
- }
29
- const metadata = normalizeRecord(raw.metadata);
30
- if (metadata) {
31
- manifest.metadata = metadata;
32
- }
33
- const presets = normalizePresets(raw.presets);
34
- if (presets) {
35
- manifest.presets = presets;
36
- }
37
- return manifest;
38
- }
39
- function normalizeOption(raw) {
40
- const id = requireString(raw.id, 'option.id');
41
- const label = requireString(raw.label, `option("${id}").label`);
42
- const description = requireString(raw.description, `option("${id}").description`);
43
- const pluginIds = dedupeStrings(raw.pluginIds);
44
- if (!pluginIds.length) {
45
- throw new Error(`Tool option "${id}" must declare at least one plugin id.`);
46
- }
47
- const option = {
48
- id,
49
- label,
50
- description,
51
- defaultEnabled: Boolean(raw.defaultEnabled),
52
- pluginIds,
53
- };
54
- const category = optionalString(raw.category);
55
- if (category) {
56
- option.category = category;
57
- }
58
- const requiresSecret = optionalString(raw.requiresSecret);
59
- if (requiresSecret) {
60
- option.requiresSecret = requiresSecret;
61
- }
62
- const scopes = raw.scopes?.length ? dedupeStrings(raw.scopes) : undefined;
63
- if (scopes?.length) {
64
- option.scopes = scopes;
65
- }
66
- const metadata = normalizeRecord(raw.metadata);
67
- if (metadata) {
68
- option.metadata = metadata;
69
- }
70
- return option;
71
- }
72
- function normalizePresets(entries) {
73
- if (!entries?.length) {
74
- return undefined;
75
- }
76
- return entries.map((preset) => {
77
- const id = requireString(preset.id, 'preset.id');
78
- const normalized = {
79
- id,
80
- label: requireString(preset.label, `preset("${id}").label`),
81
- enabled: dedupeStrings(preset.enabled),
82
- disabled: dedupeStrings(preset.disabled),
83
- locked: dedupeStrings(preset.locked),
84
- };
85
- const description = optionalString(preset.description);
86
- if (description) {
87
- normalized.description = description;
88
- }
89
- const appliesTo = normalizeTargets(preset.appliesTo);
90
- if (appliesTo) {
91
- normalized.appliesTo = appliesTo;
92
- }
93
- const metadata = normalizeRecord(preset.metadata);
94
- if (metadata) {
95
- normalized.metadata = metadata;
96
- }
97
- const notes = optionalString(preset.notes);
98
- if (notes) {
99
- normalized.notes = notes;
100
- }
101
- return normalized;
102
- });
103
- }
104
- function normalizeTargets(targets) {
105
- if (!targets?.length) {
106
- return undefined;
107
- }
108
- const seen = new Set();
109
- const result = [];
110
- for (const target of targets) {
111
- if (target && !seen.has(target)) {
112
- seen.add(target);
113
- result.push(target);
114
- }
115
- }
116
- return result.length ? result : undefined;
117
- }
118
- function dedupeStrings(values) {
119
- if (!values?.length) {
120
- return [];
121
- }
122
- const seen = new Set();
123
- const result = [];
124
- for (const entry of values) {
125
- if (typeof entry !== 'string') {
126
- continue;
127
- }
128
- const trimmed = entry.trim();
129
- if (!trimmed || seen.has(trimmed)) {
130
- continue;
131
- }
132
- seen.add(trimmed);
133
- result.push(trimmed);
134
- }
135
- return result;
136
- }
137
- function normalizeRecord(value) {
138
- if (!value || typeof value !== 'object' || Array.isArray(value)) {
139
- return undefined;
140
- }
141
- return { ...value };
142
- }
143
- function requireString(value, field) {
144
- if (typeof value !== 'string') {
145
- throw new Error(`Tool manifest is missing required field "${field}".`);
146
- }
147
- const trimmed = value.trim();
148
- if (!trimmed) {
149
- throw new Error(`Tool manifest field "${field}" cannot be blank.`);
150
- }
151
- return trimmed;
152
- }
153
- function optionalString(value) {
154
- if (typeof value !== 'string') {
155
- return undefined;
156
- }
157
- const trimmed = value.trim();
158
- return trimmed.length ? trimmed : undefined;
159
- }
@@ -1,114 +0,0 @@
1
- import { getSecretValue, listSecretDefinitions } from '../core/secretStore.js';
2
- import { getToolManifest } from './toolManifest.js';
3
- const SECRET_LOOKUP = buildSecretLookup();
4
- const TOOL_OPTIONS = buildToolToggleOptions();
5
- const PLUGIN_TO_OPTION = buildPluginLookup();
6
- export function getToolToggleOptions() {
7
- return [...TOOL_OPTIONS];
8
- }
9
- export function buildEnabledToolSet(saved) {
10
- const enabled = new Set();
11
- if (!saved) {
12
- for (const option of TOOL_OPTIONS) {
13
- if (option.defaultEnabled) {
14
- enabled.add(option.id);
15
- }
16
- }
17
- return enabled;
18
- }
19
- const knownIds = new Set(TOOL_OPTIONS.map((option) => option.id));
20
- for (const id of saved.enabledTools ?? []) {
21
- if (knownIds.has(id)) {
22
- enabled.add(id);
23
- }
24
- }
25
- return enabled;
26
- }
27
- export function evaluateToolPermissions(selection) {
28
- const allowedPluginIds = new Set();
29
- const warnings = [];
30
- for (const option of TOOL_OPTIONS) {
31
- if (!selection.has(option.id)) {
32
- continue;
33
- }
34
- if (option.requiresSecret) {
35
- const secret = getSecretValue(option.requiresSecret);
36
- if (!secret) {
37
- warnings.push({
38
- id: option.id,
39
- label: option.label,
40
- reason: 'missing-secret',
41
- secretId: option.requiresSecret,
42
- });
43
- continue;
44
- }
45
- }
46
- for (const pluginId of option.pluginIds) {
47
- allowedPluginIds.add(pluginId);
48
- }
49
- }
50
- return {
51
- allowedPluginIds,
52
- warnings,
53
- };
54
- }
55
- export function isPluginEnabled(pluginId, allowedPluginIds) {
56
- const associated = PLUGIN_TO_OPTION.get(pluginId);
57
- if (!associated) {
58
- return true;
59
- }
60
- return allowedPluginIds.has(pluginId);
61
- }
62
- function buildPluginLookup() {
63
- const map = new Map();
64
- for (const option of TOOL_OPTIONS) {
65
- for (const pluginId of option.pluginIds) {
66
- map.set(pluginId, option);
67
- }
68
- }
69
- return map;
70
- }
71
- function buildToolToggleOptions() {
72
- const manifest = getToolManifest();
73
- return manifest.options.map((option) => normalizeToggleOption(option));
74
- }
75
- function normalizeToggleOption(option) {
76
- const pluginIds = option.pluginIds ?? [];
77
- if (!pluginIds.length) {
78
- throw new Error(`Tool option "${option.id}" is missing plugin bindings.`);
79
- }
80
- const normalized = {
81
- id: option.id,
82
- label: option.label,
83
- description: option.description,
84
- defaultEnabled: option.defaultEnabled,
85
- pluginIds: [...pluginIds],
86
- };
87
- if (option.category) {
88
- normalized.category = option.category;
89
- }
90
- if (option.scopes?.length) {
91
- normalized.scopes = [...option.scopes];
92
- }
93
- const secret = normalizeSecret(option.requiresSecret);
94
- if (secret) {
95
- normalized.requiresSecret = secret;
96
- }
97
- if (option.metadata) {
98
- normalized.metadata = { ...option.metadata };
99
- }
100
- return normalized;
101
- }
102
- function buildSecretLookup() {
103
- const ids = listSecretDefinitions().map((secret) => secret.id);
104
- return new Set(ids);
105
- }
106
- function normalizeSecret(value) {
107
- if (!value) {
108
- return undefined;
109
- }
110
- if (!SECRET_LOOKUP.has(value)) {
111
- throw new Error(`Tool manifest references unknown secret "${value}".`);
112
- }
113
- return value;
114
- }
@@ -1,20 +0,0 @@
1
- import { createWebTools } from '../tools/webTools.js';
2
- export class WebCapabilityModule {
3
- constructor(options = {}) {
4
- this.id = 'capability.web';
5
- this.options = options;
6
- }
7
- async create(_context) {
8
- return {
9
- id: this.options.id ?? 'web.tools.fetch-search',
10
- description: this.options.description ??
11
- 'Web content fetching and search tools for accessing online information.',
12
- toolSuite: {
13
- id: 'web',
14
- description: 'Web fetch and search tools',
15
- tools: createWebTools(),
16
- },
17
- metadata: {},
18
- };
19
- }
20
- }
@@ -1,139 +0,0 @@
1
- import { dirname, resolve } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
- import { registerAgentProfile, hasAgentProfile, getAgentProfile, } from './core/agentProfiles.js';
4
- import { buildAgentRulebookPrompt, loadAgentRulebook } from './core/agentRulebook.js';
5
- import { getAgentProfileManifest } from './core/agentProfileManifest.js';
6
- const PACKAGE_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
7
- const PROFILE_MANIFEST = getAgentProfileManifest();
8
- const DEFAULT_PROFILES = PROFILE_MANIFEST.profiles.map((entry) => normalizeProfileFromManifest(entry, PROFILE_MANIFEST, PACKAGE_ROOT));
9
- for (const profile of DEFAULT_PROFILES) {
10
- if (!hasAgentProfile(profile.name)) {
11
- registerAgentProfile(profile);
12
- }
13
- }
14
- export function resolveProfileConfig(profile, workspaceContext) {
15
- const blueprint = getAgentProfile(profile);
16
- const envPrefix = toEnvPrefix(blueprint.name);
17
- const modelEnv = process.env[`${envPrefix}_MODEL`];
18
- const modelLocked = typeof modelEnv === 'string' && modelEnv.trim().length > 0;
19
- const model = modelLocked ? modelEnv.trim() : blueprint.defaultModel;
20
- const systemPrompt = process.env[`${envPrefix}_SYSTEM_PROMPT`] ?? blueprint.defaultSystemPrompt;
21
- const providerEnv = process.env[`${envPrefix}_PROVIDER`];
22
- const providerLocked = isProviderValue(providerEnv);
23
- const provider = providerLocked ? providerEnv.trim() : blueprint.defaultProvider;
24
- const rulebook = loadRulebookMetadata(blueprint);
25
- const contextBlock = workspaceContext?.trim()
26
- ? `\n\nWorkspace context (auto-detected):\n${workspaceContext.trim()}`
27
- : '';
28
- const resolved = {
29
- profile,
30
- label: blueprint.label,
31
- provider,
32
- model,
33
- systemPrompt: `${systemPrompt.trim()}${contextBlock}`,
34
- modelLocked,
35
- providerLocked,
36
- rulebook,
37
- };
38
- if (typeof blueprint.temperature === 'number') {
39
- resolved.temperature = blueprint.temperature;
40
- }
41
- if (typeof blueprint.maxTokens === 'number') {
42
- resolved.maxTokens = blueprint.maxTokens;
43
- }
44
- return resolved;
45
- }
46
- function toEnvPrefix(profile) {
47
- return profile
48
- .trim()
49
- .toUpperCase()
50
- .replace(/[^A-Z0-9]/g, '_');
51
- }
52
- function isProviderValue(value) {
53
- return typeof value === 'string' && value.trim().length > 0;
54
- }
55
- function loadRulebookMetadata(profile) {
56
- try {
57
- // Check if rulebook is inline
58
- const rulebookRef = profile.rulebook;
59
- const manifest = rulebookRef.inline
60
- ? loadAgentRulebook(profile.name, { inline: rulebookRef.inline })
61
- : loadAgentRulebook(profile.name, {
62
- root: PACKAGE_ROOT,
63
- file: rulebookRef.file,
64
- });
65
- return {
66
- profile: manifest.profile,
67
- label: manifest.label ?? manifest.profile,
68
- version: manifest.version,
69
- contractVersion: manifest.contractVersion,
70
- description: manifest.description ?? profile.rulebook.description,
71
- file: rulebookRef.file ?? '[inline]',
72
- };
73
- }
74
- catch {
75
- if (!profile.rulebook) {
76
- return null;
77
- }
78
- const rulebookRef = profile.rulebook;
79
- const fallback = {
80
- profile: profile.name,
81
- label: profile.label,
82
- version: rulebookRef.version ?? 'unknown',
83
- contractVersion: rulebookRef.contractVersion ?? 'unknown',
84
- description: rulebookRef.description,
85
- file: rulebookRef.file ?? '[inline]',
86
- };
87
- return fallback;
88
- }
89
- }
90
- function normalizeProfileFromManifest(entry, manifest, root) {
91
- const defaultSystemPrompt = buildDefaultSystemPrompt(entry, root);
92
- return {
93
- name: entry.name,
94
- label: entry.label,
95
- description: entry.description,
96
- defaultProvider: entry.defaultProvider,
97
- defaultModel: entry.defaultModel,
98
- systemPromptConfig: entry.systemPrompt,
99
- defaultSystemPrompt,
100
- temperature: entry.temperature,
101
- maxTokens: entry.maxTokens,
102
- rulebook: entry.rulebook,
103
- manifestVersion: manifest.version,
104
- manifestContractVersion: manifest.contractVersion,
105
- };
106
- }
107
- function buildDefaultSystemPrompt(entry, root) {
108
- try {
109
- const promptConfig = entry.systemPrompt;
110
- if (promptConfig.type === 'literal') {
111
- return promptConfig.content.trim();
112
- }
113
- const template = promptConfig.template?.trim() || '{{rulebook}}';
114
- // Check if rulebook is inline
115
- const rulebookRef = entry.rulebook;
116
- const rulebookPrompt = rulebookRef.inline
117
- ? buildAgentRulebookPrompt(entry.name, { inline: rulebookRef.inline }).trim()
118
- : buildAgentRulebookPrompt(entry.name, { root, file: rulebookRef.file }).trim();
119
- const replacements = {
120
- rulebook: rulebookPrompt,
121
- profile: entry.label || entry.name,
122
- profile_name: entry.name,
123
- };
124
- const rendered = template.replace(/\{\{\s*(rulebook|profile|profile_name)\s*\}\}/gi, (_match, token) => {
125
- const key = token.toLowerCase();
126
- return replacements[key] ?? '';
127
- });
128
- if (/\{\{\s*rulebook\s*\}\}/i.test(template)) {
129
- return rendered.trim();
130
- }
131
- const merged = rendered.trim();
132
- const suffix = merged ? `\n\n${rulebookPrompt}` : rulebookPrompt;
133
- return `${merged}${suffix}`.trim();
134
- }
135
- catch (error) {
136
- const message = error instanceof Error ? error.message : String(error);
137
- throw new Error(`Failed to build system prompt for profile "${entry.name}": ${message}`);
138
- }
139
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * Agent Contract v1.0
3
- *
4
- * Stable interface for agent interaction across all frontends.
5
- * Breaking changes require a new version (v2/).
6
- */
7
- export const AGENT_CONTRACT_VERSION = '1.0.0';
@@ -1,8 +0,0 @@
1
- /**
2
- * Agent Profile Manifest Contract v1.0
3
- *
4
- * Canonical description of agent profiles, their default model/provider
5
- * configuration, and how system prompts are sourced. The manifest is meant
6
- * to be JSON schema backed so other runtimes can load the same defaults.
7
- */
8
- export const AGENT_PROFILE_MANIFEST_VERSION = '1.0.0';
@@ -1,9 +0,0 @@
1
- /**
2
- * Agent Rules Contract v1.0
3
- *
4
- * Describes the structured rule set that governs how the agent moves through
5
- * phases, steps, and sub-steps during a task. Each step enumerates explicit
6
- * rules so downstream runtimes can render or validate the workflow without
7
- * relying on bespoke prompt text.
8
- */
9
- export const AGENT_RULES_CONTRACT_VERSION = '1.0.0';
@@ -1,8 +0,0 @@
1
- /**
2
- * Tool Selection Contract v1.0
3
- *
4
- * Enumerates the toggleable tool suites that can be surfaced to the agent at
5
- * runtime plus optional presets that frontends can expose as one-click
6
- * configurations.
7
- */
8
- export const TOOL_SELECTION_CONTRACT_VERSION = '1.0.0';
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Optimized Erosolar CLI Entry Point
4
- *
5
- * Features:
6
- * - Fast-path commands for simple operations
7
- * - Lazy loading for complex functionality
8
- * - Performance monitoring
9
- * - Graceful error handling
10
- */
11
- export {};
12
- //# sourceMappingURL=erosolar-optimized.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"erosolar-optimized.d.ts","sourceRoot":"","sources":["../../src/bin/erosolar-optimized.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG"}