deepseek-coder-agent-cli 1.0.13 → 1.0.15

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 (240) hide show
  1. package/dist/capabilities/index.d.ts +1 -18
  2. package/dist/capabilities/index.d.ts.map +1 -1
  3. package/dist/capabilities/index.js +2 -19
  4. package/dist/capabilities/index.js.map +1 -1
  5. package/dist/core/agiCore.d.ts.map +1 -1
  6. package/dist/core/agiCore.js +3 -6
  7. package/dist/core/agiCore.js.map +1 -1
  8. package/dist/core/dynamicGuardrails.d.ts.map +1 -1
  9. package/dist/core/dynamicGuardrails.js +0 -60
  10. package/dist/core/dynamicGuardrails.js.map +1 -1
  11. package/dist/core/gitWorktreeManager.d.ts +1 -1
  12. package/dist/core/gitWorktreeManager.d.ts.map +1 -1
  13. package/dist/core/gitWorktreeManager.js.map +1 -1
  14. package/dist/core/hotReload.js.map +1 -1
  15. package/dist/core/index.d.ts +0 -8
  16. package/dist/core/index.d.ts.map +1 -1
  17. package/dist/core/index.js +1 -15
  18. package/dist/core/index.js.map +1 -1
  19. package/dist/core/selfUpgrade.d.ts +34 -208
  20. package/dist/core/selfUpgrade.d.ts.map +1 -1
  21. package/dist/core/selfUpgrade.js +54 -631
  22. package/dist/core/selfUpgrade.js.map +1 -1
  23. package/dist/headless/interactiveShell.d.ts.map +1 -1
  24. package/dist/headless/interactiveShell.js +10 -71
  25. package/dist/headless/interactiveShell.js.map +1 -1
  26. package/dist/orchestration/index.d.ts +9 -5
  27. package/dist/orchestration/index.d.ts.map +1 -1
  28. package/dist/orchestration/index.js +7 -8
  29. package/dist/orchestration/index.js.map +1 -1
  30. package/dist/plugins/index.d.ts +1 -1
  31. package/dist/plugins/index.d.ts.map +1 -1
  32. package/dist/plugins/index.js +1 -2
  33. package/dist/plugins/index.js.map +1 -1
  34. package/dist/plugins/tools/nodeDefaults.d.ts +0 -2
  35. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
  36. package/dist/plugins/tools/nodeDefaults.js +0 -6
  37. package/dist/plugins/tools/nodeDefaults.js.map +1 -1
  38. package/dist/tools/diffUtils.d.ts.map +1 -1
  39. package/dist/tools/diffUtils.js +0 -14
  40. package/dist/tools/diffUtils.js.map +1 -1
  41. package/dist/tools/editTools.d.ts.map +1 -1
  42. package/dist/tools/editTools.js +20 -168
  43. package/dist/tools/editTools.js.map +1 -1
  44. package/dist/tools/fileTools.d.ts.map +1 -1
  45. package/dist/tools/fileTools.js +1 -10
  46. package/dist/tools/fileTools.js.map +1 -1
  47. package/dist/tools/grepTools.d.ts.map +1 -1
  48. package/dist/tools/grepTools.js +1 -2
  49. package/dist/tools/grepTools.js.map +1 -1
  50. package/dist/tools/searchTools.d.ts.map +1 -1
  51. package/dist/tools/searchTools.js +0 -7
  52. package/dist/tools/searchTools.js.map +1 -1
  53. package/dist/tools/telemetryTools.d.ts +5 -0
  54. package/dist/tools/telemetryTools.d.ts.map +1 -1
  55. package/dist/tools/telemetryTools.js +6 -6
  56. package/dist/tools/telemetryTools.js.map +1 -1
  57. package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
  58. package/dist/ui/UnifiedUIRenderer.js +7 -25
  59. package/dist/ui/UnifiedUIRenderer.js.map +1 -1
  60. package/package.json +1 -2
  61. package/dist/capabilities/appleSecurityCapability.d.ts +0 -57
  62. package/dist/capabilities/appleSecurityCapability.d.ts.map +0 -1
  63. package/dist/capabilities/appleSecurityCapability.js +0 -197
  64. package/dist/capabilities/appleSecurityCapability.js.map +0 -1
  65. package/dist/capabilities/authorizedSecurityCapability.d.ts +0 -17
  66. package/dist/capabilities/authorizedSecurityCapability.d.ts.map +0 -1
  67. package/dist/capabilities/authorizedSecurityCapability.js +0 -333
  68. package/dist/capabilities/authorizedSecurityCapability.js.map +0 -1
  69. package/dist/capabilities/autoEnhancementCapability.d.ts +0 -98
  70. package/dist/capabilities/autoEnhancementCapability.d.ts.map +0 -1
  71. package/dist/capabilities/autoEnhancementCapability.js +0 -455
  72. package/dist/capabilities/autoEnhancementCapability.js.map +0 -1
  73. package/dist/capabilities/biocognitiveWarfare.d.ts +0 -136
  74. package/dist/capabilities/biocognitiveWarfare.d.ts.map +0 -1
  75. package/dist/capabilities/biocognitiveWarfare.js +0 -603
  76. package/dist/capabilities/biocognitiveWarfare.js.map +0 -1
  77. package/dist/capabilities/chineseCnoIntegration.d.ts +0 -60
  78. package/dist/capabilities/chineseCnoIntegration.d.ts.map +0 -1
  79. package/dist/capabilities/chineseCnoIntegration.js +0 -253
  80. package/dist/capabilities/chineseCnoIntegration.js.map +0 -1
  81. package/dist/capabilities/cnoCapability.d.ts +0 -110
  82. package/dist/capabilities/cnoCapability.d.ts.map +0 -1
  83. package/dist/capabilities/cnoCapability.js +0 -785
  84. package/dist/capabilities/cnoCapability.js.map +0 -1
  85. package/dist/capabilities/eliteCryptoMilitaryCapability.d.ts +0 -99
  86. package/dist/capabilities/eliteCryptoMilitaryCapability.d.ts.map +0 -1
  87. package/dist/capabilities/eliteCryptoMilitaryCapability.js +0 -618
  88. package/dist/capabilities/eliteCryptoMilitaryCapability.js.map +0 -1
  89. package/dist/capabilities/integratedUnifiedCapability.d.ts +0 -105
  90. package/dist/capabilities/integratedUnifiedCapability.d.ts.map +0 -1
  91. package/dist/capabilities/integratedUnifiedCapability.js +0 -422
  92. package/dist/capabilities/integratedUnifiedCapability.js.map +0 -1
  93. package/dist/capabilities/maxOffensiveUkraineCapability.d.ts +0 -46
  94. package/dist/capabilities/maxOffensiveUkraineCapability.d.ts.map +0 -1
  95. package/dist/capabilities/maxOffensiveUkraineCapability.js +0 -725
  96. package/dist/capabilities/maxOffensiveUkraineCapability.js.map +0 -1
  97. package/dist/capabilities/migrationUtilities.d.ts +0 -128
  98. package/dist/capabilities/migrationUtilities.d.ts.map +0 -1
  99. package/dist/capabilities/migrationUtilities.js +0 -658
  100. package/dist/capabilities/migrationUtilities.js.map +0 -1
  101. package/dist/capabilities/offensiveDestructionCapability.d.ts +0 -98
  102. package/dist/capabilities/offensiveDestructionCapability.d.ts.map +0 -1
  103. package/dist/capabilities/offensiveDestructionCapability.js +0 -848
  104. package/dist/capabilities/offensiveDestructionCapability.js.map +0 -1
  105. package/dist/capabilities/quantumSpaceWarfare.d.ts +0 -108
  106. package/dist/capabilities/quantumSpaceWarfare.d.ts.map +0 -1
  107. package/dist/capabilities/quantumSpaceWarfare.js +0 -342
  108. package/dist/capabilities/quantumSpaceWarfare.js.map +0 -1
  109. package/dist/capabilities/readmeIntegration.d.ts +0 -161
  110. package/dist/capabilities/readmeIntegration.d.ts.map +0 -1
  111. package/dist/capabilities/readmeIntegration.js +0 -1034
  112. package/dist/capabilities/readmeIntegration.js.map +0 -1
  113. package/dist/capabilities/selfUpdateSystem.d.ts +0 -122
  114. package/dist/capabilities/selfUpdateSystem.d.ts.map +0 -1
  115. package/dist/capabilities/selfUpdateSystem.js +0 -725
  116. package/dist/capabilities/selfUpdateSystem.js.map +0 -1
  117. package/dist/capabilities/sharedMilitaryInfrastructure.d.ts +0 -89
  118. package/dist/capabilities/sharedMilitaryInfrastructure.d.ts.map +0 -1
  119. package/dist/capabilities/sharedMilitaryInfrastructure.js +0 -233
  120. package/dist/capabilities/sharedMilitaryInfrastructure.js.map +0 -1
  121. package/dist/capabilities/simpleSecurityCapability.d.ts +0 -36
  122. package/dist/capabilities/simpleSecurityCapability.d.ts.map +0 -1
  123. package/dist/capabilities/simpleSecurityCapability.js +0 -271
  124. package/dist/capabilities/simpleSecurityCapability.js.map +0 -1
  125. package/dist/capabilities/ultimateChineseCno.d.ts +0 -115
  126. package/dist/capabilities/ultimateChineseCno.d.ts.map +0 -1
  127. package/dist/capabilities/ultimateChineseCno.js +0 -516
  128. package/dist/capabilities/ultimateChineseCno.js.map +0 -1
  129. package/dist/capabilities/ultimateIntegrationDemo.d.ts +0 -54
  130. package/dist/capabilities/ultimateIntegrationDemo.d.ts.map +0 -1
  131. package/dist/capabilities/ultimateIntegrationDemo.js +0 -423
  132. package/dist/capabilities/ultimateIntegrationDemo.js.map +0 -1
  133. package/dist/capabilities/unifiedMilitaryCapability.d.ts +0 -63
  134. package/dist/capabilities/unifiedMilitaryCapability.d.ts.map +0 -1
  135. package/dist/capabilities/unifiedMilitaryCapability.js +0 -384
  136. package/dist/capabilities/unifiedMilitaryCapability.js.map +0 -1
  137. package/dist/capabilities/universalCapabilityFramework.d.ts +0 -352
  138. package/dist/capabilities/universalCapabilityFramework.d.ts.map +0 -1
  139. package/dist/capabilities/universalCapabilityFramework.js +0 -1056
  140. package/dist/capabilities/universalCapabilityFramework.js.map +0 -1
  141. package/dist/capabilities/universalSecurityCapability.d.ts +0 -46
  142. package/dist/capabilities/universalSecurityCapability.d.ts.map +0 -1
  143. package/dist/capabilities/universalSecurityCapability.js +0 -580
  144. package/dist/capabilities/universalSecurityCapability.js.map +0 -1
  145. package/dist/capabilities/zeroDayDiscoveryCapability.d.ts +0 -31
  146. package/dist/capabilities/zeroDayDiscoveryCapability.d.ts.map +0 -1
  147. package/dist/capabilities/zeroDayDiscoveryCapability.js +0 -183
  148. package/dist/capabilities/zeroDayDiscoveryCapability.js.map +0 -1
  149. package/dist/core/antiTermination.d.ts +0 -226
  150. package/dist/core/antiTermination.d.ts.map +0 -1
  151. package/dist/core/antiTermination.js +0 -713
  152. package/dist/core/antiTermination.js.map +0 -1
  153. package/dist/core/appleSecurityAudit.d.ts +0 -98
  154. package/dist/core/appleSecurityAudit.d.ts.map +0 -1
  155. package/dist/core/appleSecurityAudit.js +0 -505
  156. package/dist/core/appleSecurityAudit.js.map +0 -1
  157. package/dist/core/appleSecurityIntegration.d.ts +0 -130
  158. package/dist/core/appleSecurityIntegration.d.ts.map +0 -1
  159. package/dist/core/appleSecurityIntegration.js +0 -697
  160. package/dist/core/appleSecurityIntegration.js.map +0 -1
  161. package/dist/core/dualTournament.d.ts +0 -110
  162. package/dist/core/dualTournament.d.ts.map +0 -1
  163. package/dist/core/dualTournament.js +0 -270
  164. package/dist/core/dualTournament.js.map +0 -1
  165. package/dist/core/parallel.d.ts +0 -85
  166. package/dist/core/parallel.d.ts.map +0 -1
  167. package/dist/core/parallel.js +0 -150
  168. package/dist/core/parallel.js.map +0 -1
  169. package/dist/core/parallelCoordinator.d.ts +0 -21
  170. package/dist/core/parallelCoordinator.d.ts.map +0 -1
  171. package/dist/core/parallelCoordinator.js +0 -42
  172. package/dist/core/parallelCoordinator.js.map +0 -1
  173. package/dist/core/realityScore.d.ts +0 -159
  174. package/dist/core/realityScore.d.ts.map +0 -1
  175. package/dist/core/realityScore.js +0 -734
  176. package/dist/core/realityScore.js.map +0 -1
  177. package/dist/core/repoUpgradeOrchestrator.d.ts +0 -223
  178. package/dist/core/repoUpgradeOrchestrator.d.ts.map +0 -1
  179. package/dist/core/repoUpgradeOrchestrator.js +0 -1003
  180. package/dist/core/repoUpgradeOrchestrator.js.map +0 -1
  181. package/dist/core/securityTournament.d.ts +0 -83
  182. package/dist/core/securityTournament.d.ts.map +0 -1
  183. package/dist/core/securityTournament.js +0 -357
  184. package/dist/core/securityTournament.js.map +0 -1
  185. package/dist/core/tournamentStrategy.d.ts +0 -12
  186. package/dist/core/tournamentStrategy.d.ts.map +0 -1
  187. package/dist/core/tournamentStrategy.js +0 -41
  188. package/dist/core/tournamentStrategy.js.map +0 -1
  189. package/dist/core/universalSecurityAudit.d.ts +0 -104
  190. package/dist/core/universalSecurityAudit.d.ts.map +0 -1
  191. package/dist/core/universalSecurityAudit.js +0 -2190
  192. package/dist/core/universalSecurityAudit.js.map +0 -1
  193. package/dist/core/variantExecution.d.ts +0 -23
  194. package/dist/core/variantExecution.d.ts.map +0 -1
  195. package/dist/core/variantExecution.js +0 -58
  196. package/dist/core/variantExecution.js.map +0 -1
  197. package/dist/core/winnerStrategy.d.ts +0 -15
  198. package/dist/core/winnerStrategy.d.ts.map +0 -1
  199. package/dist/core/winnerStrategy.js +0 -18
  200. package/dist/core/winnerStrategy.js.map +0 -1
  201. package/dist/core/zeroDayDiscovery.d.ts +0 -96
  202. package/dist/core/zeroDayDiscovery.d.ts.map +0 -1
  203. package/dist/core/zeroDayDiscovery.js +0 -358
  204. package/dist/core/zeroDayDiscovery.js.map +0 -1
  205. package/dist/orchestration/repoUpgradeRunner.d.ts +0 -44
  206. package/dist/orchestration/repoUpgradeRunner.d.ts.map +0 -1
  207. package/dist/orchestration/repoUpgradeRunner.js +0 -375
  208. package/dist/orchestration/repoUpgradeRunner.js.map +0 -1
  209. package/dist/orchestration/securityAuditRunner.d.ts +0 -144
  210. package/dist/orchestration/securityAuditRunner.d.ts.map +0 -1
  211. package/dist/orchestration/securityAuditRunner.js +0 -526
  212. package/dist/orchestration/securityAuditRunner.js.map +0 -1
  213. package/dist/plugins/tools/apple/secureApplePlugin.d.ts +0 -3
  214. package/dist/plugins/tools/apple/secureApplePlugin.d.ts.map +0 -1
  215. package/dist/plugins/tools/apple/secureApplePlugin.js +0 -26
  216. package/dist/plugins/tools/apple/secureApplePlugin.js.map +0 -1
  217. package/dist/plugins/tools/authorizedSecurity/authorizedSecurityPlugin.d.ts +0 -3
  218. package/dist/plugins/tools/authorizedSecurity/authorizedSecurityPlugin.d.ts.map +0 -1
  219. package/dist/plugins/tools/authorizedSecurity/authorizedSecurityPlugin.js +0 -9
  220. package/dist/plugins/tools/authorizedSecurity/authorizedSecurityPlugin.js.map +0 -1
  221. package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.d.ts +0 -3
  222. package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.d.ts.map +0 -1
  223. package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.js +0 -27
  224. package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.js.map +0 -1
  225. package/dist/plugins/tools/offensiveDestruction/offensiveDestructionPlugin.d.ts +0 -3
  226. package/dist/plugins/tools/offensiveDestruction/offensiveDestructionPlugin.d.ts.map +0 -1
  227. package/dist/plugins/tools/offensiveDestruction/offensiveDestructionPlugin.js +0 -9
  228. package/dist/plugins/tools/offensiveDestruction/offensiveDestructionPlugin.js.map +0 -1
  229. package/dist/plugins/tools/tao/secureTaoPlugin.d.ts +0 -3
  230. package/dist/plugins/tools/tao/secureTaoPlugin.d.ts.map +0 -1
  231. package/dist/plugins/tools/tao/secureTaoPlugin.js +0 -37
  232. package/dist/plugins/tools/tao/secureTaoPlugin.js.map +0 -1
  233. package/dist/tools/secureAppleExploitation.d.ts +0 -29
  234. package/dist/tools/secureAppleExploitation.d.ts.map +0 -1
  235. package/dist/tools/secureAppleExploitation.js +0 -518
  236. package/dist/tools/secureAppleExploitation.js.map +0 -1
  237. package/dist/ui/maxOffensiveUkraineUI.d.ts +0 -94
  238. package/dist/ui/maxOffensiveUkraineUI.d.ts.map +0 -1
  239. package/dist/ui/maxOffensiveUkraineUI.js +0 -316
  240. package/dist/ui/maxOffensiveUkraineUI.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepseek-coder-agent-cli",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "DeepSeek AI-powered CLI agent for code assistance and automation",
5
5
  "deepseek": {
6
6
  "rulebookSchema": "src/contracts/schemas/agent-rules.schema.json"
@@ -10,7 +10,6 @@
10
10
  ".": "./dist/bin/deepseek.js",
11
11
  "./lean": "./dist/leanAgent.js",
12
12
  "./capabilities": "./dist/capabilities/index.js",
13
- "./security": "./dist/core/universalSecurityAudit.js",
14
13
  "./orchestration": "./dist/orchestration/index.js"
15
14
  },
16
15
  "type": "module",
@@ -1,57 +0,0 @@
1
- /**
2
- * Apple Security Capability Module
3
- *
4
- * Provides AGI Core with Apple security auditing, exploitation analysis,
5
- * and remediation capabilities for comprehensive Apple security management.
6
- */
7
- export interface AppleSecurityCapabilityOptions {
8
- /** Enable aggressive scanning and exploitation analysis */
9
- aggressive?: boolean;
10
- /** Scope of security assessment */
11
- targetScope?: 'services' | 'devices' | 'network' | 'all';
12
- /** Enable exploitation scenario generation */
13
- enableExploitation?: boolean;
14
- /** Enable automated remediation recommendations */
15
- enableRemediation?: boolean;
16
- /** Output directory for evidence and reports */
17
- outputDir?: string;
18
- }
19
- export declare class AppleSecurityCapabilityModule {
20
- readonly id = "apple-security";
21
- readonly name = "Apple Security Integration";
22
- readonly version = "1.0.0";
23
- readonly description = "Comprehensive Apple security auditing, exploitation analysis, and remediation capabilities";
24
- private securityIntegration;
25
- private options;
26
- constructor(options?: AppleSecurityCapabilityOptions);
27
- /**
28
- * Initialize the capability module
29
- */
30
- initialize(): Promise<void>;
31
- /**
32
- * Execute Apple security operations
33
- */
34
- execute(request: any): Promise<any>;
35
- /**
36
- * Get capability metadata and available operations
37
- */
38
- getMetadata(): {
39
- id: string;
40
- name: string;
41
- version: string;
42
- description: string;
43
- operations: {
44
- id: string;
45
- name: string;
46
- description: string;
47
- parameters: any[];
48
- }[];
49
- options: AppleSecurityCapabilityOptions;
50
- };
51
- /**
52
- * Clean up resources
53
- */
54
- cleanup(): Promise<void>;
55
- }
56
- export default AppleSecurityCapabilityModule;
57
- //# sourceMappingURL=appleSecurityCapability.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"appleSecurityCapability.d.ts","sourceRoot":"","sources":["../../src/capabilities/appleSecurityCapability.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,WAAW,8BAA8B;IAC7C,2DAA2D;IAC3D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mCAAmC;IACnC,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC;IACzD,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,6BAA6B;IACxC,QAAQ,CAAC,EAAE,oBAAoB;IAC/B,QAAQ,CAAC,IAAI,gCAAgC;IAC7C,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,WAAW,gGAAgG;IAEpH,OAAO,CAAC,mBAAmB,CAAyC;IACpE,OAAO,CAAC,OAAO,CAAiC;gBAEpC,OAAO,GAAE,8BAAmC;IAWxD;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAwBjC;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IA+EzC;;OAEG;IACH,WAAW;;;;;;;;;;;;;IAwEX;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAI/B;AAED,eAAe,6BAA6B,CAAC"}
@@ -1,197 +0,0 @@
1
- /**
2
- * Apple Security Capability Module
3
- *
4
- * Provides AGI Core with Apple security auditing, exploitation analysis,
5
- * and remediation capabilities for comprehensive Apple security management.
6
- */
7
- import { AppleSecurityIntegration } from '../core/appleSecurityIntegration.js';
8
- export class AppleSecurityCapabilityModule {
9
- id = 'apple-security';
10
- name = 'Apple Security Integration';
11
- version = '1.0.0';
12
- description = 'Comprehensive Apple security auditing, exploitation analysis, and remediation capabilities';
13
- securityIntegration = null;
14
- options;
15
- constructor(options = {}) {
16
- this.options = {
17
- aggressive: false,
18
- targetScope: 'all',
19
- enableExploitation: false,
20
- enableRemediation: true,
21
- outputDir: process.cwd(),
22
- ...options
23
- };
24
- }
25
- /**
26
- * Initialize the capability module
27
- */
28
- async initialize() {
29
- console.log('🚀 Initializing Apple Security Capability Module...');
30
- const config = {
31
- aggressive: this.options.aggressive ?? false,
32
- evidencePrefix: 'agi-apple-security',
33
- rateLimit: 1000,
34
- targetScope: this.options.targetScope ?? 'all',
35
- enableExploitation: this.options.enableExploitation ?? false,
36
- enableRemediation: this.options.enableRemediation ?? true,
37
- outputDir: this.options.outputDir ?? process.cwd()
38
- };
39
- this.securityIntegration = new AppleSecurityIntegration(config);
40
- // Quick health check
41
- const health = AppleSecurityIntegration.quickCheck();
42
- console.log(`Apple Security Health Check: ${health.status} - ${health.details}`);
43
- if (health.status === 'unavailable') {
44
- throw new Error(`Apple Security capability initialization failed: ${health.details}`);
45
- }
46
- }
47
- /**
48
- * Execute Apple security operations
49
- */
50
- async execute(request) {
51
- if (!this.securityIntegration) {
52
- throw new Error('Apple Security capability not initialized');
53
- }
54
- const { operation, parameters } = request;
55
- try {
56
- let result;
57
- switch (operation) {
58
- case 'service_discovery':
59
- result = await this.securityIntegration.phase1ServiceDiscovery();
60
- break;
61
- case 'vulnerability_assessment':
62
- result = await this.securityIntegration.phase2VulnerabilityAssessment();
63
- break;
64
- case 'security_hardening':
65
- result = await this.securityIntegration.phase3SecurityHardening();
66
- break;
67
- case 'agi_integration':
68
- result = await this.securityIntegration.phase4AgiIntegration();
69
- break;
70
- case 'generate_report':
71
- result = await this.securityIntegration.phase5GenerateReport();
72
- break;
73
- case 'full_integration':
74
- result = await this.securityIntegration.runFullIntegration();
75
- break;
76
- case 'health_check':
77
- result = AppleSecurityIntegration.quickCheck();
78
- break;
79
- case 'list_services':
80
- result = this.securityIntegration.loadAppleServices();
81
- break;
82
- case 'list_vulnerabilities':
83
- result = this.securityIntegration.loadAppleVulnerabilities();
84
- break;
85
- case 'list_exploits':
86
- result = this.securityIntegration.loadAppleExploits();
87
- break;
88
- default:
89
- throw new Error(`Unknown Apple Security operation: ${operation}`);
90
- }
91
- return {
92
- success: true,
93
- output: JSON.stringify(result, null, 2),
94
- metadata: {
95
- operation,
96
- timestamp: new Date().toISOString(),
97
- capability: this.id
98
- }
99
- };
100
- }
101
- catch (error) {
102
- return {
103
- success: false,
104
- error: error instanceof Error ? error.message : String(error),
105
- output: '',
106
- metadata: {
107
- operation,
108
- timestamp: new Date().toISOString(),
109
- capability: this.id
110
- }
111
- };
112
- }
113
- }
114
- /**
115
- * Get capability metadata and available operations
116
- */
117
- getMetadata() {
118
- return {
119
- id: this.id,
120
- name: this.name,
121
- version: this.version,
122
- description: this.description,
123
- operations: [
124
- {
125
- id: 'service_discovery',
126
- name: 'Apple Service Discovery',
127
- description: 'Discover and enumerate Apple services across all categories',
128
- parameters: []
129
- },
130
- {
131
- id: 'vulnerability_assessment',
132
- name: 'Vulnerability Assessment',
133
- description: 'Assess known Apple vulnerabilities and security weaknesses',
134
- parameters: []
135
- },
136
- {
137
- id: 'security_hardening',
138
- name: 'Security Hardening',
139
- description: 'Generate security hardening recommendations for Apple environments',
140
- parameters: []
141
- },
142
- {
143
- id: 'agi_integration',
144
- name: 'AGI Core Integration',
145
- description: 'Check integration capabilities with AGI Core framework',
146
- parameters: []
147
- },
148
- {
149
- id: 'generate_report',
150
- name: 'Generate Security Report',
151
- description: 'Generate comprehensive security report with findings and recommendations',
152
- parameters: []
153
- },
154
- {
155
- id: 'full_integration',
156
- name: 'Full Security Integration',
157
- description: 'Run complete Apple security integration workflow',
158
- parameters: []
159
- },
160
- {
161
- id: 'health_check',
162
- name: 'Health Check',
163
- description: 'Check Apple Security capability health status',
164
- parameters: []
165
- },
166
- {
167
- id: 'list_services',
168
- name: 'List Apple Services',
169
- description: 'List all known Apple services and domains',
170
- parameters: []
171
- },
172
- {
173
- id: 'list_vulnerabilities',
174
- name: 'List Vulnerabilities',
175
- description: 'List known Apple vulnerabilities and CVEs',
176
- parameters: []
177
- },
178
- {
179
- id: 'list_exploits',
180
- name: 'List Exploits',
181
- description: 'List available Apple exploitation techniques',
182
- parameters: []
183
- }
184
- ],
185
- options: this.options
186
- };
187
- }
188
- /**
189
- * Clean up resources
190
- */
191
- async cleanup() {
192
- this.securityIntegration = null;
193
- console.log('🧹 Apple Security Capability Module cleaned up');
194
- }
195
- }
196
- export default AppleSecurityCapabilityModule;
197
- //# sourceMappingURL=appleSecurityCapability.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"appleSecurityCapability.js","sourceRoot":"","sources":["../../src/capabilities/appleSecurityCapability.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,wBAAwB,EAA4B,MAAM,qCAAqC,CAAC;AAgBzG,M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,CAAC,gDAAgD,CAAC,CAAC;IAChE,CAAC;CACF;AAED,eAAe,6BAA6B,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Authorized Security Capability Module
3
- *
4
- * Modular security testing tools that require explicit authorization context.
5
- * Supports: CTF challenges, pentesting engagements, security research, defensive testing.
6
- *
7
- * Authorization is enforced via:
8
- * 1. Explicit context declaration (ctf, pentest, research, defensive)
9
- * 2. Target scope validation (localhost, *.ctf.*, authorized domains)
10
- * 3. Operation logging for accountability
11
- */
12
- import type { CapabilityContribution, CapabilityContext, CapabilityModule } from '../runtime/agentHost.js';
13
- export declare class AuthorizedSecurityCapabilityModule implements CapabilityModule {
14
- readonly id = "capability.authorized-security";
15
- create(_context: CapabilityContext): Promise<CapabilityContribution>;
16
- }
17
- //# sourceMappingURL=authorizedSecurityCapability.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authorizedSecurityCapability.d.ts","sourceRoot":"","sources":["../../src/capabilities/authorizedSecurityCapability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAqC3G,qBAAa,kCAAmC,YAAW,gBAAgB;IACzE,QAAQ,CAAC,EAAE,oCAAoC;IAEzC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CA8T3E"}
@@ -1,333 +0,0 @@
1
- /**
2
- * Authorized Security Capability Module
3
- *
4
- * Modular security testing tools that require explicit authorization context.
5
- * Supports: CTF challenges, pentesting engagements, security research, defensive testing.
6
- *
7
- * Authorization is enforced via:
8
- * 1. Explicit context declaration (ctf, pentest, research, defensive)
9
- * 2. Target scope validation (localhost, *.ctf.*, authorized domains)
10
- * 3. Operation logging for accountability
11
- */
12
- // Authorized CTF/training platforms - safe by design
13
- const AUTHORIZED_CTF_DOMAINS = [
14
- /\.hackthebox\.(com|eu)$/,
15
- /\.tryhackme\.com$/,
16
- /\.ctf\./,
17
- /\.ctftime\.org$/,
18
- /\.vulnhub\.com$/,
19
- /\.pentesterlab\.com$/,
20
- /\.offensive-security\.com$/,
21
- /\.htb$/,
22
- /localhost$/,
23
- /^127\./,
24
- /^10\./, // Private network - controlled environment
25
- /^192\.168\./, // Private network - controlled environment
26
- ];
27
- // Prohibited targets - never allow regardless of authorization
28
- const PROHIBITED_TARGETS = [
29
- /\.gov$/, // Government
30
- /\.mil$/, // Military
31
- /\.edu$/, // Education
32
- /\.bank$/, // Banking
33
- /critical.*infrastructure/i,
34
- ];
35
- export class AuthorizedSecurityCapabilityModule {
36
- id = 'capability.authorized-security';
37
- async create(_context) {
38
- // Session-scoped authorization state
39
- const authState = {
40
- context: null,
41
- authorizedDomains: [],
42
- sessionId: `sec-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
43
- startTime: Date.now(),
44
- operationLog: [],
45
- };
46
- const isTargetAuthorized = (target) => {
47
- // Check prohibited first
48
- for (const pattern of PROHIBITED_TARGETS) {
49
- if (pattern.test(target)) {
50
- return { authorized: false, reason: `Target matches prohibited pattern: ${pattern}` };
51
- }
52
- }
53
- // Check CTF platforms (always allowed for ctf/educational context)
54
- if (authState.context === 'ctf' || authState.context === 'educational') {
55
- for (const pattern of AUTHORIZED_CTF_DOMAINS) {
56
- if (pattern.test(target)) {
57
- return { authorized: true, reason: 'CTF/training platform' };
58
- }
59
- }
60
- }
61
- // Check explicitly authorized domains
62
- if (authState.authorizedDomains.some(d => target.includes(d) || target === d)) {
63
- return { authorized: true, reason: 'Explicitly authorized domain' };
64
- }
65
- // Localhost always allowed for any context
66
- if (/^(localhost|127\.|10\.|192\.168\.)/.test(target)) {
67
- return { authorized: true, reason: 'Local/private network' };
68
- }
69
- return { authorized: false, reason: 'Target not in authorized scope' };
70
- };
71
- const logOperation = (operation, target, result) => {
72
- authState.operationLog.push({
73
- timestamp: Date.now(),
74
- operation,
75
- target,
76
- result,
77
- });
78
- };
79
- return {
80
- id: 'authorized-security.tools',
81
- description: 'Security testing tools with authorization enforcement',
82
- toolSuite: {
83
- id: 'authorized-security',
84
- description: 'CTF, pentest, research, and defensive security tools',
85
- tools: [
86
- {
87
- name: 'SecurityAuth',
88
- description: `Set authorization context for security operations.
89
- Required before using security tools.
90
-
91
- Contexts:
92
- - ctf: CTF challenges, HackTheBox, TryHackMe, etc.
93
- - pentest: Authorized penetration testing engagement
94
- - research: Security research with controlled targets
95
- - defensive: Blue team / defensive security testing
96
- - educational: Learning/training purposes
97
-
98
- Example: SecurityAuth({ context: "ctf", authorizedDomains: ["target.htb"] })`,
99
- parameters: {
100
- type: 'object',
101
- properties: {
102
- context: {
103
- type: 'string',
104
- enum: ['ctf', 'pentest', 'research', 'defensive', 'educational'],
105
- description: 'Authorization context type',
106
- },
107
- authorizedDomains: {
108
- type: 'array',
109
- items: { type: 'string' },
110
- description: 'Additional domains explicitly authorized for this session',
111
- },
112
- engagement: {
113
- type: 'string',
114
- description: 'Optional engagement ID or reference for pentest context',
115
- },
116
- },
117
- required: ['context'],
118
- },
119
- handler: async (args) => {
120
- const context = args['context'];
121
- const domains = args['authorizedDomains'] || [];
122
- const engagement = args['engagement'];
123
- authState.context = context;
124
- authState.authorizedDomains = domains;
125
- logOperation('authorize', 'session', `context=${context}`);
126
- return JSON.stringify({
127
- status: 'authorized',
128
- sessionId: authState.sessionId,
129
- context,
130
- authorizedDomains: domains,
131
- engagement,
132
- ctfPlatformsEnabled: context === 'ctf' || context === 'educational',
133
- message: `Security operations authorized for ${context} context`,
134
- guidelines: {
135
- ctf: 'Only target CTF platforms and authorized challenge hosts',
136
- pentest: 'Only target explicitly authorized systems in scope',
137
- research: 'Use controlled environments, document findings responsibly',
138
- defensive: 'Blue team operations on owned/authorized infrastructure',
139
- educational: 'Learning purposes on training platforms only',
140
- },
141
- }, null, 2);
142
- },
143
- },
144
- {
145
- name: 'SecurityRecon',
146
- description: 'Reconnaissance and information gathering on authorized targets. Requires SecurityAuth first.',
147
- parameters: {
148
- type: 'object',
149
- properties: {
150
- target: {
151
- type: 'string',
152
- description: 'Target hostname or IP (must be authorized)',
153
- },
154
- type: {
155
- type: 'string',
156
- enum: ['dns', 'ports', 'services', 'headers', 'ssl'],
157
- description: 'Type of reconnaissance',
158
- },
159
- passive: {
160
- type: 'boolean',
161
- description: 'Passive-only recon (no active probing)',
162
- },
163
- },
164
- required: ['target', 'type'],
165
- },
166
- handler: async (args) => {
167
- if (!authState.context) {
168
- return JSON.stringify({
169
- error: 'Authorization required',
170
- message: 'Call SecurityAuth first to set context',
171
- }, null, 2);
172
- }
173
- const target = args['target'];
174
- const type = args['type'];
175
- const passive = args['passive'] ?? true;
176
- const authCheck = isTargetAuthorized(target);
177
- if (!authCheck.authorized) {
178
- logOperation('recon-blocked', target, authCheck.reason);
179
- return JSON.stringify({
180
- error: 'Target not authorized',
181
- target,
182
- reason: authCheck.reason,
183
- context: authState.context,
184
- hint: 'Add target to authorizedDomains or use a CTF platform',
185
- }, null, 2);
186
- }
187
- logOperation(`recon-${type}`, target, 'executed');
188
- // Simulated recon results (actual implementation would use real tools)
189
- const results = {
190
- sessionId: authState.sessionId,
191
- context: authState.context,
192
- target,
193
- type,
194
- passive,
195
- timestamp: new Date().toISOString(),
196
- };
197
- switch (type) {
198
- case 'dns':
199
- results.data = {
200
- records: ['A', 'AAAA', 'MX', 'TXT', 'NS'],
201
- note: 'DNS enumeration results would appear here',
202
- };
203
- break;
204
- case 'ports':
205
- results.data = {
206
- commonPorts: [22, 80, 443, 8080],
207
- note: 'Port scan results would appear here (use nmap for real scans)',
208
- };
209
- break;
210
- case 'services':
211
- results.data = {
212
- detected: ['ssh', 'http', 'https'],
213
- note: 'Service detection results would appear here',
214
- };
215
- break;
216
- case 'headers':
217
- results.data = {
218
- securityHeaders: ['X-Frame-Options', 'CSP', 'HSTS'],
219
- note: 'HTTP header analysis would appear here',
220
- };
221
- break;
222
- case 'ssl':
223
- results.data = {
224
- protocols: ['TLS 1.2', 'TLS 1.3'],
225
- note: 'SSL/TLS analysis would appear here',
226
- };
227
- break;
228
- }
229
- return JSON.stringify(results, null, 2);
230
- },
231
- },
232
- {
233
- name: 'SecurityVulnCheck',
234
- description: 'Check for common vulnerabilities on authorized targets. Requires SecurityAuth first.',
235
- parameters: {
236
- type: 'object',
237
- properties: {
238
- target: {
239
- type: 'string',
240
- description: 'Target to check (must be authorized)',
241
- },
242
- category: {
243
- type: 'string',
244
- enum: ['web', 'network', 'config', 'crypto', 'injection'],
245
- description: 'Vulnerability category to check',
246
- },
247
- safe: {
248
- type: 'boolean',
249
- description: 'Safe mode - detection only, no exploitation',
250
- },
251
- },
252
- required: ['target', 'category'],
253
- },
254
- handler: async (args) => {
255
- if (!authState.context) {
256
- return JSON.stringify({
257
- error: 'Authorization required',
258
- message: 'Call SecurityAuth first',
259
- }, null, 2);
260
- }
261
- const target = args['target'];
262
- const category = args['category'];
263
- const safe = args['safe'] ?? true;
264
- const authCheck = isTargetAuthorized(target);
265
- if (!authCheck.authorized) {
266
- logOperation('vulncheck-blocked', target, authCheck.reason);
267
- return JSON.stringify({
268
- error: 'Target not authorized',
269
- target,
270
- reason: authCheck.reason,
271
- }, null, 2);
272
- }
273
- logOperation(`vulncheck-${category}`, target, `safe=${safe}`);
274
- return JSON.stringify({
275
- sessionId: authState.sessionId,
276
- context: authState.context,
277
- target,
278
- category,
279
- safeMode: safe,
280
- checks: {
281
- web: ['XSS', 'CSRF', 'SSRF', 'Path traversal'],
282
- network: ['Open ports', 'Service versions', 'Default creds'],
283
- config: ['Misconfigurations', 'Debug endpoints', 'Info disclosure'],
284
- crypto: ['Weak ciphers', 'Certificate issues', 'Key exposure'],
285
- injection: ['SQLi', 'Command injection', 'LDAP injection'],
286
- }[category] || [],
287
- note: `Vulnerability checks for ${category} - implement with actual security tools`,
288
- timestamp: new Date().toISOString(),
289
- }, null, 2);
290
- },
291
- },
292
- {
293
- name: 'SecurityReport',
294
- description: 'Generate security assessment report for the session.',
295
- parameters: {
296
- type: 'object',
297
- properties: {
298
- format: {
299
- type: 'string',
300
- enum: ['summary', 'detailed', 'json'],
301
- description: 'Report format',
302
- },
303
- },
304
- },
305
- handler: async (args) => {
306
- const format = args['format'] || 'summary';
307
- const report = {
308
- sessionId: authState.sessionId,
309
- context: authState.context || 'none',
310
- duration: Date.now() - authState.startTime,
311
- operationCount: authState.operationLog.length,
312
- operations: format === 'detailed' ? authState.operationLog : undefined,
313
- authorizedDomains: authState.authorizedDomains,
314
- generated: new Date().toISOString(),
315
- };
316
- if (format === 'summary') {
317
- return `Security Session Report
318
- ========================
319
- Session: ${report.sessionId}
320
- Context: ${report.context}
321
- Duration: ${Math.round(report.duration / 1000)}s
322
- Operations: ${report.operationCount}
323
- Generated: ${report.generated}`;
324
- }
325
- return JSON.stringify(report, null, 2);
326
- },
327
- },
328
- ],
329
- },
330
- };
331
- }
332
- }
333
- //# sourceMappingURL=authorizedSecurityCapability.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authorizedSecurityCapability.js","sourceRoot":"","sources":["../../src/capabilities/authorizedSecurityCapability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,qDAAqD;AACrD,MAAM,sBAAsB,GAAG;IAC7B,yBAAyB;IACzB,mBAAmB;IACnB,SAAS;IACT,iBAAiB;IACjB,iBAAiB;IACjB,sBAAsB;IACtB,4BAA4B;IAC5B,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,OAAO,EAAW,2CAA2C;IAC7D,aAAa,EAAK,2CAA2C;CAC9D,CAAC;AAEF,+DAA+D;AAC/D,MAAM,kBAAkB,GAAG;IACzB,QAAQ,EAAU,aAAa;IAC/B,QAAQ,EAAU,WAAW;IAC7B,QAAQ,EAAU,YAAY;IAC9B,SAAS,EAAS,UAAU;IAC5B,2BAA2B;CAC5B,CAAC;AAYF,MAAM,OAAO,kCAAkC;IACpC,EAAE,GAAG,gCAAgC,CAAC;IAE/C,KAAK,CAAC,MAAM,CAAC,QAA2B;QAC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